This commit is contained in:
2022-05-09 09:45:12 -07:00
23 changed files with 194 additions and 266 deletions

View File

@@ -221,7 +221,7 @@
<ajax:ValidatorCalloutExtender ID="VceDdlChofer" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlChofer" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-1" style="text-align:left!important">
<asp:LinkButton ID="LnkAgregarChofer" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Agregar Chofer" />
<asp:LinkButton ID="LnkAgregarChofer" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Agregar Chofer" Visible="false" />
</div>
</div>
<div class="row rowpadding">
@@ -232,7 +232,7 @@
<ajax:ValidatorCalloutExtender ID="VceDdlUnidadCamion" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlUnidadCamion" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-1" style="text-align:left!important">
<asp:LinkButton ID="LnkAgregarUnidad" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Agregar Unidad" />
<asp:LinkButton ID="LnkAgregarUnidad" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Agregar Unidad" visible="false" />
</div>
</div>

View File

@@ -958,12 +958,12 @@ Partial Class Inventarios_CartaPorteManual
Using ObjInv As New ClsInventarios
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1) Then
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, Estatus:=1) Then
DdlUnidadCamion.DataSource = ObjInv.DtResultados
End If
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2) Then
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus:=1) Then
DdlRemolque1.DataSource = ObjInv.DtResultados
End If
@@ -1508,7 +1508,7 @@ Partial Class Inventarios_CartaPorteManual
DvRemolque2.Visible = True
Using ObjInv As New ClsInventarios
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2) Then
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus:=1) Then
DdlRemolque2.DataSource = ObjInv.DtResultados.FiltraParametros($"CveCamion <> {DdlRemolque1.SelectedValue.ToEntero}")
End If
End Using

View File

@@ -31,7 +31,8 @@
<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,CveConfigAutoTransporte,Anio,CveTipoCamion,CveProveedor,CveTipoPermisoSCT,NumPermisoSCT,NombreAseguradora,NumPolizaSeguro,NombreAseguradoraMedioAmbiente,NumPolizaSeguroMedioAmbiente,NombreAseguradoraCarga,NumPolizaSeguroCarga,LongitudCaja,LineaTransportacion,SCAC,CAAT,CveTipoRemolque,NumeroTrailer"
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False"
DataKeyNames="CveCamion,Placa,Especificacion,CveConfigAutoTransporte,Anio,CveTipoCamion,CveProveedor,CveTipoPermisoSCT,NumPermisoSCT,NombreAseguradora,NumPolizaSeguro,NombreAseguradoraMedioAmbiente,NumPolizaSeguroMedioAmbiente,NombreAseguradoraCarga,NumPolizaSeguroCarga,LongitudCaja,LineaTransportacion,SCAC,CAAT,CveTipoRemolque,NumeroTrailer,Estatus"
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" />
@@ -41,7 +42,7 @@
<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="Estatus" DataField="EstatuStr" 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" />
<asp:TemplateField ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
@@ -249,7 +250,8 @@
</div>
<div class="row">
<div class="col-md-12">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright" runat="server" id="Div1">
<asp:DropDownList ID="DdlProveedor" CssClass="form-control input-sm select2me " Width="100%" runat="server" AppendDataBoundItems="true" AutoPostBack="false" CausesValidation="true" DataValueField="CveProveedor" DataTextField="RazonSocial" Style="padding: 0px">
</asp:DropDownList>
@@ -258,6 +260,14 @@
<i></i>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright" runat="server">
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="form-control" />
<label for="<%= ChkEstatus.ClientID.ToString()%>">Activo:</label>
</div>
</div>
</div>
<%--<asp:CheckBox ID="ChkesRemolque" Checked="true" TextAlign="Left" Text="¿Es remolque?:" runat="server" AutoPostBack="true" OnCheckedChanged="ChkesRemolque_CheckedChanged" />--%>

View File

@@ -37,10 +37,9 @@ Partial Class Inventarios_CatUnidades
Public Sub CargaDatos()
Dim ObjInventarios As New ClsInventarios
If ObjInventarios.GetCamiones(-1, UsuarioActual.CveEmpresa) Then
If ObjInventarios.GetCamiones(-1, UsuarioActual.CveEmpresa, Estatus:=-1) Then
GvDatos.DataSource = ObjInventarios.DtResultados
Else
GvDatos.DataSource = Nothing
@@ -110,6 +109,7 @@ Partial Class Inventarios_CatUnidades
TxtNumeroTrailer.Text = ""
TxtSCAC.Text = ""
TxtCAAT.Text = ""
ChkEstatus.Checked = False
RdTipoUnidad.SelectedValue = "1"
LtlTituloModal.Text = "Agregar Unidad"
@@ -153,6 +153,7 @@ Partial Class Inventarios_CatUnidades
TxtLineaTransportacion.Text = GvRow.DataKey("LineaTransportacion")
TxtSCAC.Text = GvRow.DataKey("SCAC")
TxtCAAT.Text = GvRow.DataKey("CAAT")
ChkEstatus.Checked = If(Boolean.Parse(GvRow.DataKey("Estatus")), True, False)
'ChkesRemolque.Checked = (GvRow.DataKey("CveTipoCamion") = "2")
@@ -206,14 +207,14 @@ Partial Class Inventarios_CatUnidades
If CveCamion <= 0 Then
If ObjInventarios.AddCamiones(TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, UsuarioActual.CveEmpresa, DdlConfigAuto.SelectedValue.ToEntero, 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
TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text, ChkEstatus.Checked) Then
Alert("Unidad agregada correctamente")
Else
ErrorPrceso = True
End If
Else
If ObjInventarios.UpdateCamiones(CveCamion, TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, DdlConfigAuto.SelectedValue.ToEntero, 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
TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text, ChkEstatus.Checked) Then
Alert("Unidad actualizada correctamente")
Using objbase = New ClsClaseBase()
objbase.runQuerystr(String.Format("UPDATE Inv_Camiones SET CveProveedor={1} WHERE CveCamion={0}", CveCamion, DdlProveedor.SelectedValue))

View File

@@ -279,7 +279,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
{
ClsInventarios ObjInventarios = new ClsInventarios();
if (ObjInventarios.GetCamiones(-1, UsuarioActual.CveEmpresa) && ObjInventarios.DtResultados.Rows.Count > 0)
if (ObjInventarios.GetCamiones(-1, UsuarioActual.CveEmpresa,Estatus:1) && ObjInventarios.DtResultados.Rows.Count > 0)
{
DdlModalCamion.DataSource = ObjInventarios.DtResultados;
}
@@ -834,7 +834,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
using (ClsInventarios ObjInv = new ClsInventarios())
{
if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2))
if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2,Estatus:1))
DdlRemolque2.DataSource = ObjInv.DtResultados.FiltraParametros($"CveCamion <> {DdlRemolque1.SelectedValue.ToEntero()}");
}
try

View File

@@ -3355,7 +3355,7 @@ Partial Class Inventarios_TraspasoAlmacen
DvRemolque2.Visible = True
Using ObjInv As New ClsInventarios
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2) Then
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus:=1) Then
DdlRemolque2.DataSource = ObjInv.DtResultados.FiltraParametros($"CveCamion <> {DdlRemolque1.SelectedValue.ToEntero}")
End If
End Using