--Se ajustó largo máximo acorde a la BD para textbox, se implementó ddl para sexo en boleto. Se completó edición de datos del usuario en boletos.
This commit is contained in:
@@ -118,6 +118,10 @@ Partial Class RepContratoDetalle
|
||||
If ObjContratos.GetContratos(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||
Contrato = ObjContratos.DtResultados
|
||||
If Contrato IsNot Nothing AndAlso Contrato.Rows.Count > 0 Then
|
||||
Dim Dolares As Decimal = Contrato.Rows(0)("Importe").ToString.ToDecimal
|
||||
Dim Pesos As Decimal = Contrato.Rows(0)("ImporteMax").ToString.ToDecimal
|
||||
Dim Anticipo As Decimal = Contrato.Rows(0)("ImporteMin").ToString.ToDecimal
|
||||
|
||||
CveContratoTipo = Contrato.Rows(0)("CveContratoTipo").ToString.ToEntero
|
||||
SubProyecto = Contrato.Rows(0)("SubProyecto").ToString
|
||||
CveMasivo = Contrato.Rows(0)("CveMasivo").ToString.ToEntero
|
||||
@@ -132,13 +136,12 @@ Partial Class RepContratoDetalle
|
||||
TxtFechaRegreso.Text = Contrato.Rows(0)("FechaFinal").ToString
|
||||
TxtCantidadPasajeros.Text = Contrato.Rows(0)("CantidadPasajeros").ToString
|
||||
DdlTipoAF.SelectedValue = If(Contrato.Rows(0)("CveTipoAF") Is Nothing, "", Contrato.Rows(0)("CveTipoAF").ToString)
|
||||
TxtDolares.Text = Contrato.Rows(0)("Importe").ToString
|
||||
TxtPesos.Text = Contrato.Rows(0)("ImporteMax").ToString
|
||||
TxtAnticipo.Text = Contrato.Rows(0)("ImporteMin").ToString
|
||||
TxtDolares.Text = Math.Round(Dolares, 2).ToString
|
||||
TxtPesos.Text = Math.Round(Pesos, 2).ToString
|
||||
TxtAnticipo.Text = Math.Round(Anticipo, 2).ToString
|
||||
CveContratoEstatus = Contrato.Rows(0)("CveContratosEstatus").ToString.ToEntero
|
||||
If Not IsDBNull(ObjContratos.Archivo) AndAlso ObjContratos.Archivo <> "" AndAlso ObjContratos.Archivo <> "-1" AndAlso ObjContratos.Archivo <> $"{ObjContratos.CveContrato}." Then
|
||||
ViewState("FUrl") = Path.Combine(UsuarioActual.Empresa.Ruta, "CONTRATOS", ObjContratos.Archivo)
|
||||
'A2.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CONTRATO&CveEmpresa={0}&Archivo={1}", ObjContratos.CveEmpresa, ViewState("FUrl").ToString)))
|
||||
BtnDescargar.Visible = True
|
||||
Else
|
||||
BtnDescargar.Visible = False
|
||||
@@ -194,8 +197,7 @@ Partial Class RepContratoDetalle
|
||||
|
||||
File.Move(fileItem.FileUrl, ViewState("FUrl").ToString)
|
||||
TxtArchivo.Text = tempArray(1)
|
||||
' imgFileOk.Visible = True
|
||||
'ImgArchivo.Src = "/imagenes/accept.png"
|
||||
|
||||
Next
|
||||
|
||||
UPAFUL.Update()
|
||||
@@ -302,19 +304,21 @@ Partial Class RepContratoDetalle
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalEditar"))
|
||||
End Sub
|
||||
Protected Sub UpdateBoleto(sender As Object, e As EventArgs)
|
||||
For Each boleto As DataRow In ViajeActual.Rows
|
||||
If (boleto.Item("Asiento").ToString = TxtAsiento.Text) Then
|
||||
Alert($"El asiento {boleto.Item("Asiento")} ya ha está ocupado", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
Next
|
||||
If PnEditarViaje.Visible = True Then
|
||||
For Each boleto As DataRow In ViajeActual.Rows
|
||||
If (boleto.Item("Asiento").ToString = TxtAsiento.Text) Then
|
||||
Alert($"El asiento {boleto.Item("Asiento")} ya ha está ocupado", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
Dim ObjTransportes As New ClsTransportes
|
||||
|
||||
Try
|
||||
ObjTransportes.IniciaTransacSQL()
|
||||
|
||||
If ObjTransportes.UpdateViajesPasajeros(CveViajePasajero, DdlRuta.SelectedValue.ToEntero, UsuarioActual.CveVendedor, LbImporte.Text.ToDecimal, TxtAsiento.Text.ToEntero, TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, TxtObservacion.Text, TxtEstatus.Text.ToBool, UsuarioActual.CveUsuario, TxtSexo.Text.ToBool) Then
|
||||
If ObjTransportes.UpdateViajesPasajeros(CveViajePasajero, DdlRuta.SelectedValue.ToEntero, UsuarioActual.CveVendedor, LbImporte.Text.ToDecimal, TxtAsiento.Text.ToEntero, TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, TxtObservacion.Text, TxtEstatus.Text.ToBool, UsuarioActual.CveUsuario, RblSexo.SelectedValue.ToBool) Then
|
||||
ObjTransportes.Commit()
|
||||
End If
|
||||
Catch ex As ArgumentException
|
||||
@@ -381,7 +385,7 @@ Partial Class RepContratoDetalle
|
||||
New ReportParameter("Nombre", GvRow.DataKey("Nombre")),
|
||||
New ReportParameter("Visa", GvRow.DataKey("Visa")),
|
||||
New ReportParameter("Celular", GvRow.DataKey("Celular")),
|
||||
New ReportParameter("Importe", Math.Round(Importe, 1).ToString),
|
||||
New ReportParameter("Importe", Math.Round(Importe, 2).ToString),
|
||||
New ReportParameter("TipoBoleto", "Tipo Boleto"),
|
||||
New ReportParameter("Agencia", "Agencia"),
|
||||
New ReportParameter("TelefonoAgencia", "TelefonoAgencia"),
|
||||
@@ -403,15 +407,19 @@ Partial Class RepContratoDetalle
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
CveViajePasajero = GvRow.DataKey("CveViajePasajero").ToEntero
|
||||
DdlRuta.SelectedValue = GvRow.DataKey("CveViaje")
|
||||
LbPartida.Text = GvRow.DataKey("Partida").ToString()
|
||||
LbDestino.Text = GvRow.DataKey("Destino").ToString()
|
||||
LbImporte.Text = Convert.ToDecimal(GvRow.DataKey("Importe")).ToString("C")
|
||||
TxtNombre.Text = GvRow.DataKey("Nombre").ToString()
|
||||
TxtVisa.Text = GvRow.DataKey("Visa").ToString()
|
||||
TxtCelular.Text = GvRow.DataKey("Celular").ToString()
|
||||
TxtSexo.Text = GvRow.DataKey("Sexo").ToString()
|
||||
RblSexo.SelectedValue = If(GvRow.DataKey("Sexo").ToString.ToBool, "1", "0")
|
||||
TxtObservacion.Text = GvRow.DataKey("Observacion").ToString()
|
||||
TxtEstatus.Text = GvRow.DataKey("Estatus").ToString()
|
||||
LbEstatus.Text = If(GvRow.DataKey("Estatus").ToString.ToBool, "Activo", "Cancelado")
|
||||
TxtEstatus.Text = GvRow.DataKey("Estatus").ToString
|
||||
LbEstatus.CssClass = If(GvRow.DataKey("Estatus").ToString.ToBool, "text-success bold", "text-danger bold")
|
||||
TxtAsiento.Text = GvRow.DataKey("Asiento").ToString()
|
||||
|
||||
UpTabContainer.Update()
|
||||
UpModal.Update()
|
||||
@@ -432,9 +440,9 @@ Partial Class RepContratoDetalle
|
||||
TxtNombre.Text = GvRow.DataKey("Nombre").ToString()
|
||||
TxtVisa.Text = GvRow.DataKey("Visa").ToString()
|
||||
TxtCelular.Text = GvRow.DataKey("Celular").ToString()
|
||||
TxtSexo.Text = GvRow.DataKey("Sexo").ToString()
|
||||
RblSexo.SelectedValue = If(GvRow.DataKey("Sexo").ToString.ToBool, "1", "0")
|
||||
TxtObservacion.Text = GvRow.DataKey("Observacion").ToString()
|
||||
TxtEstatus.Text = GvRow.DataKey("Estatus").ToString()
|
||||
LbEstatus.Text = GvRow.DataKey("Estatus").ToString()
|
||||
LbCreado.Text = GvRow.DataKey("FechaIng").ToString()
|
||||
TxtAsiento.Text = GvRow.DataKey("Asiento").ToString()
|
||||
|
||||
@@ -464,7 +472,7 @@ Partial Class RepContratoDetalle
|
||||
TxtNombre.Text = GvRow.DataKey("Nombre").ToString()
|
||||
TxtVisa.Text = GvRow.DataKey("Visa").ToString()
|
||||
TxtCelular.Text = GvRow.DataKey("Celular").ToString()
|
||||
TxtSexo.Text = GvRow.DataKey("Sexo").ToString()
|
||||
RblSexo.SelectedValue = If(GvRow.DataKey("Sexo").ToString.ToBool, "1", "0")
|
||||
TxtObservacion.Text = GvRow.DataKey("Observacion").ToString()
|
||||
TxtEstatus.Text = GvRow.DataKey("Estatus").ToString()
|
||||
LbCreado.Text = GvRow.DataKey("FechaIng").ToString()
|
||||
@@ -474,7 +482,7 @@ Partial Class RepContratoDetalle
|
||||
Try
|
||||
ObjTransportes.IniciaTransacSQL()
|
||||
|
||||
If ObjTransportes.UpdateViajesPasajeros(CveViajePasajero, CveContrato, UsuarioActual.CveVendedor, LbImporte.Text.ToDecimal, TxtAsiento.Text.ToEntero, TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, TxtObservacion.Text, Estatus, UsuarioActual.CveUsuario, TxtSexo.Text.ToBool) Then
|
||||
If ObjTransportes.UpdateViajesPasajeros(CveViajePasajero, CveContrato, UsuarioActual.CveVendedor, LbImporte.Text.ToDecimal, TxtAsiento.Text.ToEntero, TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, TxtObservacion.Text, Estatus, UsuarioActual.CveUsuario, RblSexo.SelectedValue.ToBool) Then
|
||||
Alert("Se ha modificado el estatus de su boleto correctamente.")
|
||||
|
||||
ObjTransportes.Commit()
|
||||
|
||||
Reference in New Issue
Block a user