-- se quitó transportista
This commit is contained in:
@@ -32,8 +32,7 @@
|
||||
DataKeyNames="CveChofer,Chofer,Estatus,FechaIng,CveUsuario,CveEmpresa,Usuario,CveTransportista,Identificacion,Domicilio,Telefono,Ciudad,RFC,Licencia,NumeroInterior,NumeroExterior,Colonia,Estado,NumRegidTribOperador,ResidenciaFiscalOperador,CP,CveEstado,CveMunicipio,CveLocalidad,CveColonia,ClaveSATColoniaCP"
|
||||
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>
|
||||
<asp:BoundField DataField="Chofer" HeaderText="Chofer" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Transportista" HeaderText="Transportista" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Chofer" HeaderText="Chofer" 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: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>
|
||||
<label for="<%= TxtRFC.ClientID.ToString()%>">RFC:</label>
|
||||
</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>
|
||||
<label for="<%= DdlTransportista.ClientID.ToString()%>">Transportista:</label>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
|
||||
<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
|
||||
If Not Page.IsPostBack Then
|
||||
CargaDatos()
|
||||
CargaDdlTransportista()
|
||||
' CargaDdlTransportista()
|
||||
|
||||
CargaDdls()
|
||||
|
||||
@@ -44,16 +44,16 @@ Partial Class Acarreos_CatChoferes
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaDdlTransportista()
|
||||
Dim ObjAcar As New ClsAcarreos()
|
||||
If ObjAcar.GetTransportista(-1, UsuarioActual.CveEmpresa, 1) Then
|
||||
DdlTransportista.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlTransportista.DataSource = ObjAcar.DtResultados
|
||||
DdlTransportista.DataBind()
|
||||
End If
|
||||
ObjAcar.Dispose()
|
||||
UpAddChofer.Update()
|
||||
End Sub
|
||||
'Private Sub CargaDdlTransportista()
|
||||
' Dim ObjAcar As New ClsAcarreos()
|
||||
' If ObjAcar.GetTransportista(-1, UsuarioActual.CveEmpresa, 1) Then
|
||||
' DdlTransportista.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
' DdlTransportista.DataSource = ObjAcar.DtResultados
|
||||
' DdlTransportista.DataBind()
|
||||
' End If
|
||||
' ObjAcar.Dispose()
|
||||
' UpAddChofer.Update()
|
||||
'End Sub
|
||||
|
||||
Private Sub BtnAgregarChofer_Click(sender As Object, e As EventArgs) Handles BtnAgregarChofer.Click
|
||||
|
||||
@@ -65,32 +65,32 @@ Partial Class Acarreos_CatChoferes
|
||||
End If
|
||||
|
||||
|
||||
If DdlTransportista.SelectedValue = "-1" Then
|
||||
Alert("Tiene que seleccionar un transportista.", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
'If DdlTransportista.SelectedValue = "-1" Then
|
||||
' Alert("Tiene que seleccionar un transportista.", TipoMensaje.MsgAdvertencia)
|
||||
'Else
|
||||
|
||||
Dim ObjAcar As New ClsAcarreos
|
||||
Dim ObjAcar As New ClsAcarreos
|
||||
Dim Estatus = 0
|
||||
If ChkEstatus.Checked Then Estatus = 1
|
||||
|
||||
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
|
||||
CargaDatos()
|
||||
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
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
|
||||
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()
|
||||
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
GlobalDTChoferes(UsuarioActual.CveEmpresa) = Nothing
|
||||
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"))
|
||||
ObjAcar.Dispose()
|
||||
UpDatos.Update()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub Edit_Click(sender As Object, e As EventArgs)
|
||||
@@ -121,7 +121,7 @@ Partial Class Acarreos_CatChoferes
|
||||
DdlResidenciaFiscalOperador.SelectedValueExist("-1")
|
||||
DdlResidenciaFiscalOperador.SelectedValueExist(GvRow.DataKey("ResidenciaFiscalOperador"))
|
||||
|
||||
DdlTransportista.SelectedValueExist(GvRow.DataKey("CveTransportista"))
|
||||
' DdlTransportista.SelectedValueExist(GvRow.DataKey("CveTransportista"))
|
||||
|
||||
divEstatus.Visible = True
|
||||
ChkEstatus.Checked = CBool(GvRow.DataKey("Estatus"))
|
||||
@@ -182,7 +182,7 @@ Partial Class Acarreos_CatChoferes
|
||||
TxtLicencia.Text = ""
|
||||
|
||||
|
||||
DdlTransportista.SelectedValueExist(-1)
|
||||
' DdlTransportista.SelectedValueExist(-1)
|
||||
TxtRFC.Text = ""
|
||||
TxtNumInt.Text = ""
|
||||
TxtNumExt.Text = ""
|
||||
|
||||
Reference in New Issue
Block a user