Formato Carta porte Se agregan 2 nuevas aseguradoras y numero polizas
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
|
||||
Partial Class Acarreos_CatChoferes
|
||||
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
|
||||
Partial Class Acarreos_CatChoferes
|
||||
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES"
|
||||
#Region " PROPIEDADES"
|
||||
|
||||
#End Region
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CargaDatos()
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CargaDatos()
|
||||
CargaDdlTransportista()
|
||||
|
||||
Dim DT As DataTable = GlobalDTColonia(-1)
|
||||
CargaDdls()
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -36,30 +36,30 @@ Partial Class Acarreos_CatChoferes
|
||||
DdlColonia.Items.Insert(0, New ListItem("Seleccione Una", "-1"))
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjAcar As New ClsAcarreos()
|
||||
If ObjAcar.GetChofer(-1, UsuarioActual.CveEmpresa, -1,-1) Then
|
||||
GvChofer.DataSource = ObjAcar.DtResultados
|
||||
GvChofer.DataBind()
|
||||
End If
|
||||
ObjAcar.Dispose()
|
||||
UpDatos.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
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjAcar As New ClsAcarreos()
|
||||
If ObjAcar.GetChofer(-1, UsuarioActual.CveEmpresa, -1, -1) Then
|
||||
GvChofer.DataSource = ObjAcar.DtResultados
|
||||
GvChofer.DataBind()
|
||||
End If
|
||||
ObjAcar.Dispose()
|
||||
UpDatos.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
|
||||
|
||||
|
||||
@@ -70,66 +70,66 @@ Partial Class Acarreos_CatChoferes
|
||||
End If
|
||||
|
||||
|
||||
If DdlTransportista.SelectedValue = "-1" Then
|
||||
Alert("Tiene que seleccionar un transportista.", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
|
||||
Dim ObjAcar As New ClsAcarreos
|
||||
Dim Estatus = 0
|
||||
If DdlTransportista.SelectedValue = "-1" Then
|
||||
Alert("Tiene que seleccionar un transportista.", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
|
||||
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)
|
||||
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)
|
||||
End If
|
||||
End If
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddChofer"))
|
||||
ObjAcar.Dispose()
|
||||
UpDatos.Update()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
HdnModalidad.Value = "U"
|
||||
HdnID.Value = GvRow.DataKey("CveChofer")
|
||||
UpDatos.Update()
|
||||
BtnAgregarChofer.Text = "Actualizar"
|
||||
myModalLabel.InnerText = "Actualizar Chofer"
|
||||
|
||||
TxtChofer.Text = GvRow.DataKey("Chofer")
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
HdnModalidad.Value = "U"
|
||||
HdnID.Value = GvRow.DataKey("CveChofer")
|
||||
UpDatos.Update()
|
||||
BtnAgregarChofer.Text = "Actualizar"
|
||||
myModalLabel.InnerText = "Actualizar Chofer"
|
||||
|
||||
TxtChofer.Text = GvRow.DataKey("Chofer")
|
||||
TxtIdentificacion.Text = GvRow.DataKey("Identificacion")
|
||||
TxtTelefono.Text = GvRow.DataKey("Telefono")
|
||||
TxtRFC.Text = GvRow.DataKey("RFC")
|
||||
|
||||
TxtTelefono.Text = GvRow.DataKey("Telefono")
|
||||
TxtRFC.Text = GvRow.DataKey("RFC")
|
||||
|
||||
TxtDomicilio.Text = GvRow.DataKey("Domicilio")
|
||||
TxtNumInt.Text = GvRow.DataKey("NumeroInterior")
|
||||
TxtNumExt.Text = GvRow.DataKey("NumeroExterior")
|
||||
'TxtColonia.Text = GvRow.DataKey("Colonia")
|
||||
'TxtCiudad.Text = GvRow.DataKey("Ciudad")
|
||||
'TxtEstado.Text = GvRow.DataKey("Estado")
|
||||
TxtCP.Text = GvRow.DataKey("CP")
|
||||
'TxtCiudad.Text = GvRow.DataKey("Ciudad")
|
||||
'TxtEstado.Text = GvRow.DataKey("Estado")
|
||||
TxtCP.Text = GvRow.DataKey("CP")
|
||||
TxtLicencia.Text = GvRow.DataKey("Licencia")
|
||||
|
||||
TxtNumRegidTribOperador.Text = GvRow.DataKey("NumRegidTribOperador")
|
||||
|
||||
DdlResidenciaFiscalOperador.SelectedValueExist("-1")
|
||||
DdlResidenciaFiscalOperador.SelectedValueExist(GvRow.DataKey("ResidenciaFiscalOperador"))
|
||||
|
||||
DdlResidenciaFiscalOperador.SelectedValueExist(GvRow.DataKey("ResidenciaFiscalOperador"))
|
||||
|
||||
DdlTransportista.SelectedValueExist(GvRow.DataKey("CveTransportista"))
|
||||
|
||||
divEstatus.Visible = True
|
||||
ChkEstatus.Checked = CBool(GvRow.DataKey("Estatus"))
|
||||
|
||||
|
||||
divEstatus.Visible = True
|
||||
ChkEstatus.Checked = CBool(GvRow.DataKey("Estatus"))
|
||||
|
||||
|
||||
DdlEstado.SelectedValueExist(GvRow.DataKey("CveEstado"))
|
||||
|
||||
|
||||
@@ -168,34 +168,34 @@ Partial Class Acarreos_CatChoferes
|
||||
|
||||
|
||||
|
||||
UpAddChofer.Update()
|
||||
|
||||
UpAddChofer.Update()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "divAddChofer"))
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub Agregar()
|
||||
HdnModalidad.Value = "A"
|
||||
UpDatos.Update()
|
||||
BtnAgregarChofer.Text = "Agregar"
|
||||
myModalLabel.InnerText = "Agregar Chofer"
|
||||
TxtChofer.Text = ""
|
||||
TxtIdentificacion.Text = ""
|
||||
TxtDomicilio.Text = ""
|
||||
TxtTelefono.Text = ""
|
||||
'TxtCiudad.Text = ""
|
||||
TxtLicencia.Text = ""
|
||||
|
||||
|
||||
DdlTransportista.SelectedValueExist(-1)
|
||||
TxtRFC.Text = ""
|
||||
TxtNumInt.Text = ""
|
||||
TxtNumExt.Text = ""
|
||||
'TxtEstado.Text = ""
|
||||
TxtCP.Text = ""
|
||||
'TxtColonia.Text = ""
|
||||
|
||||
TxtNumRegidTribOperador.Text = ""
|
||||
End Sub
|
||||
|
||||
Public Sub Agregar()
|
||||
HdnModalidad.Value = "A"
|
||||
UpDatos.Update()
|
||||
BtnAgregarChofer.Text = "Agregar"
|
||||
myModalLabel.InnerText = "Agregar Chofer"
|
||||
TxtChofer.Text = ""
|
||||
TxtIdentificacion.Text = ""
|
||||
TxtDomicilio.Text = ""
|
||||
TxtTelefono.Text = ""
|
||||
'TxtCiudad.Text = ""
|
||||
TxtLicencia.Text = ""
|
||||
|
||||
|
||||
DdlTransportista.SelectedValueExist(-1)
|
||||
TxtRFC.Text = ""
|
||||
TxtNumInt.Text = ""
|
||||
TxtNumExt.Text = ""
|
||||
'TxtEstado.Text = ""
|
||||
TxtCP.Text = ""
|
||||
'TxtColonia.Text = ""
|
||||
|
||||
TxtNumRegidTribOperador.Text = ""
|
||||
DdlResidenciaFiscalOperador.SelectedValueExist("-1")
|
||||
|
||||
|
||||
@@ -206,40 +206,40 @@ Partial Class Acarreos_CatChoferes
|
||||
|
||||
DdlColonia.SelectedValueExist(-1)
|
||||
|
||||
ChkEstatus.Checked = True
|
||||
divEstatus.Visible = False
|
||||
UpAddChofer.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "divAddChofer"))
|
||||
End Sub
|
||||
|
||||
Public Sub Delete_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjAcar As New ClsAcarreos()
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
HdnID.Value = GvRow.DataKey("CveChofer")
|
||||
UpDatos.Update()
|
||||
If ObjAcar.RemoveChofer(HdnID.Value) Then
|
||||
CargaDatos()
|
||||
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
ObjAcar.Dispose()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub GvChofer_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvChofer.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("Estatus") = True Then
|
||||
e.Row.FCLabel("LblEstatus").Text = "Activo"
|
||||
e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green
|
||||
|
||||
Else
|
||||
e.Row.FCLabel("LblEstatus").Text = "Inactivo"
|
||||
e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub LnkChofer_Click(sender As Object, e As EventArgs) Handles LnkChofer.Click
|
||||
Agregar()
|
||||
ChkEstatus.Checked = True
|
||||
divEstatus.Visible = False
|
||||
UpAddChofer.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "divAddChofer"))
|
||||
End Sub
|
||||
|
||||
Public Sub Delete_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjAcar As New ClsAcarreos()
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
HdnID.Value = GvRow.DataKey("CveChofer")
|
||||
UpDatos.Update()
|
||||
If ObjAcar.RemoveChofer(HdnID.Value) Then
|
||||
CargaDatos()
|
||||
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
ObjAcar.Dispose()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub GvChofer_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvChofer.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("Estatus") = True Then
|
||||
e.Row.FCLabel("LblEstatus").Text = "Activo"
|
||||
e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green
|
||||
|
||||
Else
|
||||
e.Row.FCLabel("LblEstatus").Text = "Inactivo"
|
||||
e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub LnkChofer_Click(sender As Object, e As EventArgs) Handles LnkChofer.Click
|
||||
Agregar()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkValidar_Click(sender As Object, e As EventArgs)
|
||||
@@ -331,4 +331,4 @@ Partial Class Acarreos_CatChoferes
|
||||
Protected Sub DdlColonia_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
validaCodigoPostal()
|
||||
End Sub
|
||||
End Class
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user