-- se quitó transportista
This commit is contained in:
@@ -33,7 +33,6 @@
|
|||||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Choferes">
|
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Choferes">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="Chofer" HeaderText="Chofer" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="Chofer" HeaderText="Chofer" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField DataField="Transportista" HeaderText="Transportista" ItemStyle-HorizontalAlign="Left" />
|
|
||||||
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField DataField="FechaIng" HeaderText="Fecha de Ingreso" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
<asp:BoundField DataField="FechaIng" HeaderText="Fecha de Ingreso" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Estatus">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Estatus">
|
||||||
@@ -83,10 +82,10 @@
|
|||||||
<asp:TextBox ID="TxtRFC" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
<asp:TextBox ID="TxtRFC" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||||
<label for="<%= TxtRFC.ClientID.ToString()%>">RFC:</label>
|
<label for="<%= TxtRFC.ClientID.ToString()%>">RFC:</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<%-- <div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlTransportista" DataValueField="CveTransportista" DataTextField="Transportista" runat="server" CssClass="form-control select2me" AppendDataBoundItems="true" Width="200px"></asp:DropDownList>
|
<asp:DropDownList ID="DdlTransportista" DataValueField="CveTransportista" DataTextField="Transportista" runat="server" CssClass="form-control select2me" AppendDataBoundItems="true" Width="200px"></asp:DropDownList>
|
||||||
<label for="<%= DdlTransportista.ClientID.ToString()%>">Transportista:</label>
|
<label for="<%= DdlTransportista.ClientID.ToString()%>">Transportista:</label>
|
||||||
</div>
|
</div>--%>
|
||||||
|
|
||||||
|
|
||||||
<div class="row ">
|
<div class="row ">
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ Partial Class Acarreos_CatChoferes
|
|||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not Page.IsPostBack Then
|
If Not Page.IsPostBack Then
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
CargaDdlTransportista()
|
' CargaDdlTransportista()
|
||||||
|
|
||||||
CargaDdls()
|
CargaDdls()
|
||||||
|
|
||||||
@@ -44,16 +44,16 @@ Partial Class Acarreos_CatChoferes
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Private Sub CargaDdlTransportista()
|
'Private Sub CargaDdlTransportista()
|
||||||
Dim ObjAcar As New ClsAcarreos()
|
' Dim ObjAcar As New ClsAcarreos()
|
||||||
If ObjAcar.GetTransportista(-1, UsuarioActual.CveEmpresa, 1) Then
|
' If ObjAcar.GetTransportista(-1, UsuarioActual.CveEmpresa, 1) Then
|
||||||
DdlTransportista.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
' DdlTransportista.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
DdlTransportista.DataSource = ObjAcar.DtResultados
|
' DdlTransportista.DataSource = ObjAcar.DtResultados
|
||||||
DdlTransportista.DataBind()
|
' DdlTransportista.DataBind()
|
||||||
End If
|
' End If
|
||||||
ObjAcar.Dispose()
|
' ObjAcar.Dispose()
|
||||||
UpAddChofer.Update()
|
' UpAddChofer.Update()
|
||||||
End Sub
|
'End Sub
|
||||||
|
|
||||||
Private Sub BtnAgregarChofer_Click(sender As Object, e As EventArgs) Handles BtnAgregarChofer.Click
|
Private Sub BtnAgregarChofer_Click(sender As Object, e As EventArgs) Handles BtnAgregarChofer.Click
|
||||||
|
|
||||||
@@ -65,32 +65,32 @@ Partial Class Acarreos_CatChoferes
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If DdlTransportista.SelectedValue = "-1" Then
|
'If DdlTransportista.SelectedValue = "-1" Then
|
||||||
Alert("Tiene que seleccionar un transportista.", TipoMensaje.MsgAdvertencia)
|
' Alert("Tiene que seleccionar un transportista.", TipoMensaje.MsgAdvertencia)
|
||||||
Else
|
'Else
|
||||||
|
|
||||||
Dim ObjAcar As New ClsAcarreos
|
Dim ObjAcar As New ClsAcarreos
|
||||||
Dim Estatus = 0
|
Dim Estatus = 0
|
||||||
If ChkEstatus.Checked Then Estatus = 1
|
If ChkEstatus.Checked Then Estatus = 1
|
||||||
|
|
||||||
If HdnModalidad.Value = "A" Then
|
If HdnModalidad.Value = "A" Then
|
||||||
If ObjAcar.AddChofer(TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:="", Ciudad:="", Estado:="", CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=DdlResidenciaFiscalOperador.SelectedValue, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero) Then
|
If ObjAcar.AddChofer(TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:="", Ciudad:="", Estado:="", CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=DdlResidenciaFiscalOperador.SelectedValue, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero) Then
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
|
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
|
||||||
GlobalDTChoferes(UsuarioActual.CveEmpresa) = Nothing
|
GlobalDTChoferes(UsuarioActual.CveEmpresa) = Nothing
|
||||||
End If
|
|
||||||
ElseIf HdnModalidad.Value = "U" Then
|
|
||||||
If ObjAcar.UpdateChofer(HdnID.Value.ToEntero(), TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Estatus, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:="", Ciudad:="", Estado:="", CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=DdlResidenciaFiscalOperador.SelectedValue, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero) Then
|
|
||||||
CargaDatos()
|
|
||||||
Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion)
|
|
||||||
GlobalDTChoferes(UsuarioActual.CveEmpresa) = Nothing
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
ElseIf HdnModalidad.Value = "U" Then
|
||||||
|
If ObjAcar.UpdateChofer(HdnID.Value.ToEntero(), TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Estatus, -1, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:="", Ciudad:="", Estado:="", CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=DdlResidenciaFiscalOperador.SelectedValue, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero) Then
|
||||||
|
CargaDatos()
|
||||||
|
Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion)
|
||||||
|
GlobalDTChoferes(UsuarioActual.CveEmpresa) = Nothing
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddChofer"))
|
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddChofer"))
|
||||||
ObjAcar.Dispose()
|
ObjAcar.Dispose()
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub Edit_Click(sender As Object, e As EventArgs)
|
Public Sub Edit_Click(sender As Object, e As EventArgs)
|
||||||
@@ -121,7 +121,7 @@ Partial Class Acarreos_CatChoferes
|
|||||||
DdlResidenciaFiscalOperador.SelectedValueExist("-1")
|
DdlResidenciaFiscalOperador.SelectedValueExist("-1")
|
||||||
DdlResidenciaFiscalOperador.SelectedValueExist(GvRow.DataKey("ResidenciaFiscalOperador"))
|
DdlResidenciaFiscalOperador.SelectedValueExist(GvRow.DataKey("ResidenciaFiscalOperador"))
|
||||||
|
|
||||||
DdlTransportista.SelectedValueExist(GvRow.DataKey("CveTransportista"))
|
' DdlTransportista.SelectedValueExist(GvRow.DataKey("CveTransportista"))
|
||||||
|
|
||||||
divEstatus.Visible = True
|
divEstatus.Visible = True
|
||||||
ChkEstatus.Checked = CBool(GvRow.DataKey("Estatus"))
|
ChkEstatus.Checked = CBool(GvRow.DataKey("Estatus"))
|
||||||
@@ -182,7 +182,7 @@ Partial Class Acarreos_CatChoferes
|
|||||||
TxtLicencia.Text = ""
|
TxtLicencia.Text = ""
|
||||||
|
|
||||||
|
|
||||||
DdlTransportista.SelectedValueExist(-1)
|
' DdlTransportista.SelectedValueExist(-1)
|
||||||
TxtRFC.Text = ""
|
TxtRFC.Text = ""
|
||||||
TxtNumInt.Text = ""
|
TxtNumInt.Text = ""
|
||||||
TxtNumExt.Text = ""
|
TxtNumExt.Text = ""
|
||||||
|
|||||||
Reference in New Issue
Block a user