Merge -- PV, PopUpVerFactura
This commit is contained in:
@@ -226,11 +226,41 @@
|
||||
<div class="row rowpadding">
|
||||
<label class="col-md-3">Unidad:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList runat="server" ID="DdlUnidadCamion" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca"></asp:DropDownList>
|
||||
<asp:DropDownList runat="server" ID="DdlUnidadCamion" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" OnSelectedIndexChanged="DdlUnidadCamionActivoFijo_SelectedIndexChanged" ></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlUnidadCamion" runat="server" Enabled="false" ControlToValidate="DdlUnidadCamion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceDdlUnidadCamion" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlUnidadCamion" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row rowpadding" runat="server" id="DvConfiguracionVeiculo" visible="false">
|
||||
<label class="col-md-3">Configuración:</label>
|
||||
<div class="col-md-9">
|
||||
<%--<asp:DropDownList runat="server" ID="DropDownList1" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveActivoFijo" DataTextField="CodigoDescripcion"></asp:DropDownList>--%>
|
||||
<asp:DropDownList ID="DdlConfigAuto" CssClass="form-control input-sm select2me" Width="100%" runat="server" AppendDataBoundItems="true" AutoPostBack="true" OnSelectedIndexChanged="DdlConfigAuto_SelectedIndexChanged" CausesValidation="true" DataTextField="ClaveConfigAutoTransporteDescripcion" DataValueField="ClaveConfigAutoTransporte" Style="padding: 0px">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlConfigAuto" runat="server" Enabled="false" ControlToValidate="DdlConfigAuto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Configuración Carta Porte''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCERfvDdlConfigAuto" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlConfigAuto" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row rowpadding" runat="server" id="DvRemolque1" visible="false">
|
||||
<label class="col-md-3">Remolque 1:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList runat="server" ID="DdlRemolque1" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" OnSelectedIndexChanged="DdlRemolque1_SelectedIndexChanged"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row rowpadding" runat="server" id="DvRemolque2" visible="false">
|
||||
<label class="col-md-3">Remolque 2:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList runat="server" ID="DdlRemolque2" AutoPostBack="true" Width="100%" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" ></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row rowpadding">
|
||||
<%--<label class="col-md-3">F. Salida:</label>
|
||||
<div class="col-md-9" style="padding-top: 0px;">
|
||||
@@ -730,7 +760,7 @@
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList runat="server" ID="DdlDirClienteLocalidad" CssClass="form-control select2me" DataValueField="CveLocalidad" DataTextField="NombreLocalidad" Width="100%" CausesValidation="true"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlDirClienteLocalidad" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlDirClienteLocalidad" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Localidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<%--<asp:RequiredFieldValidator ID="RfvDdlDirClienteLocalidad" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlDirClienteLocalidad" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Localidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>--%>
|
||||
<label for="<%= DdlDirClienteLocalidad.ClientID.ToString()%>">Localidad:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
@@ -362,7 +362,7 @@ Partial Class Inventarios_CartaPorteManual
|
||||
|
||||
DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimero("") ' Estado = -1
|
||||
|
||||
If DrPS IsNot Nothing Then
|
||||
If DrPS IsNot Nothing AndAlso ValidaPSSAT(DrPS) Then
|
||||
|
||||
'codigo temporal
|
||||
Dim tLote As String
|
||||
@@ -561,7 +561,8 @@ Partial Class Inventarios_CartaPorteManual
|
||||
|
||||
Dim FechallegadaMM As DateTime = (FechaLlegada.ToString("dd/MM/yyyy") & " 23:59:59").ToDateTime
|
||||
|
||||
Dim CveEntregaAlmacen As Integer = ObjGral.AddInvEntregaAlmacenRuta(DdlSubProyecto.SelectedValue.ToEntero, CveDireccionOrigen, CveDireccionDestino, -1, DdlChofer.SelectedValue.ToEntero, DdlUnidadCamion.SelectedValue.ToEntero, FechaSalida, FechallegadaMM, "T", "-1", "-1", FechaLlegada, 1, 1, TxtDistancia.Text.ToEntero)
|
||||
Dim CveEntregaAlmacen As Integer = ObjGral.AddInvEntregaAlmacenRuta(DdlSubProyecto.SelectedValue.ToEntero, CveDireccionOrigen, CveDireccionDestino, -1, DdlChofer.SelectedValue.ToEntero, DdlUnidadCamion.SelectedValue.ToEntero, FechaSalida, FechallegadaMM, "T", "-1", "-1", FechaLlegada, 1, 1, TxtDistancia.Text.ToEntero,
|
||||
ConfigCartaPorte:=DdlConfigAuto.SelectedValue, CveCamionRemolque1:=DdlRemolque1.SelectedValue.ToEntero, CveCamionRemolque2:=DdlRemolque2.SelectedValue.ToEntero)
|
||||
|
||||
If CveEntregaAlmacen > 0 Then
|
||||
|
||||
@@ -946,15 +947,56 @@ Partial Class Inventarios_CartaPorteManual
|
||||
|
||||
|
||||
Public Sub CargarCamiones()
|
||||
|
||||
DdlConfigAuto.Items.Clear()
|
||||
DdlUnidadCamion.Items.Clear()
|
||||
|
||||
DdlUnidadCamion.DataSource = GlobalDTInvCamiones(UsuarioActual.CveEmpresa)
|
||||
'DdlUnidadCamion.DataSource = GlobalDTInvCamiones(UsuarioActual.CveEmpresa)
|
||||
'DdlUnidadCamion.DataBind()
|
||||
|
||||
|
||||
|
||||
Using ObjInv As New ClsInventarios
|
||||
|
||||
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1) Then
|
||||
DdlUnidadCamion.DataSource = ObjInv.DtResultados
|
||||
End If
|
||||
|
||||
|
||||
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2) Then
|
||||
DdlRemolque1.DataSource = ObjInv.DtResultados
|
||||
End If
|
||||
|
||||
End Using
|
||||
|
||||
DdlUnidadCamion.DataBind()
|
||||
|
||||
|
||||
DdlUnidadCamion.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
|
||||
|
||||
DdlRemolque1.DataBind()
|
||||
DdlRemolque1.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
|
||||
|
||||
|
||||
Using ObjGrales As New ClsGenerales
|
||||
|
||||
If ObjGrales.GetCartaPorteConfigAutoTransportes() Then
|
||||
DdlConfigAuto.DataSource = ObjGrales.DtResultados
|
||||
End If
|
||||
|
||||
End Using
|
||||
|
||||
DdlConfigAuto.DataBind()
|
||||
DdlConfigAuto.Items.Insert(0, New ListItem("Seleccione una", "-1"))
|
||||
|
||||
'Using ObjGral As New ClsGenerales
|
||||
' If ObjGral.GetCartaPorteConfigAutoTransportes() Then
|
||||
' DdlConfigAuto.DataSource = ObjGral.DtResultados
|
||||
' End If
|
||||
'End Using
|
||||
|
||||
'DdlConfigAuto.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -1334,6 +1376,223 @@ Partial Class Inventarios_CartaPorteManual
|
||||
UpModalDVDireccionEnvio.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "remolques"
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub DdlUnidadCamionActivoFijo_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
DvRemolque1.Visible = False
|
||||
DvRemolque2.Visible = False
|
||||
|
||||
DdlRemolque1.SelectedValueExist(-1)
|
||||
DdlRemolque2.SelectedValueExist(-1)
|
||||
|
||||
If DdlUnidadCamion.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
|
||||
Using ObjInv As New ClsInventarios
|
||||
|
||||
If ObjInv.GetCamiones(DdlUnidadCamion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 1) Then
|
||||
DdlConfigAuto.SelectedValueExist(ObjInv.DtResultados.FiltroPrimeroValor("ConfigCartaPorte"))
|
||||
DdlConfigAuto_SelectedIndexChanged(Nothing, Nothing)
|
||||
End If
|
||||
|
||||
End Using
|
||||
|
||||
|
||||
End If
|
||||
|
||||
UpEmitirTransitorio.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Property RequiereRemolque As Boolean
|
||||
Get
|
||||
If ViewState("RequiereRemolque") Is Nothing Then
|
||||
ViewState("RequiereRemolque") = False
|
||||
End If
|
||||
|
||||
Return Boolean.Parse(ViewState("RequiereRemolque").ToString)
|
||||
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("RequiereRemolque") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Property MostrarRemolques As Boolean
|
||||
Get
|
||||
If ViewState("MostrarRemolques") Is Nothing Then
|
||||
ViewState("MostrarRemolques") = False
|
||||
End If
|
||||
|
||||
Return Boolean.Parse(ViewState("MostrarRemolques").ToString)
|
||||
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("MostrarRemolques") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Protected Sub DdlConfigAuto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
ValidaConfiguracionVeiculo()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ValidaConfiguracionVeiculo()
|
||||
DvRemolque1.Visible = False
|
||||
DvRemolque2.Visible = False
|
||||
|
||||
DdlRemolque1.SelectedValueExist(-1)
|
||||
DdlRemolque2.SelectedValueExist(-1)
|
||||
|
||||
If DdlConfigAuto.SelectedIndex > 0 Then
|
||||
|
||||
Using ObjGrales As New ClsGenerales
|
||||
If ObjGrales.GetCartaPorteConfigAutoTransportes() Then
|
||||
Dim Remolque As String = ObjGrales.DtResultados.FiltroPrimeroValor("Remolque", $" ClaveConfigAutoTransporte ='{DdlConfigAuto.SelectedValue}'")
|
||||
|
||||
|
||||
If Remolque = "1" Then
|
||||
RequiereRemolque = True
|
||||
MostrarRemolques = True
|
||||
End If
|
||||
|
||||
If Remolque = "0, 1" Then
|
||||
RequiereRemolque = False
|
||||
MostrarRemolques = True
|
||||
End If
|
||||
|
||||
If Remolque = "0" Then
|
||||
RequiereRemolque = False
|
||||
MostrarRemolques = False
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
|
||||
Else
|
||||
RequiereRemolque = False
|
||||
MostrarRemolques = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
If RequiereRemolque Or MostrarRemolques Then
|
||||
DvRemolque1.Visible = True
|
||||
End If
|
||||
|
||||
If Not RequiereRemolque Then
|
||||
DvConfiguracionVeiculo.Visible = False
|
||||
Else
|
||||
DvConfiguracionVeiculo.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
UpEmitirTransitorio.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlRemolque1_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
DdlRemolque2.Items.Clear()
|
||||
|
||||
If DdlRemolque1.SelectedValue.ToEntero > 0 Then
|
||||
DvRemolque2.Visible = True
|
||||
|
||||
Using ObjInv As New ClsInventarios
|
||||
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2) Then
|
||||
DdlRemolque2.DataSource = ObjInv.DtResultados.FiltraParametros($"CveCamion <> {DdlRemolque1.SelectedValue.ToEntero}")
|
||||
End If
|
||||
End Using
|
||||
|
||||
DdlRemolque2.DataBind()
|
||||
|
||||
|
||||
Else
|
||||
DvRemolque2.Visible = False
|
||||
End If
|
||||
|
||||
DdlRemolque2.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
UpEmitirTransitorio.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function validarRemolques() As Boolean
|
||||
Dim Respuesta As Boolean = False
|
||||
|
||||
|
||||
If RequiereRemolque And DdlRemolque1.SelectedValue.ToEntero <= 0 Then
|
||||
Alert("La configuración de la carta porte requiere que seleccione un remolque", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
If RequiereRemolque And DdlRemolque1.SelectedValue.ToEntero > 0 Then
|
||||
Respuesta = True
|
||||
End If
|
||||
|
||||
If Not RequiereRemolque Then
|
||||
Respuesta = True
|
||||
End If
|
||||
|
||||
Return Respuesta
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Function ValidaPSSAT(DrPS As DataRow) As Boolean
|
||||
Dim Respuesta As Boolean = False
|
||||
|
||||
Dim CveSATPS As Integer = DrPS("CveSATPS").ToString.ToEntero
|
||||
Dim PesoKg As Decimal = DrPS("PesoKg").ToString.ToDecimal
|
||||
Dim SATClaveUnidadMedida As String = DrPS("SATClaveUnidadMedida").ToString.Trim
|
||||
|
||||
If CveSATPS > 0 And PesoKg > 0 And SATClaveUnidadMedida.Length > 0 Then
|
||||
Respuesta = True
|
||||
Else
|
||||
Respuesta = False
|
||||
Dim SBMensaje As New StringBuilder
|
||||
|
||||
SBMensaje.AppendLine("El producto seleccionado presenta la siguiente situación: <br>")
|
||||
|
||||
If CveSATPS <= 0 Then
|
||||
SBMensaje.AppendLine("-Producto SAT no asignado. <br>")
|
||||
End If
|
||||
|
||||
|
||||
If PesoKg = 0 Then
|
||||
SBMensaje.AppendLine("-Producto sin peso definido. <br>")
|
||||
End If
|
||||
|
||||
|
||||
If SATClaveUnidadMedida.Length = 0 Then
|
||||
SBMensaje.AppendLine("-Producto sin unidad de medida SAT asignada. ")
|
||||
End If
|
||||
|
||||
|
||||
SBMensaje.AppendLine($"<br><br> <strong><a class='texto' target='_blank' href='../Ventas/ProductosServicios.aspx?CvePS={DrPS("CvePS").ToString}' > Corregir Producto </a></strong>")
|
||||
|
||||
|
||||
Alert(SBMensaje.ToString, TipoMensaje.MsgAdvertencia)
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Return Respuesta
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
@@ -1,49 +1,46 @@
|
||||
<%@ Page Title="Catálogo de Unidades" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatUnidades.aspx.vb" Inherits="Inventarios_CatUnidades" EnableEventValidation="false" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
|
||||
<style>
|
||||
|
||||
#DivAgregarUnidad > div.modal-dialog > div label input {
|
||||
padding:0px!important;
|
||||
padding: 0px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||
Catálogo de Unidades
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Unidades
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LnkAgregarUnidad" OnClick="LnkAgregarUnidad_Click" data-toggle="tooltip" data-placement="left" title="Agregar Unidad" Text="<i class='fa fa-plus'></i>Agregar Unidad"></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="LnkAgregarUnidad" OnClick="LnkAgregarUnidad_Click" data-toggle="tooltip" data-placement="left" title="Agregar Unidad" Text="<i class='fa fa-plus'></i>Agregar Unidad"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCamion,Placa,Especificacion,ConfigCartaPorte,Anio,CveTipoPermisoSCT,NumPermisoSCT,NombreAseguradora,NumPolizaSeguro,NombreAseguradoraMedioAmbiente,NumPolizaSeguroMedioAmbiente,NombreAseguradoraCarga,NumPolizaSeguroCarga"
|
||||
EmptyDataText="No se Encontraron Unidades" ToolTip="Listado de Unidades" CssClass="table table-striped table-advance table-hover mysmallbtn " data-sort="true" Style=" width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCamion,Placa,Especificacion,ConfigCartaPorte,Anio,CveTipoCamion,CveTipoPermisoSCT,NumPermisoSCT,NombreAseguradora,NumPolizaSeguro,NombreAseguradoraMedioAmbiente,NumPolizaSeguroMedioAmbiente,NombreAseguradoraCarga,NumPolizaSeguroCarga,LongitudCaja,LineaTransportacion,SCAC,CAAT,CveTipoRemolque,NumeroTrailer"
|
||||
EmptyDataText="No se Encontraron Unidades" ToolTip="Listado de Unidades" CssClass="table table-striped table-advance table-hover mysmallbtn " data-sort="true" Style="width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Unidad" DataField="Especificacion" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Placa" DataField="Placa" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Config Carta Porte" DataField="ConfigCartaPorte" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Placa" DataField="Placa" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Config Carta Porte" DataField="ConfigCartaPorte" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Tipo Permiso SCT" DataField="ClaveTipoPermisoSCT" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Permiso SCT" DataField="NumPermisoSCT" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Aseguradora" DataField="NombreAseguradora" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Póliza Seguro" DataField="NumPolizaSeguro" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Póliza Seguro" DataField="NumPolizaSeguro" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
<asp:BoundField HeaderText="Fecha de Ingreso" ItemStyle-HorizontalAlign="Center" DataField="FechaIng" ItemStyle-Width="5%" DataFormatString="{0:d}" />
|
||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" />
|
||||
@@ -57,7 +54,7 @@
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
<div id="DivAgregarUnidad" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog ">
|
||||
@@ -71,25 +68,42 @@
|
||||
<asp:Literal runat="server" ID="LtlTituloModal" Text="Agregar Unidad"></asp:Literal></h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright col-md-12">
|
||||
<asp:TextBox ID="TxtEspecificacionNuevo" CssClass="form-control" runat="server" MaxLength="100"></asp:TextBox>
|
||||
<label for="<%= TxtEspecificacionNuevo.ClientID.ToString()%>">Unidad:</label>
|
||||
<asp:RequiredFieldValidator runat="server" ID="RfvTxtEspecificacionNuevo" ControlToValidate="TxtEspecificacionNuevo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Especificación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright col-md-12">
|
||||
<asp:TextBox ID="TxtEspecificacionNuevo" CssClass="form-control" runat="server" MaxLength="100"></asp:TextBox>
|
||||
<label for="<%= TxtEspecificacionNuevo.ClientID.ToString()%>">Unidad:</label>
|
||||
<asp:RequiredFieldValidator runat="server" ID="RfvTxtEspecificacionNuevo" ControlToValidate="TxtEspecificacionNuevo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Especificación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-12" runat="server" id="DVTiposRemolque" visible="false">
|
||||
<div class="form-group form-md-line-input input-iconright ">
|
||||
<asp:DropDownList ID="DdlTiposRemolque" CssClass="form-control input-sm select2me" Width="100%" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="TipoRemolqueCod" DataValueField="CveTipoRemolque" Style="padding: 0px">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlTiposRemolque" runat="server" ControlToValidate="DdlTiposRemolque" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Remolque''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlTiposRemolque.ClientID.ToString()%>">Tipo Remolque:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright col-md-12">
|
||||
<asp:TextBox ID="TxtNumeroTrailer" CssClass="form-control" runat="server" MaxLength="100"></asp:TextBox>
|
||||
<asp:Label AssociatedControlID="TxtNumeroTrailer" runat="server" Text="NÚMERO DE TRAILER"></asp:Label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright col-md-6">
|
||||
|
||||
|
||||
<asp:TextBox ID="TxtPlacaNuevo" CssClass="form-control" runat="server" MaxLength="7"></asp:TextBox>
|
||||
<label for="<%= TxtPlacaNuevo.ClientID.ToString()%>">Placa:</label>
|
||||
<asp:RequiredFieldValidator runat="server" ID="RfvTxtPlacaNuevo" ControlToValidate="TxtPlacaNuevo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Placa''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
|
||||
<asp:RegularExpressionValidator runat="server" ID="RevTxtPlacaNuevo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Placa''</b> no contiene los caracteres suficientes." ControlToValidate="TxtPlacaNuevo" ValidationExpression="^.{6,8}$" ValidationGroup="GrpUnidad"></asp:RegularExpressionValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright col-md-6">
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright col-md-6" runat="server" id="DVAnio">
|
||||
<asp:TextBox ID="TxtAnio" CssClass="form-control" runat="server" MaxLength="4"></asp:TextBox>
|
||||
<label for="<%= TxtAnio.ClientID.ToString()%>">Año:</label>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtAnio" FilterType="Custom" ValidChars="1234567890" />
|
||||
@@ -101,8 +115,8 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlConfigAuto" CssClass="form-control input-sm select2me" Width="100%" runat="server" AppendDataBoundItems="true" AutoPostBack="false" CausesValidation="true" DataTextField="ClaveConfigAutoTransporteDescripcion" DataValueField="ClaveConfigAutoTransporte" Style="padding: 0px">
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server" id="DVConfigAuto">
|
||||
<asp:DropDownList ID="DdlConfigAuto" CssClass="form-control input-sm select2me" Width="100%" runat="server" AppendDataBoundItems="true" AutoPostBack="false" CausesValidation="true" DataTextField="ClaveConfigAutoTransporteDescripcion" DataValueField="ClaveConfigAutoTransporte" Style="padding: 0px">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlConfigAuto.ClientID.ToString()%>">Configuración Carta Porte:</label>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlConfigAuto" runat="server" ControlToValidate="DdlConfigAuto" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Configuración Carta Porte''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
|
||||
@@ -111,7 +125,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server" id="DVTipoPermisoSCT">
|
||||
<asp:DropDownList ID="DdlTipoPermisoSCT" CssClass="form-control input-sm select2me " Width="100%" runat="server" AppendDataBoundItems="true" AutoPostBack="false" CausesValidation="true" DataTextField="ClaveTipoPermisoDescripcion" DataValueField="CveTipoPermisoSCT" Style="padding: 0px">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlTipoPermisoSCT.ClientID.ToString()%>">Tipo Permiso SCT:</label>
|
||||
@@ -119,10 +133,10 @@
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="row" runat="server" id="DVNumermisoSCT">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNumermisoSCT" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtNumermisoSCT.ClientID.ToString()%>">Número Permiso SCT:</label>
|
||||
<%--<asp:RequiredFieldValidator runat="server" ID="RfvTxtNumermisoSCT" ControlToValidate="TxtNumermisoSCT" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Numero Permiso SCT''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>--%>
|
||||
@@ -131,7 +145,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="row" runat="server" id="DVNombreAseguradora">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNombreAseguradora" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
@@ -150,45 +164,85 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="row" runat="server" id="DVNombreAseguradoraMedioAmbiente">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright" >
|
||||
<asp:TextBox ID="TxtNombreAseguradoraMedioAmbiente" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtNombreAseguradoraMedioAmbiente.ClientID.ToString()%>">Aseguradora Medio Ambiente:</label>
|
||||
<asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" ControlToValidate="TxtNombreAseguradoraMedioAmbiente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Aseguradora Medio Ambiente''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNombreAseguradoraMedioAmbiente" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtNombreAseguradoraMedioAmbiente.ClientID.ToString()%>">Aseguradora Medio Ambiente:</label>
|
||||
<asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" ControlToValidate="TxtNombreAseguradoraMedioAmbiente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Aseguradora Medio Ambiente''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNumPolizaSeguroMedioAmbiente" CssClass="form-control" runat="server" MaxLength="25"></asp:TextBox>
|
||||
<label for="<%= TxtNumPolizaSeguroMedioAmbiente.ClientID.ToString()%>">Número Póliza Medio Ambiente:</label>
|
||||
<asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator2" ControlToValidate="TxtNumPolizaSeguroMedioAmbiente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Numero Póliza Medio Ambiente''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNumPolizaSeguroMedioAmbiente" CssClass="form-control" runat="server" MaxLength="25"></asp:TextBox>
|
||||
<label for="<%= TxtNumPolizaSeguroMedioAmbiente.ClientID.ToString()%>">Número Póliza Medio Ambiente:</label>
|
||||
<asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator2" ControlToValidate="TxtNumPolizaSeguroMedioAmbiente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Numero Póliza Medio Ambiente''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNombreAseguradoraCarga" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtNombreAseguradoraCarga.ClientID.ToString()%>">Aseguradora Carga:</label>
|
||||
<i></i>
|
||||
<div class="row" runat="server" id="DVNumPolizaSeguroMedioAmbient">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNombreAseguradoraCarga" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtNombreAseguradoraCarga.ClientID.ToString()%>">Aseguradora Carga:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright" >
|
||||
<asp:TextBox ID="TxtNumPolizaSeguroCarga" CssClass="form-control" runat="server" MaxLength="25"></asp:TextBox>
|
||||
<label for="<%= TxtNumPolizaSeguroCarga.ClientID.ToString()%>">Número Póliza Seguro:</label>
|
||||
<i></i>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNumPolizaSeguroCarga" CssClass="form-control" runat="server" MaxLength="25"></asp:TextBox>
|
||||
<label for="<%= TxtNumPolizaSeguroCarga.ClientID.ToString()%>">Número Póliza Seguro:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6" runat="server" id="DVLongitudCaja" visible="false">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtLongitudCaja" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtLongitudCaja.ClientID.ToString()%>">Longitud de caja:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6" runat="server" id="DVLineaTransportacion" visible="false">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtLineaTransportacion" CssClass="form-control" runat="server" MaxLength="25"></asp:TextBox>
|
||||
<label for="<%= TxtLineaTransportacion.ClientID.ToString()%>">Linea de transportacion:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row" runat="server" id="DVSCACCAAT" visible="false">
|
||||
<div class="col-md-6" >
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtSCAC" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtSCAC.ClientID.ToString()%>">SCAC:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCAAT" CssClass="form-control" runat="server" MaxLength="25"></asp:TextBox>
|
||||
<label for="<%= TxtCAAT.ClientID.ToString()%>">CAAT:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<asp:CheckBox ID="ChkesRemolque" Checked="true" TextAlign="Left" Text="¿Es remolque?:" runat="server" AutoPostBack="true" OnCheckedChanged="ChkesRemolque_CheckedChanged" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@@ -204,13 +258,13 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -51,11 +51,22 @@ Partial Class Inventarios_CatUnidades
|
||||
If ObjGral.GetCartaPorteTipoPermisoSCT() Then
|
||||
DdlTipoPermisoSCT.DataSource = ObjGral.DtResultados
|
||||
End If
|
||||
|
||||
If ObjGral.GetCartaPorteTiposRemolques() Then
|
||||
DdlTiposRemolque.DataSource = ObjGral.DtResultados
|
||||
End If
|
||||
|
||||
|
||||
End Using
|
||||
|
||||
DdlConfigAuto.DataBind()
|
||||
DdlConfigAuto.Items.Insert(0, New ListItem("Seleccione Uno ", "-1"))
|
||||
|
||||
DdlTipoPermisoSCT.DataBind()
|
||||
DdlTipoPermisoSCT.Items.Insert(0, New ListItem("Seleccione Uno ", "-1"))
|
||||
|
||||
DdlTiposRemolque.DataBind()
|
||||
DdlTiposRemolque.Items.Insert(0, New ListItem("Seleccione Uno ", "-1"))
|
||||
|
||||
UpModalUnidades.Update()
|
||||
|
||||
@@ -82,8 +93,16 @@ Partial Class Inventarios_CatUnidades
|
||||
TxtNumPolizaSeguroMedioAmbiente.Text = ""
|
||||
TxtNombreAseguradoraCarga.Text = ""
|
||||
TxtNumPolizaSeguroCarga.Text = ""
|
||||
|
||||
TxtLongitudCaja.Text = ""
|
||||
TxtLineaTransportacion.Text = ""
|
||||
TxtNumeroTrailer.Text = ""
|
||||
TxtSCAC.Text = ""
|
||||
TxtCAAT.Text = ""
|
||||
ChkesRemolque.Checked = False
|
||||
LtlTituloModal.Text = "Agregar Unidad"
|
||||
DdlTiposRemolque.SelectedValueExist(-1)
|
||||
|
||||
ChkesRemolque_CheckedChanged(Nothing, Nothing)
|
||||
|
||||
UpModalUnidades.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarUnidad"))
|
||||
@@ -95,7 +114,7 @@ Partial Class Inventarios_CatUnidades
|
||||
Dim GvRow As GridViewRow = CType(((CType(sender, LinkButton)).NamingContainer), GridViewRow)
|
||||
|
||||
CveCamion = GvRow.DataKey("CveCamion").ToEntero()
|
||||
|
||||
Dim CveTipoRemolque As Integer = GvRow.DataKey("CveTipoRemolque").ToEntero
|
||||
|
||||
TxtPlacaNuevo.Text = GvRow.DataKey("Placa")
|
||||
TxtEspecificacionNuevo.Text = GvRow.DataKey("Especificacion")
|
||||
@@ -113,8 +132,21 @@ Partial Class Inventarios_CatUnidades
|
||||
TxtNombreAseguradoraCarga.Text = GvRow.DataKey("NombreAseguradoraCarga")
|
||||
TxtNumPolizaSeguroCarga.Text = GvRow.DataKey("NumPolizaSeguroCarga")
|
||||
|
||||
DdlTiposRemolque.SelectedValueExist(CveTipoRemolque)
|
||||
|
||||
TxtNumeroTrailer.Text = GvRow.DataKey("NumeroTrailer")
|
||||
TxtLongitudCaja.Text = GvRow.DataKey("LongitudCaja")
|
||||
TxtLineaTransportacion.Text = GvRow.DataKey("LineaTransportacion")
|
||||
TxtSCAC.Text = GvRow.DataKey("SCAC")
|
||||
TxtCAAT.Text = GvRow.DataKey("CAAT")
|
||||
|
||||
ChkesRemolque.Checked = (GvRow.DataKey("CveTipoCamion") = "2")
|
||||
|
||||
LtlTituloModal.Text = "Actualizar Unidad"
|
||||
|
||||
ChkesRemolque_CheckedChanged(Nothing, Nothing)
|
||||
|
||||
|
||||
UpModalUnidades.Update()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarUnidad"))
|
||||
@@ -128,18 +160,19 @@ Partial Class Inventarios_CatUnidades
|
||||
|
||||
Dim CveCamionEliminar = GvRow.DataKey("CveCamion").ToEntero()
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Using ObjInventarios As New ClsInventarios
|
||||
|
||||
If (ObjInventarios.RemoveCamiones(CveCamionEliminar, UsuarioActual.CveEmpresa)) Then
|
||||
|
||||
UpDatos.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarUnidad"))
|
||||
Alert("Unidad Eliminada Correctamente")
|
||||
Else
|
||||
ErrorAlElimiar = True
|
||||
End If
|
||||
If (ObjInventarios.RemoveCamiones(CveCamionEliminar, UsuarioActual.CveEmpresa)) Then
|
||||
|
||||
UpDatos.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarUnidad"))
|
||||
Alert("Unidad Eliminada Correctamente")
|
||||
Else
|
||||
ErrorAlElimiar = True
|
||||
End If
|
||||
End Using
|
||||
|
||||
ObjInventarios.Dispose()
|
||||
|
||||
If Not ErrorAlElimiar Then
|
||||
GlobalDTInvCamiones(UsuarioActual.CveEmpresa) = Nothing
|
||||
@@ -152,23 +185,25 @@ Partial Class Inventarios_CatUnidades
|
||||
|
||||
Dim ErrorPrceso As Boolean = False
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim CveTipoCamion As Integer = If(ChkesRemolque.Checked, 2, 1)
|
||||
Using ObjInventarios As New ClsInventarios
|
||||
|
||||
If CveCamion <= 0 Then
|
||||
If ObjInventarios.AddCamiones(TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, UsuarioActual.CveEmpresa, DdlConfigAuto.SelectedValue, TxtAnio.Text.ToEntero(), DdlTipoPermisoSCT.SelectedValue.ToEntero, TxtNumermisoSCT.Text, TxtNombreAseguradora.Text, TxtNumPolizaSeguro.Text, UsuarioActual.CveUsuario,
|
||||
TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text) Then
|
||||
Alert("Unidad agregada correctamente")
|
||||
If CveCamion <= 0 Then
|
||||
If ObjInventarios.AddCamiones(TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, UsuarioActual.CveEmpresa, DdlConfigAuto.SelectedValue, TxtAnio.Text.ToEntero(), DdlTipoPermisoSCT.SelectedValue.ToEntero(), TxtNumermisoSCT.Text, TxtNombreAseguradora.Text, TxtNumPolizaSeguro.Text, UsuarioActual.CveUsuario,
|
||||
TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text) Then
|
||||
Alert("Unidad agregada correctamente")
|
||||
Else
|
||||
ErrorPrceso = True
|
||||
End If
|
||||
Else
|
||||
ErrorPrceso = True
|
||||
If ObjInventarios.UpdateCamiones(CveCamion, TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, DdlConfigAuto.SelectedValue, TxtAnio.Text.ToEntero(), DdlTipoPermisoSCT.SelectedValue.ToEntero(), TxtNumermisoSCT.Text, TxtNombreAseguradora.Text, TxtNumPolizaSeguro.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||
TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text) Then
|
||||
Alert("Unidad actualizada correctamente")
|
||||
Else
|
||||
ErrorPrceso = True
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If ObjInventarios.UpdateCamiones(CveCamion, TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, DdlConfigAuto.SelectedValue, TxtAnio.Text.ToEntero(), DdlTipoPermisoSCT.SelectedValue.ToEntero, TxtNumermisoSCT.Text, TxtNombreAseguradora.Text, TxtNumPolizaSeguro.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||
TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text) Then
|
||||
Alert("Unidad actualizada correctamente")
|
||||
Else
|
||||
ErrorPrceso = True
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
|
||||
|
||||
If Not ErrorPrceso Then
|
||||
@@ -183,4 +218,42 @@ Partial Class Inventarios_CatUnidades
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub ChkesRemolque_CheckedChanged(sender As Object, e As EventArgs)
|
||||
|
||||
If Not ChkesRemolque.Checked Then
|
||||
|
||||
DVAnio.Visible = True
|
||||
DVConfigAuto.Visible = True
|
||||
DVTipoPermisoSCT.Visible = True
|
||||
DVNumermisoSCT.Visible = True
|
||||
DVNombreAseguradora.Visible = True
|
||||
DVNombreAseguradoraMedioAmbiente.Visible = True
|
||||
DVNumPolizaSeguroMedioAmbient.Visible = True
|
||||
|
||||
DVLineaTransportacion.Visible = True
|
||||
DVSCACCAAT.Visible = True
|
||||
|
||||
DVTiposRemolque.Visible = False
|
||||
DVLongitudCaja.Visible = False
|
||||
Else
|
||||
DVAnio.Visible = False
|
||||
DVConfigAuto.Visible = False
|
||||
DVTipoPermisoSCT.Visible = False
|
||||
DVNumermisoSCT.Visible = False
|
||||
DVNombreAseguradora.Visible = False
|
||||
DVNombreAseguradoraMedioAmbiente.Visible = False
|
||||
DVNumPolizaSeguroMedioAmbient.Visible = False
|
||||
|
||||
DVLineaTransportacion.Visible = False
|
||||
DVSCACCAAT.Visible = False
|
||||
|
||||
DVTiposRemolque.Visible = True
|
||||
DVLongitudCaja.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
DVTiposRemolque.Visible = ChkesRemolque.Checked
|
||||
UpModalUnidades.Update
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div id="DivPS" style="overflow-y: auto; width: 765px; height: 365px;" runat="server">
|
||||
<asp:GridView ID="GV" Width="100%" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" ToolTip="Listado de Contratos encontrados." CssClass="table table-striped table-hover" GridLines="None">
|
||||
<asp:GridView ID="GV" Width="100%" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" ToolTip="" CssClass="table table-striped table-hover" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Almacen" HeaderText="Almacén" />
|
||||
<asp:BoundField DataField="UnidadMedida" HeaderText="Unidad de Medida" />
|
||||
|
||||
@@ -150,7 +150,7 @@ Partial Class Inventarios_Default
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveUsuario = 100 Then
|
||||
If UsuarioActual.TienePermisoPagina(624) Then
|
||||
HlPendiente.Visible = True
|
||||
HlPendiente.NavigateUrl = String.Format("/Inventarios/RepVentasXSurtir.aspx?CvePS={0}", CvePS)
|
||||
End If
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:GridView ID="GVDatos" runat="server"
|
||||
DataKeyNames="CveEntregaAlmacen,Estatus,CveCliente,CveDireccionOrigen,CveDireccionDestino,CveCamion,CveChofer,FechaEntrega,CveAlmacen,Tipo,AplicaCP,RFCReceptor,RFCEmisor,CveTimbre,CvePAC,FolioFiscal"
|
||||
DataKeyNames="CveEntregaAlmacen,Estatus,CveCliente,CveDireccionOrigen,CveDireccionDestino,CveCamion,CveChofer,FechaEntrega,CveAlmacen,Tipo,AplicaCP,RFCReceptor,RFCEmisor,CveTimbre,CvePAC,FolioFiscal, TimbreTipoDocto,CveMovimiento,FechaLlegada,CveCamionRemolque1,CveCamionRemolque2,Distancia,ConfigCartaPorte,SerieFolio,DireccionOrigen,Direccion"
|
||||
AutoGenerateColumns="False" EmptyDataText="No se encontraron Registros con los filtros especificados" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" data-sort="true" GridLines="None"
|
||||
EmptyDataRowStyle-HorizontalAlign="Center" OnRowDataBound="GVDatos_RowDataBound">
|
||||
<Columns>
|
||||
@@ -120,7 +120,7 @@
|
||||
|
||||
<asp:BoundField DataField="FechaEntrega" HeaderText="Fecha Entrega" ItemStyle-Width="4%" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" />
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="Opciones">
|
||||
<asp:TemplateField ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="Opciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" runat="server" OnClick="imgEditar_Click" AlternateText="Editar" ToolTip="Actualizar" CausesValidation="False" CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="LnkTimbrar" runat="server" OnClick="LnkTimbrar_Click" AlternateText="Timbrar" ToolTip="Timbrar" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-external-link'></i>" />
|
||||
@@ -128,15 +128,26 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Center" HeaderText="Direcciones" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditarDirOrigen" Visible="false" runat="server" OnClick="EditDireccionOrigen_Click" AlternateText="Editar" ToolTip="Actualzar dirección Origen" CausesValidation="False" CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-location-arrow'></i>" />
|
||||
<asp:LinkButton ID="LnkEditarDirDestino" Visible="false" runat="server" OnClick="EditDireccionDestino_Click" AlternateText="Editar" ToolTip="Actualziar Dierccion Destino" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-location-arrow'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:BoundField DataField="Estatus" HeaderText="PDF" ItemStyle-Width="4%" ItemStyle-HorizontalAlign="Center" Visible="true" />
|
||||
<asp:BoundField DataField="Estatus" HeaderText="XML" ItemStyle-Width="4%" ItemStyle-HorizontalAlign="Center" Visible="true" />
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="DivEditarEntrega" class="modal ADS fade" role="dialog">
|
||||
<div id="DivEditarEntrega" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UpModalEditarentrega" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
@@ -146,64 +157,119 @@
|
||||
</button>
|
||||
<h4 class="modal-title" id="H3" runat="server">Editar Entrega</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlModalDireccionOrigen" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="DireccionEnvio" DataValueField="CveDireccionEnvio" Class="table-group-action-input form-control input-inline input-small input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%= DdlModalDireccionOrigen.ClientID.ToString()%>">Dirección Origen:</label>
|
||||
</div>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlModalDireccionOrigen" runat="server" ControlToValidate="DdlModalDireccionOrigen" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Dirección Origen''</b> es necesario." InitialValue="-1" ValidationGroup="GrpModalEditarentrega"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceDdlModalDireccionOrigen" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlModalDireccionOrigen" Width="250px" PopupPosition="BottomLeft"></ajax:ValidatorCalloutExtender>
|
||||
<label class="col-md-3">Chofer:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList ID="DdlModalChofer" runat="server" DataTextField="Chofer" DataValueField="CveChofer" AutoPostBack="true" CssClass="form-control input-sm select2me" Width="100%"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlModalChofer" runat="server" Enabled="false" ControlToValidate="DdlModalChofer" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceRfvDdlModalChofer" runat="server" HighlightCssClass="vco" TargetControlID="rfvDdlModalChofer" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlModalDireccionDestino" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="DireccionEnvio" DataValueField="CveDireccionEnvio" Class="table-group-action-input form-control input-inline input-small input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%= DdlModalDireccionDestino.ClientID.ToString()%>">Dirección Destino:</label>
|
||||
</div>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlModalDireccionDestino" runat="server" ControlToValidate="DdlModalDireccionDestino" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Dirección Destino''</b> es necesario." InitialValue="-1" ValidationGroup="GrpModalEditarentrega"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceDdlModalDireccionDestino" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlModalDireccionDestino" Width="250px" PopupPosition="BottomLeft"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlModalChofer" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="Chofer" DataValueField="CveChofer" Class="table-group-action-input form-control input-inline input-small input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%= DdlModalChofer.ClientID.ToString()%>">Chofer:</label>
|
||||
</div>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlModalChofer" runat="server" ControlToValidate="DdlModalChofer" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario." InitialValue="-1" ValidationGroup="GrpModalEditarentrega"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceDdlModalChofer" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlModalChofer" Width="250px" PopupPosition="BottomLeft"></ajax:ValidatorCalloutExtender>
|
||||
<div class="row">
|
||||
<label class="col-md-3">Unidad:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList runat="server" ID="DdlModalCamion" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" OnSelectedIndexChanged="DdlModalCamion_SelectedIndexChanged"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlUnidadCamionActivoFijo" runat="server" Enabled="false" ControlToValidate="DdlModalCamion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceDdlUnidadCamionActivoFijo" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlUnidadCamionActivoFijo" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlModalCamion" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="Placa" DataValueField="CveCamion" Class="table-group-action-input form-control input-inline input-small input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%= DdlModalCamion.ClientID.ToString()%>">Unidad:</label>
|
||||
</div>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlModalCamion" runat="server" ControlToValidate="DdlModalCamion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad''</b> es necesario." InitialValue="-1" ValidationGroup="GrpModalEditarentrega"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceDdlModalCamion" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlModalCamion" Width="250px" PopupPosition="BottomLeft"></ajax:ValidatorCalloutExtender>
|
||||
<div class="row" runat="server" id="DvConfiguracionVeiculo" visible="false">
|
||||
<label class="col-md-3">Configuración:</label>
|
||||
<div class="col-md-9">
|
||||
<%--<asp:DropDownList runat="server" ID="DropDownList1" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveActivoFijo" DataTextField="CodigoDescripcion"></asp:DropDownList>--%>
|
||||
<asp:DropDownList ID="DdlConfigAuto" CssClass="form-control input-sm select2me" Width="100%" runat="server" AppendDataBoundItems="true" AutoPostBack="true" OnSelectedIndexChanged="DdlConfigAuto_SelectedIndexChanged" CausesValidation="true" DataTextField="ClaveConfigAutoTransporteDescripcion" DataValueField="ClaveConfigAutoTransporte" Style="padding: 0px">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlConfigAuto" runat="server" Enabled="false" ControlToValidate="DdlConfigAuto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Configuración Carta Porte''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCERfvDdlConfigAuto" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlConfigAuto" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" >
|
||||
|
||||
<div style="margin-left:16px!important">
|
||||
<label for="<%= TxtmodalFechaEntrega.ClientID.ToString()%>">Fecha Entrega:</label>
|
||||
<br />
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="TxtmodalFechaEntrega" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkModalTxtmodalFechaEntrega" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<div class="row" runat="server" id="DvRemolque1" visible="false">
|
||||
<label class="col-md-3">Remolque 1:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList runat="server" ID="DdlRemolque1" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" OnSelectedIndexChanged="DdlRemolque1_SelectedIndexChanged"></asp:DropDownList>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="METxtmodalFechaEntrega" runat="server" TargetControlID="TxtmodalFechaEntrega" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CeTxtmodalFechaEntrega" TargetControlID="TxtmodalFechaEntrega" PopupButtonID="LnkModalTxtmodalFechaEntrega" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtmodalFechaEntrega" runat="server" ControlToValidate="TxtmodalFechaEntrega" Display="None" ErrorMessage="El campo <b>''Fecha de Entrega''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpModalEditarentrega"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceTxtmodalFechaEntrega" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtmodalFechaEntrega" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row" runat="server" id="DvRemolque2" visible="false">
|
||||
<label class="col-md-3">Remolque 2:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList runat="server" ID="DdlRemolque2" AutoPostBack="true" Width="100%" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpModalDirecciones" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row" runat="server" id="DVDireccionOrigen" visible="false">
|
||||
<label class="col-md-3">Dirección Origen:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:LinkButton runat="server" OnClick="EditDireccionOrigen_Click" ID="LnkDireccionOrigen" CssClass="Texto"></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" runat="server" id="DVDireccionDestino" visible="false">
|
||||
<label class="col-md-3">Dirección Destino:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:LinkButton runat="server" OnClick="EditDireccionDestino_Click" ID="LnkDireccionDestino" CssClass="Texto"></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-3">F. Salida:</label>
|
||||
<div class="col-md-9" style="padding-top: 0px;">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 125px !important;">
|
||||
<asp:TextBox ID="TxtFechaEntrega" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="80px" ClientIDMode="Static"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="ImgFechaEntrega" class="btn default"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="TxtFechaEntrega" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender2" TargetControlID="TxtFechaEntrega" PopupButtonID="ImgFechaEntrega" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="TxtFechaEntrega" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Entrega''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" runat="server" id="divFechaLlegada">
|
||||
<label class="col-md-3">F. Llegada:</label>
|
||||
<div class="col-md-4" style="padding-top: 0px;">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 125px !important;">
|
||||
<asp:TextBox ID="TxtFechaLlegada" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="80px" ClientIDMode="Static"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="ImgFechaEnvio" class="btn default"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender3" runat="server" TargetControlID="TxtFechaLlegada" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender3" TargetControlID="TxtFechaLlegada" PopupButtonID="ImgFechaEnvio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="CompareValidator2" runat="server" ControlToValidate="TxtFechaLlegada" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Envío''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator2" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1">Dist:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:TextBox ID="TxtDistancia" runat="server" CssClass="form-control input-sm" Width="100%" Text="1"></asp:TextBox>
|
||||
<ajax:TextBoxWatermarkExtender ID="TBWEDistancia" runat="server" TargetControlID="TxtDistancia" WatermarkText="Distancia" WatermarkCssClass="watermarked" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
@@ -218,6 +284,144 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="divAddDireccionEnvio" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UpModalDVDireccionEnvio" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="myModalLabel"> <asp:Label runat="server" ID="LblTitulodireccion"></asp:Label> </h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel ID="UpBodyDireccion" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtEnvioDireccion" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="100"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtEnvioDireccion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Direccion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtEnvioDireccion.ClientID.ToString()%>">Calle:</label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtEnvioNoExt" runat="server" CssClass="form-control" MaxLength="15"></asp:TextBox>
|
||||
<label for="<%= TxtEnvioNoExt.ClientID.ToString()%>">No. Ext. </label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtEnvioNoInt" runat="server" CssClass="form-control" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtEnvioNoInt.ClientID.ToString()%>">No. Int.</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row ">
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtEnvioCP" runat="server" Width="100%" CssClass="form-control" CausesValidation="true" TextMode="Number" onblur="DirclienteValidaCodigoPostal()" onkeypress="if(event.key === 'Enter'){return false;}"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator14" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtEnvioCP" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Código Postal''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtEnvioCP.ClientID.ToString()%>">Código Postal:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlDirClientePais" AutoPostBack="true" AppendDataBoundItems="true" OnSelectedIndexChanged="DdlDirClientePais_SelectedIndexChanged" runat="server" DataTextField="Descripcion" DataValueField="CvePais" CssClass="form-control select2me" Width="100%" CausesValidation="true">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlDirClientePais" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlDirClientePais" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Pais''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlDirClientePais.ClientID.ToString()%>">Pais:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlDirClienteEstado" AutoPostBack="true" AppendDataBoundItems="true" OnSelectedIndexChanged="DdlDirClienteEstado_SelectedIndexChanged" runat="server" DataTextField="NombreEstado" DataValueField="CveEstado" CssClass="form-control select2me" Width="100%" CausesValidation="true">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlDirClienteEstado" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlDirClienteEstado" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlDirClienteEstado.ClientID.ToString()%>">Estado:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlDirClienteMunicipio" AutoPostBack="true" AppendDataBoundItems="true" OnSelectedIndexChanged="DdlDirClienteMunicipio_SelectedIndexChanged" runat="server" DataTextField="Descripcion" DataValueField="CveMunicipio" CssClass="form-control select2me" Width="100%" CausesValidation="true">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlDirClienteMunicipio" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlDirClienteMunicipio" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Municipio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlDirClienteMunicipio.ClientID.ToString()%>">Municipio:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList runat="server" ID="DdlDirClienteLocalidad" CssClass="form-control select2me" DataValueField="CveLocalidad" DataTextField="NombreLocalidad" Width="100%" CausesValidation="true"></asp:DropDownList>
|
||||
<%--<asp:RequiredFieldValidator ID="RfvDdlDirClienteLocalidad" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlDirClienteLocalidad" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Localidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>--%>
|
||||
<label for="<%= DdlDirClienteLocalidad.ClientID.ToString()%>">Localidad:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlDirClienteColonia" runat="server" AppendDataBoundItems="true" DataTextField="NombreAsentamiento" DataValueField="CveColonia" CssClass="form-control select2me" Width="100%" AutoPostBack="true" OnSelectedIndexChanged="DdlDirClienteColonia_SelectedIndexChanged" CausesValidation="true">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlDirClienteColonia" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlDirClienteColonia" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Colonia''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlDirClienteColonia.ClientID.ToString()%>">Colonia:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div style="display: none">
|
||||
<asp:Button ID="BtnDirClienteValidar" ClientIDMode="Static" runat="server" CssClass="btn btn-primary" OnClick="BtnDirClienteValidar_Click" Text="validar" />
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel ID="UpFooter" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="BtnAgregarDireccion" runat="server" CssClass="btn btn-success" Text="Actualizar" ValidationGroup="GrpObligatorio" OnClick="BtnAgregarDireccion_Click"></asp:LinkButton>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
@@ -176,6 +176,81 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private int CveDireccionEditar
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["CveDireccionEditar"] == null)
|
||||
{
|
||||
ViewState["CveDireccionEditar"] = -1;
|
||||
}
|
||||
return ViewState["CveDireccionEditar"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveDireccionEditar"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private int CveDireccionOrigen
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["CveDireccionOrigen"] == null)
|
||||
{
|
||||
ViewState["CveDireccionOrigen"] = -1;
|
||||
}
|
||||
return ViewState["CveDireccionOrigen"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveDireccionOrigen"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
private int CveDireccionDestino
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["CveDireccionDestino"] == null)
|
||||
{
|
||||
ViewState["CveDireccionDestino"] = -1;
|
||||
}
|
||||
return ViewState["CveDireccionDestino"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveDireccionDestino"] = value;
|
||||
}
|
||||
}
|
||||
private int CveTimbre
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["CveTimbre"] == null)
|
||||
{
|
||||
ViewState["CveTimbre"] = -1;
|
||||
}
|
||||
return ViewState["CveTimbre"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveTimbre"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -189,7 +264,13 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
CargaChoferes();
|
||||
UPFiltros.Update();
|
||||
CargarCentrosDeCosto(null, DdlSucursales, null, LblDdlSucursal);
|
||||
|
||||
CargaChoferes();
|
||||
CargarCamiones();
|
||||
|
||||
|
||||
CargaDatos();
|
||||
CargaCombosDirecionesClientesSAT();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -274,59 +355,124 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
|
||||
protected void imgEditar_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
|
||||
CveEntregaAlmacen = GvRow.DataKey("CveEntregaAlmacen").ToEntero();
|
||||
CveTimbre = GvRow.DataKey("CveTimbre").ToEntero();
|
||||
|
||||
int CveCliente = GvRow.DataKey("CveCliente").ToEntero();
|
||||
int CveDireccionOrigen = GvRow.DataKey("CveDireccionOrigen").ToEntero();
|
||||
int CveCliente = GvRow.DataKey("CveCliente").ToEntero();
|
||||
int CveAlmacen = GvRow.DataKey("CveAlmacen").ToEntero();
|
||||
|
||||
CargaModalCombosDirecciones(CveCliente, CveDireccionOrigen, CveAlmacen);
|
||||
|
||||
DdlModalDireccionOrigen.SelectedValueExist(GvRow.DataKey("CveDireccionOrigen"));
|
||||
DdlModalDireccionDestino.SelectedValueExist(GvRow.DataKey("CveDireccionDestino"));
|
||||
|
||||
DdlModalCamion.SelectedValueExist(GvRow.DataKey("CveCamion"));
|
||||
DdlModalChofer.SelectedValueExist(GvRow.DataKey("CveChofer"));
|
||||
DdlModalChofer.SelectedValueExist(GvRow.DataKey("CveChofer"));
|
||||
|
||||
TxtFechaEntrega.Text = GvRow.DataKey("FechaEntrega").ToDate().ToString("dd/MM/yyyy");
|
||||
TxtFechaLlegada.Text = GvRow.DataKey("FechaLlegada").ToDate().ToString("dd/MM/yyyy");
|
||||
TxtDistancia.Text = GvRow.DataKey("Distancia");
|
||||
DdlConfigAuto.SelectedValueExist(GvRow.DataKey("ConfigCartaPorte"));
|
||||
DdlConfigAuto_SelectedIndexChanged(null, null);
|
||||
|
||||
if (GvRow.DataKey("CveCamionRemolque1").ToEntero() > 0)
|
||||
{
|
||||
DdlRemolque1.SelectedValueExist(GvRow.DataKey("CveCamionRemolque1"));
|
||||
DdlRemolque2.SelectedValueExist("-1");
|
||||
DdlRemolque1_SelectedIndexChanged(null, null);
|
||||
}
|
||||
|
||||
if (GvRow.DataKey("CveCamionRemolque2").ToEntero() > 0)
|
||||
{
|
||||
DdlRemolque2.SelectedValueExist(GvRow.DataKey("CveCamionRemolque2"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
CveDireccionOrigen = GvRow.DataKey("CveDireccionOrigen").ToEntero();
|
||||
CveDireccionDestino = GvRow.DataKey("CveDireccionDestino").ToEntero();
|
||||
|
||||
ModalActualizaDirecciones( CveTimbre);
|
||||
|
||||
|
||||
//if( CveDireccionOrigen > 0)
|
||||
//{
|
||||
// DVDireccionOrigen.Visible = true;
|
||||
|
||||
// LnkDireccionOrigen.Text = GvRow.DataKey("DireccionOrigen") + " <i class='fa fa-search' aria-hidden='true'></i>";
|
||||
//}
|
||||
//if (CveDireccionDestino > 0)
|
||||
//{
|
||||
// DVDireccionDestino.Visible = true;
|
||||
// LnkDireccionDestino.Text = GvRow.DataKey("Direccion") + " <i class='fa fa-search' aria-hidden='true'></i>";
|
||||
//}
|
||||
|
||||
TxtmodalFechaEntrega.Text = GvRow.DataKey("FechaEntrega").ToDate().ToString("dd/MM/yyyy");
|
||||
|
||||
|
||||
UpModalEditarentrega.Update();
|
||||
this.RegistraScript("$('#DivEditarEntrega').modal('show');");
|
||||
this.RegistraScript("$('#DivEditarEntrega').modal({ backdrop: 'static', keyboard: false });");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void ModalActualizaDirecciones(int CveTimbre)
|
||||
{
|
||||
ClsGenerales ObjGeneral = new ClsGenerales();
|
||||
|
||||
if (ObjGeneral.GetInvEntregaAlmacenRutaRep( -1, UsuarioActual.CveEmpresa, -1, new DateTime(1900,01,01), new DateTime(9000, 01, 01),-1, CveTimbre)) {
|
||||
|
||||
if (ObjGeneral.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
if (CveDireccionOrigen > 0)
|
||||
{
|
||||
DVDireccionOrigen.Visible = true;
|
||||
|
||||
LnkDireccionOrigen.Text = ObjGeneral.DtResultados.Rows[0]["DireccionOrigen"].ToString() + " <i class='fa fa-search' aria-hidden='true'></i>";
|
||||
}
|
||||
if (CveDireccionDestino > 0)
|
||||
{
|
||||
DVDireccionDestino.Visible = true;
|
||||
LnkDireccionDestino.Text = ObjGeneral.DtResultados.Rows[0]["Direccion"].ToString() + " <i class='fa fa-search' aria-hidden='true'></i>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ObjGeneral.Dispose();
|
||||
UpModalDirecciones.Update();
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void CargaModalCombosDirecciones(int CveCliente, int CveDireccionOrigen, int CveAlmacen )
|
||||
{
|
||||
|
||||
DdlModalDireccionOrigen.Items.Clear();
|
||||
DdlModalDireccionDestino.Items.Clear();
|
||||
//DdlModalDireccionOrigen.Items.Clear();
|
||||
//DdlModalDireccionDestino.Items.Clear();
|
||||
|
||||
DataTable DTDireccionesCliente = new DataTable();
|
||||
ClsClientes ObjClientes = new ClsClientes();
|
||||
if (ObjClientes.DireccionEnvioGet(-1, CveCliente, -1))
|
||||
{
|
||||
DTDireccionesCliente = ObjClientes.DtResultados ;
|
||||
}
|
||||
ObjClientes.Dispose();
|
||||
//DataTable DTDireccionesCliente = new DataTable();
|
||||
//ClsClientes ObjClientes = new ClsClientes();
|
||||
//if (ObjClientes.DireccionEnvioGet(-1, CveCliente, -1))
|
||||
//{
|
||||
// DTDireccionesCliente = ObjClientes.DtResultados ;
|
||||
//}
|
||||
//ObjClientes.Dispose();
|
||||
|
||||
DdlModalDireccionDestino.DataSource = DTDireccionesCliente;
|
||||
DdlModalDireccionDestino.DataBind();
|
||||
DdlModalDireccionDestino.Items.Insert(0,new ListItem("Seleccione Una", "-1"));
|
||||
//DdlModalDireccionDestino.DataSource = DTDireccionesCliente;
|
||||
//DdlModalDireccionDestino.DataBind();
|
||||
//DdlModalDireccionDestino.Items.Insert(0,new ListItem("Seleccione Una", "-1"));
|
||||
|
||||
string Almacen = get_GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen: CveAlmacen).FiltroPrimeroValor("Almacen", $"CveAlmacen = {CveAlmacen}");
|
||||
if (CveDireccionOrigen > 0)
|
||||
{
|
||||
DdlModalDireccionOrigen.DataSource = DTDireccionesCliente.FiltraParametros($"CveDireccionEnvio = {CveDireccionOrigen}");
|
||||
DdlModalDireccionOrigen.DataBind();
|
||||
DdlModalDireccionOrigen.Items.Insert(0, new ListItem($"Almacen: {Almacen}", "-2"));
|
||||
}else
|
||||
{
|
||||
DdlModalDireccionOrigen.Items.Insert(0, new ListItem($"Almacen: {Almacen}", "-2"));
|
||||
}
|
||||
DTDireccionesCliente.Dispose();
|
||||
//string Almacen = get_GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen: CveAlmacen).FiltroPrimeroValor("Almacen", $"CveAlmacen = {CveAlmacen}");
|
||||
//if (CveDireccionOrigen > 0)
|
||||
//{
|
||||
// DdlModalDireccionOrigen.DataSource = DTDireccionesCliente.FiltraParametros($"CveDireccionEnvio = {CveDireccionOrigen}");
|
||||
// DdlModalDireccionOrigen.DataBind();
|
||||
// DdlModalDireccionOrigen.Items.Insert(0, new ListItem($"Almacen: {Almacen}", "-2"));
|
||||
//}else
|
||||
//{
|
||||
// DdlModalDireccionOrigen.Items.Insert(0, new ListItem($"Almacen: {Almacen}", "-2"));
|
||||
//}
|
||||
|
||||
|
||||
|
||||
//DTDireccionesCliente.Dispose();
|
||||
}
|
||||
|
||||
|
||||
@@ -335,14 +481,16 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
LinkButton LnkCancelarFolioFiscal = (LinkButton)sender;
|
||||
GridViewRow GvRow = (GridViewRow)LnkCancelarFolioFiscal.BindingContainer;
|
||||
int cvetimbre = GvRow.DataKey("CveTimbre").ToEntero();
|
||||
string TimbreTipoDocto = GvRow.DataKey("TimbreTipoDocto");
|
||||
|
||||
Timbres ObjTimbres = new Timbres("Tra", cvetimbre, UsuarioActual);
|
||||
Timbres ObjTimbres = new Timbres(TimbreTipoDocto, cvetimbre, UsuarioActual);
|
||||
StringBuilder MensajeAlert = new StringBuilder();
|
||||
MensajeAlert.AppendFormat("Folio: <b>{0}</b> ", ObjTimbres.ObjFactura.SerieFolio);
|
||||
if (ObjTimbres.MsgError =="" && ObjTimbres.Timbrar())
|
||||
{
|
||||
MensajeAlert.AppendFormat("<a class='texto' style='color:#337ab7' href='/Compras/PopUpVerFactura.aspx?P={0}' target='_blank'>XML <i class='fa fa-file'></i></i></a> ", ModExtensiones.Encripta(String.Format("OP=DesXmlTra&CveTimbre={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", cvetimbre, "XML", ObjTimbres.ObjFactura.SerieFolio, ObjTimbres.ObjFactura.TipoDocto)));
|
||||
Alert(MensajeAlert.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
CargaDatos();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -429,7 +577,9 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
bool ProcesoOK = true ;
|
||||
|
||||
ClsGenerales ObjGral = new ClsGenerales();
|
||||
if(!ObjGral.UpdateInvEntregaAlmacenRuta(CveEntregaAlmacen,DdlModalDireccionOrigen.SelectedValue.ToEntero(), DdlModalDireccionDestino.SelectedValue.ToEntero(), DdlModalChofer.SelectedValue.ToEntero(), DdlModalCamion.SelectedValue.ToEntero(), TxtmodalFechaEntrega.Text.ToDate(), UsuarioActual.CveEmpresa))
|
||||
if(!ObjGral.UpdateInvEntregaAlmacenRuta(CveEntregaAlmacen,-1,-1, DdlModalChofer.SelectedValue.ToEntero(), DdlModalCamion.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), UsuarioActual.CveEmpresa,
|
||||
TxtFechaLlegada.Text.ToDate(), CveCamionRemolque1: DdlRemolque1.SelectedValue.ToEntero(), CveCamionRemolque2: DdlRemolque2.SelectedValue.ToEntero(), Distancia: TxtDistancia.Text.ToEntero(),
|
||||
ConfigCartaPorte: DdlConfigAuto.SelectedValue))
|
||||
{
|
||||
ProcesoOK = false;
|
||||
}
|
||||
@@ -455,6 +605,9 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
|
||||
e.Row.Cells[11].Text = "";
|
||||
|
||||
LinkButton LnkEditar = e.Row.FCLinkButton("LnkEditar");
|
||||
LinkButton LnkTimbrar = e.Row.FCLinkButton("LnkTimbrar");
|
||||
LinkButton LnkCancelaTimbre = e.Row.FCLinkButton("LnkCancelaTimbre");
|
||||
@@ -469,9 +622,35 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
LnkTimbrar.Visible = true;
|
||||
}
|
||||
|
||||
if (e.Row.DataKey("TimbreTipoDocto") == "Man")
|
||||
{
|
||||
e.Row.FCLinkButton("LnkEditarDirOrigen").Visible = true;
|
||||
e.Row.FCLinkButton("LnkEditarDirDestino").Visible = true;
|
||||
}
|
||||
|
||||
if (e.Row.DataKey("Estatus").ToEntero() == 1)
|
||||
{
|
||||
LnkCancelaTimbre.Visible = true;
|
||||
|
||||
if (bool.Parse(e.Row.DataKey("AplicaCP")))
|
||||
{
|
||||
e.Row.Cells[10].Text = "<a CssClass='btn btn-circle btn-sm blue' target= '_blank' href=\"/Compras/PopUpVerFactura.aspx?P=" + Extensiones.ModExtensiones.Encripta(String.Format("OP=CARPOTIMBRE&CVETIMBRE={0}", e.Row.DataKey("CveTimbre"))) + "\" ><i class='fa fa-file-pdf-o'></i></a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Row.Cells[10].Text = "<a CssClass='btn btn-circle btn-sm blue' target= '_blank' href=\"/Compras/PopUpVerFactura.aspx?P=" + Extensiones.ModExtensiones.Encripta(String.Format("OP=CARPO&CVETIMBRE={0}", e.Row.DataKey("CveTimbre"))) + "\" ><i class='fa fa-file-pdf-o'></i></a>";
|
||||
}
|
||||
|
||||
string ArchivoXML = String.Format("{0}/XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta, e.Row.DataKey("TimbreTipoDocto"), e.Row.DataKey("SerieFolio"));
|
||||
|
||||
if (File.Exists(ArchivoXML))
|
||||
{
|
||||
e.Row.Cells[11].Text = "<a CssClass='btn btn-circle btn-sm blue' target= '_blank' href=\"/Compras/PopUpVerFactura.aspx?P=" + Extensiones.ModExtensiones.Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", -1, "XML", e.Row.DataKey("SerieFolio"), e.Row.DataKey("TimbreTipoDocto"))) + "\" ><i class='fa fa-file-code-o'></i></a>";
|
||||
}
|
||||
|
||||
}else
|
||||
{
|
||||
e.Row.Cells[10].Text = "";
|
||||
}
|
||||
|
||||
if (e.Row.DataKey("Estatus").ToEntero() == 2)
|
||||
@@ -482,7 +661,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
|
||||
switch (e.Row.DataKey("Tipo"))
|
||||
{
|
||||
case "E":
|
||||
case "E":
|
||||
e.Row.FCLabel("LtTipo").CssClass = "label label-sm label-success";
|
||||
break;
|
||||
case "T":
|
||||
@@ -495,8 +674,450 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void CargaPersonalChofer()
|
||||
{
|
||||
DdlModalChofer.Items.Clear();
|
||||
|
||||
ClsAcarreos ObjAcar = new ClsAcarreos();
|
||||
|
||||
if (ObjAcar.GetChofer(-1, UsuarioActual.CveEmpresa, 1, -1))
|
||||
{
|
||||
DdlModalChofer.DataSource = ObjAcar.DtResultados;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
ObjAcar.Dispose();
|
||||
|
||||
|
||||
DdlModalChofer.DataBind();
|
||||
|
||||
DdlModalChofer.Items.Insert(0, new ListItem("Seleccione Uno", "-1"));
|
||||
|
||||
|
||||
UpModalEditarentrega.Update();
|
||||
}
|
||||
|
||||
protected void RdTipo_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
CargaPersonalChofer();
|
||||
}
|
||||
protected void DdlModalCamion_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
DvRemolque1.Visible = false;
|
||||
DvRemolque2.Visible = false;
|
||||
|
||||
DdlRemolque1.SelectedValueExist(-1);
|
||||
DdlRemolque2.SelectedValueExist(-1);
|
||||
|
||||
if (DdlModalCamion.SelectedValue.ToEntero() > 0)
|
||||
{
|
||||
using (ClsInventarios ObjInv = new ClsInventarios())
|
||||
{
|
||||
if (ObjInv.GetCamiones(DdlModalCamion.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, 1))
|
||||
{
|
||||
DdlConfigAuto.SelectedValueExist(ObjInv.DtResultados.FiltroPrimeroValor("ConfigCartaPorte"));
|
||||
DdlConfigAuto_SelectedIndexChanged(null, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UpModalEditarentrega.Update();
|
||||
}
|
||||
|
||||
public bool RequiereRemolque
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["RequiereRemolque"] == null)
|
||||
ViewState["RequiereRemolque"] = false;
|
||||
|
||||
return bool.Parse(ViewState["RequiereRemolque"].ToString());
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["RequiereRemolque"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool MostrarRemolques
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["MostrarRemolques"] == null)
|
||||
ViewState["MostrarRemolques"] = false;
|
||||
|
||||
return bool.Parse(ViewState["MostrarRemolques"].ToString());
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["MostrarRemolques"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void DdlConfigAuto_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
ValidaConfiguracionVeiculo();
|
||||
}
|
||||
|
||||
|
||||
private void ValidaConfiguracionVeiculo()
|
||||
{
|
||||
DvRemolque1.Visible = false;
|
||||
DvRemolque2.Visible = false;
|
||||
|
||||
DdlRemolque1.SelectedValueExist(-1);
|
||||
DdlRemolque2.SelectedValueExist(-1);
|
||||
|
||||
if (DdlConfigAuto.SelectedIndex > 0)
|
||||
{
|
||||
using (ClsGenerales ObjGrales = new ClsGenerales())
|
||||
{
|
||||
if (ObjGrales.GetCartaPorteConfigAutoTransportes())
|
||||
{
|
||||
string Remolque = ObjGrales.DtResultados.FiltroPrimeroValor("Remolque", $" ClaveConfigAutoTransporte ='{DdlConfigAuto.SelectedValue}'");
|
||||
|
||||
|
||||
if (Remolque == "1")
|
||||
{
|
||||
RequiereRemolque = true;
|
||||
MostrarRemolques = true;
|
||||
}
|
||||
|
||||
if (Remolque == "0, 1")
|
||||
{
|
||||
RequiereRemolque = false;
|
||||
MostrarRemolques = true;
|
||||
}
|
||||
|
||||
if (Remolque == "0")
|
||||
{
|
||||
RequiereRemolque = false;
|
||||
MostrarRemolques = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
RequiereRemolque = false;
|
||||
MostrarRemolques = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (RequiereRemolque | MostrarRemolques)
|
||||
DvRemolque1.Visible = true;
|
||||
|
||||
if (!RequiereRemolque)
|
||||
DvConfiguracionVeiculo.Visible = false;
|
||||
else
|
||||
DvConfiguracionVeiculo.Visible = true;
|
||||
|
||||
|
||||
UpModalEditarentrega.Update();
|
||||
}
|
||||
|
||||
protected void DdlRemolque1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
DdlRemolque2.Items.Clear();
|
||||
|
||||
if (DdlRemolque1.SelectedValue.ToEntero() > 0)
|
||||
{
|
||||
DvRemolque2.Visible = true;
|
||||
|
||||
using (ClsInventarios ObjInv = new ClsInventarios())
|
||||
{
|
||||
if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2))
|
||||
DdlRemolque2.DataSource = ObjInv.DtResultados.FiltraParametros($"CveCamion <> {DdlRemolque1.SelectedValue.ToEntero()}");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
DdlRemolque2.DataBind();
|
||||
}
|
||||
catch { }
|
||||
|
||||
}
|
||||
else
|
||||
DvRemolque2.Visible = false;
|
||||
|
||||
DdlRemolque2.Items.Insert(0, new ListItem("Seleccione uno", "-1"));
|
||||
|
||||
UpModalEditarentrega.Update();
|
||||
}
|
||||
|
||||
private bool validarRemolques()
|
||||
{
|
||||
bool Respuesta = false;
|
||||
|
||||
|
||||
if (RequiereRemolque & DdlRemolque1.SelectedValue.ToEntero() <= 0)
|
||||
Alert("La configuración de la carta porte requiere que seleccione un remolque", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
|
||||
if (RequiereRemolque & DdlRemolque1.SelectedValue.ToEntero() > 0)
|
||||
Respuesta = true;
|
||||
|
||||
|
||||
return Respuesta;
|
||||
}
|
||||
|
||||
|
||||
public void CargarCamiones()
|
||||
{
|
||||
DdlModalCamion.Items.Clear();
|
||||
DdlConfigAuto.Items.Clear();
|
||||
|
||||
using (ClsInventarios ObjInv = new ClsInventarios())
|
||||
{
|
||||
if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1))
|
||||
DdlModalCamion.DataSource = ObjInv.DtResultados;
|
||||
|
||||
|
||||
if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2))
|
||||
DdlRemolque1.DataSource = ObjInv.DtResultados;
|
||||
}
|
||||
|
||||
DdlModalCamion.DataBind();
|
||||
DdlModalCamion.Items.Insert(0, new ListItem("Seleccione uno", "-1"));
|
||||
|
||||
|
||||
DdlRemolque1.DataBind();
|
||||
DdlRemolque1.Items.Insert(0, new ListItem("Seleccione uno", "-1"));
|
||||
|
||||
|
||||
using (ClsGenerales ObjGrales = new ClsGenerales())
|
||||
{
|
||||
if (ObjGrales.GetCartaPorteConfigAutoTransportes())
|
||||
DdlConfigAuto.DataSource = ObjGrales.DtResultados;
|
||||
}
|
||||
|
||||
DdlConfigAuto.DataBind();
|
||||
DdlConfigAuto.Items.Insert(0, new ListItem("Seleccione una", "-1"));
|
||||
}
|
||||
|
||||
private void CargaCombosDirecionesClientesSAT()
|
||||
{
|
||||
CargaDirClientePais();
|
||||
CargaDirClienteEstado();
|
||||
CargaDirClienteMunicipio();
|
||||
CargaDirClienteLocalidad();
|
||||
CargaDirClienteColonia();
|
||||
}
|
||||
|
||||
|
||||
private void CargaDirClientePais()
|
||||
{
|
||||
DdlDirClientePais.DataSource = GlobalDTGralPaises;
|
||||
DdlDirClientePais.DataBind();
|
||||
DdlDirClientePais.SelectedValueExist("151");
|
||||
}
|
||||
|
||||
private void CargaDirClienteEstado()
|
||||
{
|
||||
DdlDirClienteEstado.Items.Clear();
|
||||
if (DdlDirClientePais.SelectedValue.ToEntero() > 0)
|
||||
DdlDirClienteEstado.DataSource = get_GlobalDTGralEstados("-1", DdlDirClientePais.SelectedValue.ToEntero());
|
||||
DdlDirClienteEstado.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
DdlDirClienteEstado.DataBind();
|
||||
}
|
||||
|
||||
private void CargaDirClienteMunicipio()
|
||||
{
|
||||
DdlDirClienteMunicipio.Items.Clear();
|
||||
if (DdlDirClienteEstado.SelectedValue.ToEntero() > 0)
|
||||
DdlDirClienteMunicipio.DataSource = get_GlobalDTGralMunicipios("-1", DdlDirClienteEstado.SelectedValue.ToEntero());
|
||||
DdlDirClienteMunicipio.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
DdlDirClienteMunicipio.DataBind();
|
||||
}
|
||||
|
||||
private void CargaDirClienteColonia()
|
||||
{
|
||||
DdlDirClienteColonia.Items.Clear();
|
||||
if (DdlDirClienteMunicipio.SelectedValue.ToEntero() > 0)
|
||||
DdlDirClienteColonia.DataSource = get_GlobalDTGralColonias("-1", "-1", "-1", DdlDirClienteMunicipio.SelectedValue.ToEntero(), CodigoPostal: TxtEnvioCP.Text.Trim().Length > 0 ? TxtEnvioCP.Text.ToEntero() : -1);
|
||||
DdlDirClienteColonia.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
DdlDirClienteColonia.DataBind();
|
||||
}
|
||||
|
||||
|
||||
protected void CargaDirClienteLocalidad()
|
||||
{
|
||||
DdlDirClienteLocalidad.Items.Clear();
|
||||
if (DdlDirClienteEstado.SelectedValue.ToEntero() > 0)
|
||||
{
|
||||
DdlDirClienteLocalidad.DataSource = get_GlobalDTLocalidad(DdlDirClienteEstado.SelectedValue.ToEntero(), DdlDirClienteMunicipio.SelectedValue.ToEntero());
|
||||
DdlDirClienteLocalidad.DataBind();
|
||||
}
|
||||
|
||||
DdlDirClienteLocalidad.Items.Insert(0, new ListItem("Seleccione una", "-1"));
|
||||
}
|
||||
|
||||
|
||||
protected void DdlDirClientePais_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
CargaDirClienteEstado();
|
||||
CargaDirClienteMunicipio();
|
||||
CargaDirClienteColonia();
|
||||
CargaDirClienteLocalidad();
|
||||
}
|
||||
|
||||
protected void DdlDirClienteEstado_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
CargaDirClienteMunicipio();
|
||||
CargaDirClienteColonia();
|
||||
CargaDirClienteLocalidad();
|
||||
}
|
||||
|
||||
protected void DdlDirClienteMunicipio_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
CargaDirClienteColonia();
|
||||
CargaDirClienteLocalidad();
|
||||
}
|
||||
|
||||
|
||||
protected void BtnDirClienteValidar_Click(object sender, EventArgs e)
|
||||
{
|
||||
DirClientevalidaCodigoPostal();
|
||||
}
|
||||
|
||||
|
||||
protected void DdlDirClienteColonia_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
DirClientevalidaCodigoPostal();
|
||||
}
|
||||
|
||||
private void DirClientevalidaCodigoPostal()
|
||||
{
|
||||
int CPTxt = TxtEnvioCP.Text.ToEntero();
|
||||
|
||||
int CveColonia = DdlDirClienteColonia.SelectedValue.ToEntero();
|
||||
|
||||
if (CPTxt > 0 & CveColonia > 0)
|
||||
{
|
||||
int CP = get_GlobalDTGralColonias("-1", "-1", "-1", CveColonia: CveColonia).FiltroPrimeroValor("CP", "").ToEntero();
|
||||
if (CPTxt != CP)
|
||||
Alert("El código postal selecionado es diferente del codigo postal de la Colonia.", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void EditDireccionOrigen_Click(object sender, EventArgs e)
|
||||
{
|
||||
//GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
//int CveDireccionOrigen = GvRow.DataKey("CveDireccionOrigen").ToEntero();
|
||||
CveDireccionEditar = CveDireccionOrigen;
|
||||
LblTitulodireccion.Text = "Actualizar dirección origen";
|
||||
CargaDatosDireccion(CveDireccionOrigen);
|
||||
}
|
||||
|
||||
public void EditDireccionDestino_Click(object sender, EventArgs e)
|
||||
{
|
||||
//GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
//LblTitulodireccion.Text = "Actualizar dirección destino";
|
||||
//int CveDireccionDestino = GvRow.DataKey("CveDireccionDestino").ToEntero();
|
||||
CveDireccionEditar = CveDireccionDestino;
|
||||
LblTitulodireccion.Text = "Actualizar dirección Destino";
|
||||
CargaDatosDireccion(CveDireccionDestino);
|
||||
}
|
||||
|
||||
|
||||
private void CargaDatosDireccion(int CveDireccion)
|
||||
{
|
||||
|
||||
ClsClientes ObjClientes = new ClsClientes();
|
||||
|
||||
DataTable DT = new DataTable();
|
||||
|
||||
if (ObjClientes.DireccionEnvioGet(CveDireccion, -1,-1))
|
||||
{
|
||||
DT = ObjClientes.DtResultados;
|
||||
}
|
||||
|
||||
ObjClientes.Dispose();
|
||||
|
||||
if (DT.Rows.Count > 0)
|
||||
{
|
||||
TxtEnvioDireccion.Text = DT.Rows[0]["EnvioDireccion"].ToString();
|
||||
TxtEnvioNoExt.Text = DT.Rows[0]["EnvioNoExt"].ToString();
|
||||
TxtEnvioNoInt.Text = DT.Rows[0]["EnvioNoInt"].ToString();
|
||||
|
||||
TxtEnvioCP.Text = DT.Rows[0]["EnvioCP"].ToString();
|
||||
// TxtEnvioTel.Text = GvRow.DataKey("EnvioTel")
|
||||
|
||||
DdlDirClientePais.SelectedValueExist(DT.Rows[0]["CvePais"].ToString());
|
||||
CargaDirClienteEstado();
|
||||
DdlDirClienteEstado.SelectedValueExist(DT.Rows[0]["CveEstado"].ToString());
|
||||
CargaDirClienteMunicipio();
|
||||
DdlDirClienteMunicipio.SelectedValueExist(DT.Rows[0]["CveMunicipio"].ToString());
|
||||
CargaDirClienteColonia();
|
||||
DdlDirClienteLocalidad.SelectedValueExist(DT.Rows[0]["CveLocalidad"].ToString());
|
||||
CargaDirClienteLocalidad();
|
||||
|
||||
DdlDirClienteColonia.SelectedValueExist(DT.Rows[0]["CveColonia"].ToString());
|
||||
}
|
||||
|
||||
UpModalDVDireccionEnvio.Update();
|
||||
RegistraScript("$('#divAddDireccionEnvio').modal('show');");
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void BtnAgregarDireccion_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
ClsClientes ObjCli = new ClsClientes();
|
||||
bool ErrorProceso = false;
|
||||
|
||||
//CveDireccionEditar
|
||||
if (!ObjCli.DireccionEnvioUpdate(-1, TxtEnvioDireccion.Text, TxtEnvioNoExt.Text, TxtEnvioNoInt.Text, "-1", "-1", "-1", TxtEnvioCP.Text.ToEntero(), "-1", UsuarioActual.CveUsuario, -1, CveDireccionEditar, "-1", -1, "-1",
|
||||
DdlDirClientePais.SelectedValue.ToEntero(), DdlDirClienteEstado.SelectedValue.ToEntero(), DdlDirClienteMunicipio.SelectedValue.ToEntero(), DdlDirClienteLocalidad.SelectedValue.ToEntero(), DdlDirClienteColonia.SelectedValue.ToEntero())){
|
||||
ErrorProceso = true;
|
||||
}
|
||||
|
||||
ObjCli.Dispose();
|
||||
|
||||
if (!ErrorProceso)
|
||||
{
|
||||
Alert("Dirección actualizada correctamente.");
|
||||
RegistraScript("$('#divAddDireccionEnvio').modal('hide');");
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
|
||||
ModalActualizaDirecciones(CveTimbre);
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void LnkAgregarDireccion_Click(object sender, EventArgs e)
|
||||
{
|
||||
TxtEnvioDireccion.Text = "";
|
||||
TxtEnvioNoExt.Text = "";
|
||||
TxtEnvioNoInt.Text = "";
|
||||
TxtEnvioCP.Text = "";
|
||||
|
||||
CargaCombosDirecionesClientesSAT();
|
||||
TxtFechaLlegada.Text = "";
|
||||
|
||||
|
||||
|
||||
UpModalDVDireccionEnvio.Update();
|
||||
RegistraScript("$('#divAddDireccionEnvio').modal('show');");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -509,4 +1130,3 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -224,11 +224,41 @@
|
||||
<div class="row rowpadding">
|
||||
<label class="col-md-3">Unidad:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList runat="server" ID="DdlUnidadCamion" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca"></asp:DropDownList>
|
||||
<asp:DropDownList runat="server" ID="DdlUnidadCamion" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" OnSelectedIndexChanged="DdlUnidadCamionActivoFijo_SelectedIndexChanged"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlUnidadCamion" runat="server" Enabled="false" ControlToValidate="DdlUnidadCamion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceDdlUnidadCamion" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlUnidadCamion" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row rowpadding" runat="server" id="DvConfiguracionVeiculo" visible="false">
|
||||
<label class="col-md-3">Configuración:</label>
|
||||
<div class="col-md-9">
|
||||
<%--<asp:DropDownList runat="server" ID="DropDownList1" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveActivoFijo" DataTextField="CodigoDescripcion"></asp:DropDownList>--%>
|
||||
<asp:DropDownList ID="DdlConfigAuto" CssClass="form-control input-sm select2me" Width="100%" runat="server" AppendDataBoundItems="true" AutoPostBack="true" OnSelectedIndexChanged="DdlConfigAuto_SelectedIndexChanged" CausesValidation="true" DataTextField="ClaveConfigAutoTransporteDescripcion" DataValueField="ClaveConfigAutoTransporte" Style="padding: 0px">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlConfigAuto" runat="server" Enabled="false" ControlToValidate="DdlConfigAuto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Configuración Carta Porte''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCERfvDdlConfigAuto" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlConfigAuto" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row rowpadding" runat="server" id="DvRemolque1" visible="false">
|
||||
<label class="col-md-3">Remolque 1:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList runat="server" ID="DdlRemolque1" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" OnSelectedIndexChanged="DdlRemolque1_SelectedIndexChanged"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row rowpadding" runat="server" id="DvRemolque2" visible="false">
|
||||
<label class="col-md-3">Remolque 2:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList runat="server" ID="DdlRemolque2" AutoPostBack="true" Width="100%" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" ></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row rowpadding">
|
||||
<label class="col-md-3">F. Salida:</label>
|
||||
<div class="col-md-9" style="padding-top: 0px;">
|
||||
|
||||
@@ -673,6 +673,15 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim CveClasificacion As Integer
|
||||
|
||||
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||
|
||||
|
||||
If ChkEmitirTimbrado.Checked AndAlso ChkEmitirCartaPorte.Checked Then
|
||||
If Not ValidaPSSAT(DrPS) Then
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If DrPS IsNot Nothing Then
|
||||
CveClasificacion = DrPS("CveClasificacion").ToString.ToEntero
|
||||
Dim DrUM = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimero($"CveUnidadMedida = {CveUnidadMedida}")
|
||||
@@ -1190,7 +1199,8 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim CveSubProyectoTimbre As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen = {DdlAlmacenOrigen.SelectedValue}").Rows(0)("CveSubProyecto").ToString.ToEntero
|
||||
Dim Fechallegada As DateTime = (TxtFechaLlegada.Text & " 23:59:59").ToDateTime
|
||||
|
||||
Dim CveEntregaAlmacen As Integer = ObjGral.AddInvEntregaAlmacenRuta(CveSubProyectoTimbre, -1, -1, CveMovimientoSalida, DdlChofer.SelectedValue.ToEntero, DdlUnidadCamion.SelectedValue.ToEntero, TxtFechaEntrega.Text.ToDate, Fechallegada, "T", "", "", MinFecha, 1, 1, 1)
|
||||
Dim CveEntregaAlmacen As Integer = ObjGral.AddInvEntregaAlmacenRuta(CveSubProyectoTimbre, -1, -1, CveMovimientoSalida, DdlChofer.SelectedValue.ToEntero, DdlUnidadCamion.SelectedValue.ToEntero, TxtFechaEntrega.Text.ToDate, TxtFechaLlegada.Text.ToDate, "T", "", "", MinFecha, 1, 1, TxtDistancia.Text.ToEntero,
|
||||
ConfigCartaPorte:=DdlConfigAuto.SelectedValue, CveCamionRemolque1:=DdlRemolque1.SelectedValue.ToEntero, CveCamionRemolque2:=DdlRemolque2.SelectedValue.ToEntero)
|
||||
|
||||
If CveEntregaAlmacen > 0 Then
|
||||
CveTimbre = ObjGral.AddGralTimbre("Tra", CveSubProyectoTimbre, TxtFechaEntrega.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen:=CveEntregaAlmacen, AplicaCP:=ChkEmitirCartaPorte.Checked)
|
||||
@@ -2962,10 +2972,47 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End Sub
|
||||
|
||||
Public Sub CargarCamiones()
|
||||
|
||||
DdlConfigAuto.Items.Clear()
|
||||
DdlUnidadCamion.Items.Clear()
|
||||
|
||||
DdlUnidadCamion.DataSource = GlobalDTInvCamiones(UsuarioActual.CveEmpresa)
|
||||
'DdlUnidadCamion.DataSource = GlobalDTInvCamiones(UsuarioActual.CveEmpresa)
|
||||
'DdlUnidadCamion.DataBind()
|
||||
|
||||
|
||||
|
||||
Using ObjInv As New ClsInventarios
|
||||
|
||||
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1) Then
|
||||
DdlUnidadCamion.DataSource = ObjInv.DtResultados
|
||||
End If
|
||||
|
||||
|
||||
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2) Then
|
||||
DdlRemolque1.DataSource = ObjInv.DtResultados
|
||||
End If
|
||||
|
||||
End Using
|
||||
|
||||
DdlUnidadCamion.DataBind()
|
||||
DdlUnidadCamion.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
|
||||
|
||||
DdlRemolque1.DataBind()
|
||||
DdlRemolque1.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
|
||||
|
||||
|
||||
Using ObjGrales As New ClsGenerales
|
||||
|
||||
If ObjGrales.GetCartaPorteConfigAutoTransportes() Then
|
||||
DdlConfigAuto.DataSource = ObjGrales.DtResultados
|
||||
End If
|
||||
|
||||
End Using
|
||||
|
||||
DdlConfigAuto.DataBind()
|
||||
DdlConfigAuto.Items.Insert(0, New ListItem("Seleccione una", "-1"))
|
||||
|
||||
'Using ObjGral As New ClsGenerales
|
||||
' If ObjGral.GetCartaPorteConfigAutoTransportes() Then
|
||||
@@ -3092,6 +3139,207 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "remolques"
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub DdlUnidadCamionActivoFijo_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
DvRemolque1.Visible = False
|
||||
DvRemolque2.Visible = False
|
||||
|
||||
DdlRemolque1.SelectedValueExist(-1)
|
||||
DdlRemolque2.SelectedValueExist(-1)
|
||||
|
||||
If DdlUnidadCamion.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
|
||||
Using ObjInv As New ClsInventarios
|
||||
|
||||
If ObjInv.GetCamiones(DdlUnidadCamion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 1) Then
|
||||
DdlConfigAuto.SelectedValueExist(ObjInv.DtResultados.FiltroPrimeroValor("ConfigCartaPorte"))
|
||||
DdlConfigAuto_SelectedIndexChanged(Nothing, Nothing)
|
||||
End If
|
||||
|
||||
End Using
|
||||
|
||||
|
||||
End If
|
||||
|
||||
UpEmitirTransitorio.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Property RequiereRemolque As Boolean
|
||||
Get
|
||||
If ViewState("RequiereRemolque") Is Nothing Then
|
||||
ViewState("RequiereRemolque") = False
|
||||
End If
|
||||
|
||||
Return Boolean.Parse(ViewState("RequiereRemolque").ToString)
|
||||
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("RequiereRemolque") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Property MostrarRemolques As Boolean
|
||||
Get
|
||||
If ViewState("MostrarRemolques") Is Nothing Then
|
||||
ViewState("MostrarRemolques") = False
|
||||
End If
|
||||
|
||||
Return Boolean.Parse(ViewState("MostrarRemolques").ToString)
|
||||
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("MostrarRemolques") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Protected Sub DdlConfigAuto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
ValidaConfiguracionVeiculo()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ValidaConfiguracionVeiculo()
|
||||
DvRemolque1.Visible = False
|
||||
DvRemolque2.Visible = False
|
||||
|
||||
DdlRemolque1.SelectedValueExist(-1)
|
||||
DdlRemolque2.SelectedValueExist(-1)
|
||||
|
||||
If DdlConfigAuto.SelectedIndex > 0 Then
|
||||
|
||||
Using ObjGrales As New ClsGenerales
|
||||
If ObjGrales.GetCartaPorteConfigAutoTransportes() Then
|
||||
Dim Remolque As String = ObjGrales.DtResultados.FiltroPrimeroValor("Remolque", $" ClaveConfigAutoTransporte ='{DdlConfigAuto.SelectedValue}'")
|
||||
|
||||
|
||||
If Remolque = "1" Then
|
||||
RequiereRemolque = True
|
||||
MostrarRemolques = True
|
||||
End If
|
||||
|
||||
If Remolque = "0, 1" Then
|
||||
RequiereRemolque = False
|
||||
MostrarRemolques = True
|
||||
End If
|
||||
|
||||
If Remolque = "0" Then
|
||||
RequiereRemolque = False
|
||||
MostrarRemolques = False
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
|
||||
Else
|
||||
RequiereRemolque = False
|
||||
MostrarRemolques = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
If RequiereRemolque Or MostrarRemolques Then
|
||||
DvRemolque1.Visible = True
|
||||
End If
|
||||
|
||||
If Not RequiereRemolque Then
|
||||
DvConfiguracionVeiculo.Visible = False
|
||||
Else
|
||||
DvConfiguracionVeiculo.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
UpEmitirTransitorio.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlRemolque1_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
DdlRemolque2.Items.Clear()
|
||||
|
||||
If DdlRemolque1.SelectedValue.ToEntero > 0 Then
|
||||
DvRemolque2.Visible = True
|
||||
|
||||
Using ObjInv As New ClsInventarios
|
||||
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2) Then
|
||||
DdlRemolque2.DataSource = ObjInv.DtResultados.FiltraParametros($"CveCamion <> {DdlRemolque1.SelectedValue.ToEntero}")
|
||||
End If
|
||||
End Using
|
||||
|
||||
DdlRemolque2.DataBind()
|
||||
|
||||
|
||||
Else
|
||||
DvRemolque2.Visible = False
|
||||
End If
|
||||
|
||||
DdlRemolque2.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
UpEmitirTransitorio.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function validarRemolques() As Boolean
|
||||
Dim Respuesta As Boolean = False
|
||||
|
||||
|
||||
If RequiereRemolque And DdlRemolque1.SelectedValue.ToEntero <= 0 Then
|
||||
Alert("La configuración de la carta porte requiere que seleccione un remolque", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
If RequiereRemolque And DdlRemolque1.SelectedValue.ToEntero > 0 Then
|
||||
Respuesta = True
|
||||
End If
|
||||
|
||||
If Not RequiereRemolque Then
|
||||
Respuesta = True
|
||||
End If
|
||||
|
||||
Return Respuesta
|
||||
|
||||
End Function
|
||||
|
||||
Function ValidaPSSAT(DrPS As DataRow) As Boolean
|
||||
Dim Respuesta As Boolean = False
|
||||
|
||||
Dim CveSATPS As Integer = DrPS("CveSATPS").ToString.ToEntero
|
||||
Dim PesoKg As Decimal = DrPS("PesoKg").ToString.ToDecimal
|
||||
Dim SATClaveUnidadMedida As String = DrPS("SATClaveUnidadMedida").ToString.Trim
|
||||
|
||||
If CveSATPS > 0 And PesoKg > 0 And SATClaveUnidadMedida.Length > 0 Then
|
||||
Respuesta = True
|
||||
Else
|
||||
Respuesta = False
|
||||
Dim SBMensaje As New StringBuilder
|
||||
|
||||
SBMensaje.AppendLine("El producto seleccionado presenta la siguiente situación: <br>")
|
||||
|
||||
If CveSATPS <= 0 Then SBMensaje.AppendLine("-Producto SAT no asignado. <br>")
|
||||
|
||||
If PesoKg = 0 Then SBMensaje.AppendLine("-Producto sin peso definido. <br>")
|
||||
|
||||
If SATClaveUnidadMedida.Length = 0 Then SBMensaje.AppendLine("-Producto sin unidad de medida SAT asignada. ")
|
||||
|
||||
SBMensaje.AppendLine($"<br><br> <strong><a class='texto' target='_blank' href='../Ventas/ProductosServicios.aspx?CvePS={DrPS("CvePS").ToString}' > Corregir Producto </a></strong>")
|
||||
|
||||
Alert(SBMensaje.ToString, TipoMensaje.MsgAdvertencia)
|
||||
|
||||
End If
|
||||
|
||||
Return Respuesta
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user