-
This commit is contained in:
@@ -326,12 +326,21 @@
|
||||
<asp:TextBox ID="TxtArchivoKey" runat="server" MaxLength="115" Width="200px"></asp:TextBox></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><a id="LnkArchivoKey" runat="server" class="Texto" href="javascript:AbrirVentana('/UploadFile.aspx', 350, 110, 'N', 'CargarArchivo');">Cargar Archivo Key</a></td>
|
||||
<td colspan="2">
|
||||
<asp:LinkButton ID="LnkArchivoKey" runat="server" class="Texto">Cargar Archivo Key</asp:LinkButton></td>
|
||||
</tr>
|
||||
<tr id="TrDescargaArchivoKey" runat="server" visible="false">
|
||||
<td colspan="2">
|
||||
<a id="LinkDescargaArchivoKey" target="_blank"></a>
|
||||
<asp:LinkButton ID="LbArchivoKeyDescarga" runat="server" CssClass="Texto">Descargar Archivo Key</asp:LinkButton>
|
||||
<asp:UpdatePanel runat="server" ID="UpArchivoDescarga">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="LbArchivoKeyDescarga" runat="server" CssClass="Texto">Descargar Archivo Key</asp:LinkButton>
|
||||
|
||||
<%--<a id="LinkDescargaArchivoKey" target="_blank"></a>--%>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LbArchivoKeyDescarga" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -340,7 +349,8 @@
|
||||
<asp:TextBox ID="TxtArchivoCer" runat="server" MaxLength="115" Width="200px"></asp:TextBox></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><a id="LnkArchivoCer" runat="server" class="Texto" href="javascript:AbrirVentana('/UploadFile.aspx', 350, 110, 'N', 'CargarArchivo');">Cargar Archivo CER</a></td>
|
||||
<td colspan="2">
|
||||
<asp:LinkButton ID="LnkArchivoCer" runat="server" class="Texto">Cargar Archivo CER</asp:LinkButton></td>
|
||||
</tr>
|
||||
<tr id="TrDescargaArchivoCer" runat="server" visible="false">
|
||||
<td colspan="2">
|
||||
@@ -354,7 +364,8 @@
|
||||
<asp:TextBox ID="TxtArchivoPfx" runat="server" MaxLength="115" Width="200px"></asp:TextBox></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><a id="LnkArchivoPfx" runat="server" class="Texto" href="javascript:AbrirVentana('/UploadFile.aspx', 350, 110, 'N', 'CargarArchivo');">Cargar Archivo PFX</a></td>
|
||||
<td colspan="2">
|
||||
<asp:LinkButton ID="LnkArchivoPfx" runat="server" class="Texto">Cargar Archivo PFX</asp:LinkButton></td>
|
||||
</tr>
|
||||
<tr id="TrDescargaArchivoPfx" runat="server" visible="false">
|
||||
<td colspan="2">
|
||||
@@ -372,7 +383,7 @@
|
||||
<td>
|
||||
<asp:TextBox ID="TxtCIEC" runat="server" MaxLength="50" Width="50px"></asp:TextBox></td>
|
||||
</tr>
|
||||
<tr id="TrRegistrarPAC3" runat="server" >
|
||||
<tr id="TrRegistrarPAC3" runat="server">
|
||||
<td colspan="2">
|
||||
<asp:LinkButton ID="LnkRegistrarPAC3" runat="server" CssClass="Texto" OnClick="LnkRegistrarPAC3_Click">Registrar en ProFact</asp:LinkButton>
|
||||
</td>
|
||||
@@ -497,6 +508,7 @@
|
||||
<%-- <asp:RegularExpressionValidator ID="REVRegistroPatronal" runat="server" ControlToValidate="TxtRegistoPatronal" Display="None" ErrorMessage="<b><span style='text-decoration: underline'></span></b><br />Favor de Introducir un <b>''Registro Patronal''</b> Valido." ValidationGroup="GrpGuardar"></asp:RegularExpressionValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCERegistroPatronal" runat="server" HighlightCssClass="vco" TargetControlID="REVRegistroPatronal" Width="300px"></ajax:ValidatorCalloutExtender> --%> </td>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Área Geográfica:</td>
|
||||
@@ -505,6 +517,7 @@
|
||||
<%-- <asp:RegularExpressionValidator ID="REVAreaGeografica" runat="server" ControlToValidate="TxtAreaGeografica" Display="None" ErrorMessage="<b><span style='text-decoration: underline'></span></b><br />Favor de Introducir un <b>''Área Geográfica''</b> Valida." ValidationGroup="GrpGuardar"></asp:RegularExpressionValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEAreaGeografica" runat="server" HighlightCssClass="vco" TargetControlID="REVAreaGeografica" Width="300px"></ajax:ValidatorCalloutExtender> --%> </td>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@@ -1408,6 +1421,7 @@
|
||||
<td>
|
||||
<asp:CheckBox ID="ChkReqCentroCostos" runat="server" /></td>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tipo Centro de Costos:</td>
|
||||
@@ -1758,6 +1772,43 @@
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<div id="ModalArchvivo" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content" style="width: 700px;">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Subir Imagen</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body" style="height: 200px;">
|
||||
<asp:UpdatePanel runat="server" ID="UpAddArchivo" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div>
|
||||
<asp:TextBox ID="TxtCargaImg" CssClass="ADSdropzone hidden" Text="" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%--<div>
|
||||
<asp:TextBox ID="Anexo" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||
</div> --%>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnGuardarArchivo" runat="server" OnClick="BtnGuardarArchivo_Click" ClientIDMode="Static" Text="Guardar" CssClass="btn btn-primary" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="server">
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -132,16 +132,16 @@ Partial Class Sistemas_Empresa
|
||||
TrDescargaBanner.Visible = True
|
||||
LnkBanner.InnerText = "Reemplazar Banner"
|
||||
|
||||
If LnkArchivoKey.InnerText = "" Then
|
||||
LnkArchivoKey.InnerText = "Reemplazar Archivo Key"
|
||||
End If
|
||||
If LnkArchivoCer.InnerText = "" Then
|
||||
LnkArchivoCer.InnerText = "Reemplazar Archivo Cer"
|
||||
End If
|
||||
'If LnkArchivoKey.InnerText = "" Then
|
||||
' LnkArchivoKey.InnerText = "Reemplazar Archivo Key"
|
||||
'End If
|
||||
'If LnkArchivoCer.InnerText = "" Then
|
||||
' LnkArchivoCer.InnerText = "Reemplazar Archivo Cer"
|
||||
'End If
|
||||
|
||||
If LnkArchivoPfx.InnerText = "" Then
|
||||
LnkArchivoPfx.InnerText = "Reemplazar Archivo Pfx"
|
||||
End If
|
||||
'If LnkArchivoPfx.InnerText = "" Then
|
||||
' LnkArchivoPfx.InnerText = "Reemplazar Archivo Pfx"
|
||||
'End If
|
||||
BtnGuardar.Text = "Guardar Cambios"
|
||||
|
||||
'Plantilla Correo
|
||||
@@ -398,7 +398,7 @@ Partial Class Sistemas_Empresa
|
||||
LbBannerDescarga.OnClientClick = "javascript:AbrirVentana('/Banners/" & .Banner & "', 500, 500, 'N', 'Banner Empresa');"
|
||||
Session("FileUpload") = .Banner
|
||||
|
||||
LbArchivoKeyDescarga.OnClientClick = "javascript:AbrirVentana('/Key/" & .ArchivoKey & "', 500, 500, 'N', 'ArchivoKey Empresa');"
|
||||
'LbArchivoKeyDescarga.OnClientClick = "javascript:AbrirVentana('/Key/" & .ArchivoKey & "', 500, 500, 'N', 'ArchivoKey Empresa');"
|
||||
Session("FileUpload") = .ArchivoKey
|
||||
|
||||
LbBannerDescarga.OnClientClick = "javascript:AbrirVentana('/Cer/" & .ArchivoCer & "', 500, 500, 'N', 'ArchivoCer Empresa');"
|
||||
@@ -1632,4 +1632,63 @@ Partial Class Sistemas_Empresa
|
||||
Dim result = conector.RegistraEmisor(RFCEmisor, certByte, llaveByte, contrasena)
|
||||
|
||||
If result.Exitoso Then
|
||||
Alert("El emisor se registró correctamente.<br>" & result.Descripcion)
|
||||
Else
|
||||
Alert("Ocurrió un error al registrar el emisor.<br>" & result.Descripcion & ".<br> Numero Error: " & result.NumeroError, TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al registrar el emisor", ex)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkArchivoKey_Click(sender As Object, e As EventArgs) Handles LnkArchivoKey.Click
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "ModalArchvivo"))
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkArchivoCer_Click(sender As Object, e As EventArgs) Handles LnkArchivoCer.Click
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "ModalArchvivo"))
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkArchivoPfx_Click(sender As Object, e As EventArgs) Handles LnkArchivoPfx.Click
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "ModalArchvivo"))
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnGuardarArchivo_Click(sender As Object, e As EventArgs)
|
||||
Dim FileExtension As String = "-1"
|
||||
Dim filesgral As List(Of Archivo) = TxtCargaImg.getfiles().Archivos
|
||||
Dim filemove As String = ""
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
For Each fileItem As Archivo In filesgral
|
||||
FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
|
||||
filemove = fileItem.filename
|
||||
|
||||
Dim Patron As String = "(^\d{1,}-)|(\.\w{1,}$)"
|
||||
Dim NombreArchivo As String = Regex.Replace(filemove, Patron, "")
|
||||
|
||||
Dim yaExistente As String = String.Format("{0}Empresas\{1}\Certificados\{2}.{3}", ModExtensiones.DirectorioBaseEmpresas, CveEmpresa, NombreArchivo, FileExtension)
|
||||
If File.Exists(yaExistente) Then
|
||||
File.Delete(yaExistente)
|
||||
End If
|
||||
Try
|
||||
If filemove <> "" Then
|
||||
Dim Ruta As String = String.Format("Empresas\{0}\Certificados\", CveEmpresa)
|
||||
filemove.FilesMove(NombreArchivo, Ruta)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
TieneError = True
|
||||
End Try
|
||||
Next
|
||||
If Not TieneError Then
|
||||
Alert("Certificado cargado con exito")
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalArchvivo"))
|
||||
End If
|
||||
TxtCargaImg.getfiles().Archivos = Nothing
|
||||
UpAddArchivo.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub LbArchivoKeyDescarga_Download(sender As Object, e As EventArgs) Handles LbArchivoKeyDescarga.Click
|
||||
Dim FilePath As String = String.Format("{0}Empresas\{1}\Certificados\{2}", ModExtensiones.DirectorioBaseEmpresas, CveEmpresa, TxtArchivoKey.Text)
|
||||
'Dim fi As New FileInfo(File)
|
||||
|
||||
Reference in New Issue
Block a user