--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:
@@ -8,6 +8,7 @@ Imports Extensiones.ModExtensiones
|
||||
|
||||
Partial Class ListadoBoletos
|
||||
Inherits ClsPaginas
|
||||
#Region "Propiedades"
|
||||
Private Property CveViaje As Integer
|
||||
Get
|
||||
Return ViewState("CveViaje").ToString().ToEntero
|
||||
@@ -24,6 +25,9 @@ Partial Class ListadoBoletos
|
||||
ViewState("Ruta") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region "Carga Página"
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
If Request.QueryString("CveViaje") Is Nothing Then
|
||||
@@ -44,6 +48,7 @@ Partial Class ListadoBoletos
|
||||
ObjTransportes.Dispose()
|
||||
GvBoletos.DataBind()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub BtnCancelar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
@@ -469,8 +469,7 @@
|
||||
<div class="row margin-bottom-5">
|
||||
<label class="col-md-4 bold">Nombre</label>
|
||||
<div class="col-md-8">
|
||||
|
||||
<asp:TextBox CssClass="form-control" runat="server" ID="TxtNombre">Nombre</asp:TextBox>
|
||||
<asp:TextBox CssClass="form-control" runat="server" ID="TxtNombre" MaxLength="50">Nombre</asp:TextBox>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -478,8 +477,7 @@
|
||||
<div class="row margin-bottom-5">
|
||||
<label class="col-md-4 bold">Visa</label>
|
||||
<div class="col-md-8">
|
||||
|
||||
<asp:TextBox CssClass="form-control" runat="server" ID="TxtVisa">Visa</asp:TextBox>
|
||||
<asp:TextBox CssClass="form-control" runat="server" ID="TxtVisa" MaxLength="15">Visa</asp:TextBox>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -487,14 +485,14 @@
|
||||
<div class="row margin-bottom-5">
|
||||
<label class="col-md-4 bold">Celular</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox CssClass="form-control" runat="server" ID="TxtCelular">Celular</asp:TextBox>
|
||||
<asp:TextBox CssClass="form-control" runat="server" ID="TxtCelular" MaxLength="15">Celular</asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row margin-bottom-5">
|
||||
<label class="col-md-4 bold">Observación</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox CssClass="form-control" runat="server"
|
||||
<asp:TextBox CssClass="form-control" runat="server" MaxLength="200"
|
||||
ID="TxtObservacion">Observacion</asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
@@ -502,17 +500,21 @@
|
||||
<div class="row margin-bottom-5">
|
||||
<label class="col-md-4 bold">Sexo</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox CssClass="form-control" runat="server"
|
||||
ID="TxtSexo">Sexo</asp:TextBox>
|
||||
<asp:DropDownList ID="RblSexo" CssClass="form-control input-sm select2me" runat="server"
|
||||
Width="100%">
|
||||
<asp:ListItem Text="Masculino" Value="1" Selected="True" />
|
||||
<asp:ListItem Text="Femenino" Value="0" />
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row margin-bottom-5">
|
||||
<label class="col-md-4 bold">Estatus</label>
|
||||
<div class="col-md-8">
|
||||
|
||||
<asp:TextBox CssClass="form-control" runat="server"
|
||||
ID="TxtEstatus">Estatus</asp:TextBox>
|
||||
<asp:Label runat="server" Visible="false"
|
||||
ID="TxtEstatus"></asp:Label>
|
||||
<asp:Label runat="server"
|
||||
ID="LbEstatus">Estatus</asp:Label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -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