-- formato pedimento
This commit is contained in:
@@ -42,20 +42,20 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-2">Pedimento:</div>
|
<div class="col-md-2">Pedimento:</div>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<asp:TextBox ID="TxtPedimento" CssClass="form-control" runat="server" MaxLength="18" Width="300px" ClientIDMode="Static" ></asp:TextBox>
|
<asp:TextBox ID="TxtPedimento" CssClass="form-control" runat="server" MaxLength="21" Width="300px" ClientIDMode="Static" ></asp:TextBox>
|
||||||
<ajaxToolkit:MaskedEditExtender ID="meeTxtPedimento" runat="server"
|
<ajaxToolkit:MaskedEditExtender ID="meeTxtPedimento" runat="server"
|
||||||
ClearMaskOnLostFocus="false"
|
ClearMaskOnLostFocus="false"
|
||||||
TargetControlID="TxtPedimento"
|
TargetControlID="TxtPedimento"
|
||||||
Mask="99-99-9999-9999999"
|
Mask="99--99--9999--9999999"
|
||||||
MaskType="Number"
|
MaskType="Number"
|
||||||
InputDirection="LeftToRight"
|
InputDirection="LeftToRight"
|
||||||
AcceptNegative="None"
|
AcceptNegative="None"
|
||||||
ErrorTooltipEnabled="True" />
|
ErrorTooltipEnabled="True" />
|
||||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtDescripcion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripcion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVPedimento" runat="server" ControlToValidate="TxtPedimento" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Pedimento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVDescripcion" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVPedimento" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
<asp:RegularExpressionValidator ID="regexTxtPedimento" runat="server" ControlToValidate="TxtPedimento" Display="None" ValidationGroup="GrpGuardar" ErrorMessage="Formato no valido, el formato correcto es 99-99-9999-9999999" ForeColor="Red"
|
<asp:RegularExpressionValidator ID="regexTxtPedimento" runat="server" ControlToValidate="TxtPedimento" Display="None" ValidationGroup="GrpGuardar" ErrorMessage="Formato no valido, el formato correcto es 99--99--9999--9999999" ForeColor="Red"
|
||||||
ValidationExpression="^[0-9 ]{2}-[0-9 ]{2}-[0-9 ]{4}-[0-9 ]{7}$" ></asp:RegularExpressionValidator>
|
ValidationExpression="^[0-9 ]{2}--[0-9 ]{2}--[0-9 ]{4}--[0-9 ]{7}$" ></asp:RegularExpressionValidator>
|
||||||
|
|
||||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="regexTxtPedimento" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="regexTxtPedimento" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
|
|||||||
@@ -95,17 +95,10 @@ Partial Class Compras_Importaciones
|
|||||||
DdlProveedores.txtValue.Value = ObjImportaciones.DtResultados.Rows(0)("CveAduanal").ToString
|
DdlProveedores.txtValue.Value = ObjImportaciones.DtResultados.Rows(0)("CveAduanal").ToString
|
||||||
DdlProveedores.txtText.Value = ObjImportaciones.DtResultados.Rows(0)("RazonSocial").ToString
|
DdlProveedores.txtText.Value = ObjImportaciones.DtResultados.Rows(0)("RazonSocial").ToString
|
||||||
|
|
||||||
'HdnCveCompra.Value = ObjImportaciones.DtResultados.Rows(0)("CveCompra").ToString
|
|
||||||
'LbCompraProveedor.Text = ObjImportaciones.DtResultados.Rows(0)("RazonSocial").ToString
|
|
||||||
'HLCompraSerieFolio.Text = ObjImportaciones.DtResultados.Rows(0)("SerieFolio").ToString
|
|
||||||
'HLCompraSerieFolio.NavigateUrl = $"/Compras/Compras.aspx?CveCompra={HdnCveCompra.Value}"
|
|
||||||
'LbCompraImporte.Text = ObjImportaciones.DtResultados.Rows(0)("Total").ToString
|
|
||||||
|
|
||||||
If ObjImportaciones.DtResultados.Rows(0)("CveEstatus").ToString.ToEntero = 0 Then
|
If ObjImportaciones.DtResultados.Rows(0)("CveEstatus").ToString.ToEntero = 0 Then
|
||||||
LnkCerrarImportacion.Visible = True
|
LnkCerrarImportacion.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
HdnCveAF.Value = ObjImportaciones.DtResultados.Rows(0)("CveActivoFijo").ToString
|
HdnCveAF.Value = ObjImportaciones.DtResultados.Rows(0)("CveActivoFijo").ToString
|
||||||
VincularAF()
|
VincularAF()
|
||||||
|
|
||||||
@@ -149,7 +142,7 @@ Partial Class Compras_Importaciones
|
|||||||
|
|
||||||
Dim ObjImp As New ClsCompras
|
Dim ObjImp As New ClsCompras
|
||||||
ObjImp.IniciaTransacSQL()
|
ObjImp.IniciaTransacSQL()
|
||||||
Dim ErrorImportacion = False
|
Dim ErrorImportacion As Boolean = False
|
||||||
|
|
||||||
If CveImportacion < 0 Then
|
If CveImportacion < 0 Then
|
||||||
CveImportacion = ObjImp.AddImportacion(Pedimento, TxtDescripcion.Text.Trim, DdlProveedores.SelectedValue.ToEntero, HdnCveAF.Value.ToEntero, TxtFecha.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
CveImportacion = ObjImp.AddImportacion(Pedimento, TxtDescripcion.Text.Trim, DdlProveedores.SelectedValue.ToEntero, HdnCveAF.Value.ToEntero, TxtFecha.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
@@ -197,7 +190,7 @@ Partial Class Compras_Importaciones
|
|||||||
Protected Sub BtnEliminar_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnEliminar_Click(sender As Object, e As EventArgs)
|
||||||
Dim ObjImp As New ClsCompras
|
Dim ObjImp As New ClsCompras
|
||||||
ObjImp.IniciaTransacSQL()
|
ObjImp.IniciaTransacSQL()
|
||||||
Dim ErrorEliminar = False
|
Dim ErrorEliminar As Boolean = False
|
||||||
|
|
||||||
For Each dr As DataRow In DtCompras.Rows
|
For Each dr As DataRow In DtCompras.Rows
|
||||||
If Not ObjImp.RemoveImportacionDetalle(dr("CveImportacionDetalle").ToString.ToEntero) Then
|
If Not ObjImp.RemoveImportacionDetalle(dr("CveImportacionDetalle").ToString.ToEntero) Then
|
||||||
@@ -265,7 +258,7 @@ Partial Class Compras_Importaciones
|
|||||||
|
|
||||||
Protected Sub LnkEliminaCompraVinculada_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkEliminaCompraVinculada_Click(sender As Object, e As EventArgs)
|
||||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||||
Dim TieneError = False
|
Dim TieneError As Boolean = False
|
||||||
If CveImportacion > 0 AndAlso GvComprasVinculadas.Rows(gvRow.RowIndex).DataKey("CveImportacionCompra").ToEntero > 0 Then
|
If CveImportacion > 0 AndAlso GvComprasVinculadas.Rows(gvRow.RowIndex).DataKey("CveImportacionCompra").ToEntero > 0 Then
|
||||||
Dim ObjImportaciones As New ClsCompras
|
Dim ObjImportaciones As New ClsCompras
|
||||||
|
|
||||||
@@ -295,7 +288,7 @@ Partial Class Compras_Importaciones
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim ObjCompras As New ClsCompras
|
Dim ObjCompras As New ClsCompras
|
||||||
Dim ErrorAgregar = False
|
Dim ErrorAgregar As Boolean = False
|
||||||
Dim RowCompra As DataRow = Nothing
|
Dim RowCompra As DataRow = Nothing
|
||||||
|
|
||||||
If ObjCompras.GetCompras(HdnCveCompra.Value.ToEntero, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
|
If ObjCompras.GetCompras(HdnCveCompra.Value.ToEntero, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
|
||||||
@@ -414,7 +407,7 @@ Partial Class Compras_Importaciones
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim ObjCompras As New ClsCompras
|
Dim ObjCompras As New ClsCompras
|
||||||
Dim ErrorAgregar = False
|
Dim ErrorAgregar As Boolean = False
|
||||||
Dim RowCompra As DataRow = Nothing
|
Dim RowCompra As DataRow = Nothing
|
||||||
|
|
||||||
If ObjCompras.GetCompras(HdnCveCompraGasto.Value.ToEntero, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
|
If ObjCompras.GetCompras(HdnCveCompraGasto.Value.ToEntero, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
|
||||||
@@ -471,7 +464,7 @@ Partial Class Compras_Importaciones
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub GvDireccionesEnvio_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
Private Sub GvDireccionesEnvio_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||||
Dim TieneError = False
|
Dim TieneError As Boolean = False
|
||||||
If CveImportacion > 0 AndAlso GvDatos.Rows(e.RowIndex).DataKey("CveImportacionDetalle").ToEntero > 0 Then
|
If CveImportacion > 0 AndAlso GvDatos.Rows(e.RowIndex).DataKey("CveImportacionDetalle").ToEntero > 0 Then
|
||||||
Dim ObjImportaciones As New ClsCompras
|
Dim ObjImportaciones As New ClsCompras
|
||||||
|
|
||||||
@@ -501,18 +494,12 @@ Partial Class Compras_Importaciones
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Protected Sub LnkCerrarImportacion_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkCerrarImportacion_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
|
||||||
Dim ObjInv As New ClsInventarios
|
Dim ObjInv As New ClsInventarios
|
||||||
|
|
||||||
If ObjInv.UpdateImportacionCierre(CveImportacion, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
If ObjInv.UpdateImportacionCierre(CveImportacion, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
||||||
Alert("Importación cerrada correctamente.", TipoMensaje.MsgInformacion, $" location.href = ""./Importaciones.aspx?CveImportacion={CveImportacion}"" ")
|
Alert("Importación cerrada correctamente.", TipoMensaje.MsgInformacion, $" location.href = ""./Importaciones.aspx?CveImportacion={CveImportacion}"" ")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjInv.Dispose()
|
ObjInv.Dispose()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
Reference in New Issue
Block a user