--
This commit is contained in:
@@ -135,7 +135,7 @@ Public Class ClsTransportes
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Boletos"
|
#Region "Boletos"
|
||||||
Public Function AddViajesPasajeros(CveViaje As Integer, CveDestinoOrigen As Integer, CveDestinoFinal As Integer, Importe As Decimal, Asiento As Integer, Nombre As String, Visa As String, Celular As String, Sexo As Boolean, Observacion As String, CveUsuario As Integer, CveVendedor As Integer) As Integer
|
Public Function AddViajesPasajeros(CveViaje As Integer, CveDestinoOrigen As Integer, CveDestinoFinal As Integer, CveVendedor As Integer, Importe As Decimal, Asiento As Integer, Nombre As String, INE As String, FechaNacimiento As Date, Sexo As Boolean, Visa As String, VisaVigencia As Date, Celular As String, Observacion As String, CveUsuario As Integer) As Integer
|
||||||
Dim Retorno As Integer = -1
|
Dim Retorno As Integer = -1
|
||||||
|
|
||||||
DataAdapter("PA_Trans_ViajesPasajerosAdd")
|
DataAdapter("PA_Trans_ViajesPasajerosAdd")
|
||||||
@@ -145,15 +145,18 @@ Public Class ClsTransportes
|
|||||||
.Add("@CveViaje", SqlDbType.Int).Value = CveViaje
|
.Add("@CveViaje", SqlDbType.Int).Value = CveViaje
|
||||||
.Add("@CveDestinoOrigen", SqlDbType.Int).Value = CveDestinoOrigen
|
.Add("@CveDestinoOrigen", SqlDbType.Int).Value = CveDestinoOrigen
|
||||||
.Add("@CveDestinoFinal", SqlDbType.Int).Value = CveDestinoFinal
|
.Add("@CveDestinoFinal", SqlDbType.Int).Value = CveDestinoFinal
|
||||||
|
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||||
.Add("@Importe", SqlDbType.Money).Value = Importe
|
.Add("@Importe", SqlDbType.Money).Value = Importe
|
||||||
.Add("@Asiento", SqlDbType.Int).Value = Asiento
|
.Add("@Asiento", SqlDbType.Int).Value = Asiento
|
||||||
.Add("@Nombre", SqlDbType.VarChar).Value = Nombre
|
.Add("@Nombre", SqlDbType.VarChar).Value = Nombre
|
||||||
.Add("@Visa", SqlDbType.VarChar).Value = Visa
|
.Add("@INE", SqlDbType.VarChar).Value = INE
|
||||||
.Add("@Celular", SqlDbType.VarChar).Value = Celular
|
.Add("@FechaNacimiento", SqlDbType.Date).Value = FechaNacimiento
|
||||||
.Add("@Sexo", SqlDbType.Bit).Value = Sexo
|
.Add("@Sexo", SqlDbType.Bit).Value = Sexo
|
||||||
|
.Add("@Visa", SqlDbType.VarChar).Value = Visa
|
||||||
|
.Add("@VisaVigencia", SqlDbType.Date).Value = VisaVigencia
|
||||||
|
.Add("@Celular", SqlDbType.VarChar).Value = Celular
|
||||||
.Add("@Observacion", SqlDbType.VarChar).Value = Observacion
|
.Add("@Observacion", SqlDbType.VarChar).Value = Observacion
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
|
|||||||
@@ -114,9 +114,9 @@
|
|||||||
|
|
||||||
<div class="portlet-body form">
|
<div class="portlet-body form">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-4">
|
||||||
<div class="form-group form-md-line-input input-iconrigh">
|
<div class="form-group form-md-line-input input-iconrigh">
|
||||||
<asp:TextBox ID="TxtNombre" CssClass="form-control" runat="server" MaxLength="200"
|
<asp:TextBox ID="TxtNombre" CssClass="form-control" runat="server" MaxLength="50"
|
||||||
ClientIDMode="Static"></asp:TextBox>
|
ClientIDMode="Static"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RFVTxtNombre" runat="server" ControlToValidate="TxtNombre"
|
<asp:RequiredFieldValidator ID="RFVTxtNombre" runat="server" ControlToValidate="TxtNombre"
|
||||||
CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo."
|
CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo."
|
||||||
@@ -126,16 +126,29 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-4">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtVisa" runat="server" Width="100%" CssClass="form-control"></asp:TextBox>
|
<asp:TextBox ID="TxtINE" runat="server" Width="100%" CssClass="form-control" MaxLength="15"></asp:TextBox>
|
||||||
<label>Visa:</label>
|
<asp:RequiredFieldValidator ID="RFVINE" runat="server" ControlToValidate="TxtINE"
|
||||||
|
CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''INE''</b> es necesario, por favor ingréselo."
|
||||||
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<label>INE:</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtFechaNacimiento" runat="server" type="date" Width="100%" CssClass="form-control x"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVFechaNacimiento" runat="server" ControlToValidate="TxtFechaNacimiento"
|
||||||
|
CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Nacimiento''</b> es necesario, por favor ingréselo."
|
||||||
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<label>Fecha de Nacimiento:</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-4">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="RblSexo" CssClass="form-control input-sm select2me" runat="server">
|
<asp:DropDownList ID="RblSexo" CssClass="form-control input-sm select2me" runat="server">
|
||||||
<asp:ListItem Text="Masculino" Value="1" Selected="True" />
|
<asp:ListItem Text="Masculino" Value="1" Selected="True" />
|
||||||
@@ -146,23 +159,50 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-4">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtCelular" runat="server" Width="100%" CssClass="form-control" type="number" MaxLength="10"></asp:TextBox>
|
<asp:TextBox ID="TxtVisa" runat="server" Width="100%" CssClass="form-control"
|
||||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" CssClass="help-block errorimput"
|
type="text" MaxLength="15"></asp:TextBox>
|
||||||
ControlToValidate="TxtCelular" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Celular''</b> es necesario, por favor ingréselo."
|
<asp:RequiredFieldValidator ID="RFVVisa" runat="server" CssClass="help-block errorimput"
|
||||||
|
ControlToValidate="TxtVisa" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Visa''</b> es necesario, por favor ingréselo."
|
||||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
<label>Celular:</label>
|
<label>Visa:</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtVisaVigencia" runat="server" Width="100%" CssClass="form-control"
|
||||||
|
type="date" MaxLength="10"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVVisaVigencia" runat="server" CssClass="help-block errorimput"
|
||||||
|
ControlToValidate="TxtVisaVigencia" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Vigencia''</b> es necesario, por favor ingréselo."
|
||||||
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<label>Vigencia:</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="form-group form-md-line-input input-iconright ">
|
||||||
|
<asp:TextBox ID="TxtCelular" CssClass="form-control" runat="server" MaxLength="15"
|
||||||
|
ClientIDMode="Static"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVCelular" runat="server" ControlToValidate="TxtCelular"
|
||||||
|
CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Celular''</b> es necesario, por favor ingréselo."
|
||||||
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<label>Celular</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<div class="form-group form-md-line-input input-iconright ">
|
||||||
|
<asp:TextBox ID="TxtObservaciones" CssClass="form-control" runat="server" MaxLength="200"
|
||||||
|
ClientIDMode="Static"></asp:TextBox>
|
||||||
|
|
||||||
|
<label>Observaciones</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright ">
|
|
||||||
<asp:TextBox ID="TxtObservaciones" CssClass="form-control" runat="server" MaxLength="200"
|
|
||||||
ClientIDMode="Static"></asp:TextBox>
|
|
||||||
<label>Observaciones:</label>
|
|
||||||
<i></i>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -237,7 +277,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<%-- Botón para Agregar Pasajero(Oculto) --%>
|
<%-- Botón para Agregar Pasajero(Oculto) --%>
|
||||||
<div class="form-group form-md-line-input input-iconright my-1">
|
<div class="form-group form-md-line-input input-iconright my-1">
|
||||||
<div style="display:flex; justify-content:space-between">
|
<div style="display: flex; justify-content: space-between">
|
||||||
<asp:Label runat="server" ID="LbAviso" CssClass="col-md-9 alert alert-warning text-center mx-1"
|
<asp:Label runat="server" ID="LbAviso" CssClass="col-md-9 alert alert-warning text-center mx-1"
|
||||||
Visible="False"><p><span class="bold uppercase">information: </span>Los boletos están siendo apartados hasta finalizar su compra</p></asp:Label>
|
Visible="False"><p><span class="bold uppercase">information: </span>Los boletos están siendo apartados hasta finalizar su compra</p></asp:Label>
|
||||||
<asp:Button ID="BtnAgregarPasajero" runat="server" CssClass="col-md-2 btn btn-success"
|
<asp:Button ID="BtnAgregarPasajero" runat="server" CssClass="col-md-2 btn btn-success"
|
||||||
@@ -249,11 +289,12 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<asp:GridView ID="GvB" runat="server" Width="100%" AutoGenerateColumns="false" CssClass="table table-advance table-hover"
|
<asp:GridView ID="GvB" runat="server" Width="100%" AutoGenerateColumns="false" CssClass="table table-advance table-hover"
|
||||||
GridLines="None" DataKeyNames="Nombre,Visa,Asiento">
|
GridLines="None" DataKeyNames="Nombre,Visa,Asiento, INE">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="Nombre" HeaderText="Nombre" />
|
<asp:BoundField DataField="Nombre" HeaderText="Nombre" />
|
||||||
<asp:BoundField DataField="Visa" HeaderText="Visa" />
|
<asp:BoundField DataField="INE" HeaderText="INE" />
|
||||||
<asp:BoundField DataField="Sexo" HeaderText="Sexo" ItemStyle-HorizontalAlign="Center" />
|
<asp:BoundField DataField="Sexo" HeaderText="Sexo" ItemStyle-HorizontalAlign="Center" />
|
||||||
|
<asp:BoundField DataField="Visa" HeaderText="Visa" />
|
||||||
<asp:BoundField DataField="Celular" HeaderText="Celular" ItemStyle-HorizontalAlign="Center" />
|
<asp:BoundField DataField="Celular" HeaderText="Celular" ItemStyle-HorizontalAlign="Center" />
|
||||||
<asp:BoundField DataField="Observaciones" HeaderText="Observaciones" ItemStyle-HorizontalAlign="Center" />
|
<asp:BoundField DataField="Observaciones" HeaderText="Observaciones" ItemStyle-HorizontalAlign="Center" />
|
||||||
<asp:BoundField DataField="Asiento" HeaderText="Asiento" ItemStyle-HorizontalAlign="Center" />
|
<asp:BoundField DataField="Asiento" HeaderText="Asiento" ItemStyle-HorizontalAlign="Center" />
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ Partial Class Boletos
|
|||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
#Region "Carga Página"
|
||||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
If Request.QueryString("CveViaje") Is Nothing And UsuarioActual.CveVendedor <> Nothing And UsuarioActual.CveVendedor <> -1 Then
|
If Request.QueryString("CveViaje") Is Nothing And UsuarioActual.CveVendedor <> Nothing And UsuarioActual.CveVendedor <> -1 Then
|
||||||
@@ -88,7 +89,10 @@ Partial Class Boletos
|
|||||||
DtPasajeros.Columns.Add("CveViajePasajero", GetType(Integer))
|
DtPasajeros.Columns.Add("CveViajePasajero", GetType(Integer))
|
||||||
DtPasajeros.Columns.Add("Numero", GetType(Integer))
|
DtPasajeros.Columns.Add("Numero", GetType(Integer))
|
||||||
DtPasajeros.Columns.Add("Nombre", GetType(String))
|
DtPasajeros.Columns.Add("Nombre", GetType(String))
|
||||||
|
DtPasajeros.Columns.Add("INE", GetType(String))
|
||||||
DtPasajeros.Columns.Add("Visa", GetType(String))
|
DtPasajeros.Columns.Add("Visa", GetType(String))
|
||||||
|
DtPasajeros.Columns.Add("VisaVigencia", GetType(Date))
|
||||||
|
DtPasajeros.Columns.Add("FechaNacimiento", GetType(Date))
|
||||||
DtPasajeros.Columns.Add("Sexo", GetType(String))
|
DtPasajeros.Columns.Add("Sexo", GetType(String))
|
||||||
DtPasajeros.Columns.Add("CveSexo", GetType(Integer))
|
DtPasajeros.Columns.Add("CveSexo", GetType(Integer))
|
||||||
DtPasajeros.Columns.Add("Celular", GetType(String))
|
DtPasajeros.Columns.Add("Celular", GetType(String))
|
||||||
@@ -140,29 +144,15 @@ Partial Class Boletos
|
|||||||
If ObjDestinos.GetDestinosTarifas(CveSubProyecto, -1, -1) Then
|
If ObjDestinos.GetDestinosTarifas(CveSubProyecto, -1, -1) Then
|
||||||
If ObjDestinos.DtResultados.Rows.Count > 0 Then
|
If ObjDestinos.DtResultados.Rows.Count > 0 Then
|
||||||
DtDestinos = ObjDestinos.DtResultados
|
DtDestinos = ObjDestinos.DtResultados
|
||||||
DdlPartida.DataSource = DtDestinos.FiltraParametros("", DistinctColumns:={"CveDestinoOrigen", "Partida"})
|
DdlPartida.DataSource = DtDestinos.FiltraParametros("", DistinctColumns:={"CveDestinoOrigen", "Partida"}) : DataBind()
|
||||||
DdlPartida.DataBind()
|
|
||||||
DdlPartida.Items.Insert(0, New ListItem("Seleccione Partida", "-1"))
|
DdlPartida.Items.Insert(0, New ListItem("Seleccione Partida", "-1"))
|
||||||
|
|
||||||
'DdlDestino.DataSource = DtDestinos
|
|
||||||
'DdlDestino.DataBind()
|
|
||||||
'DdlDestino.Items.Insert(0, New ListItem("Seleccione Destino", "-1"))
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If ObjDestinos.GetDestinos(CveSubProyecto:=CveSubProyecto) Then
|
|
||||||
' If ObjDestinos.DtResultados.Rows.Count > 0 Then
|
|
||||||
' DdlPartida.DataSource = ObjDestinos.DtResultados
|
|
||||||
' DdlPartida.DataBind()
|
|
||||||
' DdlPartida.Items.Insert(0, New ListItem("Seleccione Partida", "-1"))
|
|
||||||
|
|
||||||
' DdlDestino.DataSource = ObjDestinos.DtResultados
|
|
||||||
' DdlDestino.DataBind()
|
|
||||||
' DdlDestino.Items.Insert(0, New ListItem("Seleccione Destino", "-1"))
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
ObjDestinos.Dispose()
|
ObjDestinos.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
Protected Sub CotizarTarifa()
|
Protected Sub CotizarTarifa()
|
||||||
If DdlDestino.SelectedValue <> "-1" And DdlPartida.SelectedValue <> "-1" Then
|
If DdlDestino.SelectedValue <> "-1" And DdlPartida.SelectedValue <> "-1" Then
|
||||||
Dim ImporteR As Decimal = 0
|
Dim ImporteR As Decimal = 0
|
||||||
@@ -170,7 +160,18 @@ Partial Class Boletos
|
|||||||
Dim CveSubProyecto As Integer = Contrato.Rows(0)("CveSubProyecto").ToString.ToEntero
|
Dim CveSubProyecto As Integer = Contrato.Rows(0)("CveSubProyecto").ToString.ToEntero
|
||||||
|
|
||||||
If ObjDestinos.GetDestinosTarifas(CveSubProyecto, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero) Then
|
If ObjDestinos.GetDestinosTarifas(CveSubProyecto, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero) Then
|
||||||
ImporteR = ObjDestinos.DtResultados.FiltroPrimeroValor("Importe").ToDecimal.RoundSQL
|
Dim fechaHoy As Date = Date.Today
|
||||||
|
Dim fechaNacimiento As Date = TxtFechaNacimiento.Text.ToDate
|
||||||
|
Dim edad As Integer
|
||||||
|
|
||||||
|
' Calcular la diferencia en años entre la fecha actual y la fecha de nacimiento
|
||||||
|
edad = CInt(DateDiff(DateInterval.Year, fechaNacimiento, fechaHoy))
|
||||||
|
If edad < 8 Or edad > 65 Then
|
||||||
|
ImporteR = ObjDestinos.DtResultados.FiltroPrimeroValor("Importe").ToDecimal.RoundSQL - 20
|
||||||
|
Else
|
||||||
|
ImporteR = ObjDestinos.DtResultados.FiltroPrimeroValor("Importe").ToDecimal.RoundSQL
|
||||||
|
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
If ImporteR > 0 Then
|
If ImporteR > 0 Then
|
||||||
ViewState("Importe") = ImporteR
|
ViewState("Importe") = ImporteR
|
||||||
@@ -216,22 +217,9 @@ Partial Class Boletos
|
|||||||
|
|
||||||
Try
|
Try
|
||||||
For Each dr As DataRow In DtPasajeros.Rows
|
For Each dr As DataRow In DtPasajeros.Rows
|
||||||
Dim Nombre, Visa, Celular, Obs, Asiento As String
|
|
||||||
Dim Sexo As Boolean
|
|
||||||
Dim Importe As Decimal = 0
|
|
||||||
Dim CveDestinoOrigen, CveDestinoFinal As Integer
|
|
||||||
|
|
||||||
CveDestinoOrigen = dr("CveDestinoOrigen").ToString.ToEntero
|
|
||||||
CveDestinoFinal = dr("CveDestinoFinal").ToString.ToEntero
|
|
||||||
Importe = dr("Importe").ToString.ToDecimal
|
|
||||||
Asiento = dr("Asiento").ToString
|
|
||||||
Nombre = dr("Nombre").ToString
|
|
||||||
Visa = dr("Visa").ToString
|
|
||||||
Celular = dr("Celular").ToString
|
|
||||||
Sexo = dr("CveSexo").ToString.ToBool
|
|
||||||
Obs = dr("Observaciones").ToString
|
|
||||||
|
|
||||||
Dim CveViajePasajero = ObjTransporte.AddViajesPasajeros(CveViaje, CveDestinoOrigen, CveDestinoFinal, Importe, Asiento.ToEntero, Nombre, Visa, Celular, Sexo, Obs, UsuarioActual.CveUsuario, UsuarioActual.CveVendedor)
|
Dim CveViajePasajero As Integer = ObjTransporte.AddViajesPasajeros(CveViaje, dr("CveDestinoOrigen").ToString.ToEntero, dr("CveDestinoFinal").ToString.ToEntero, UsuarioActual.CveVendedor, dr("Importe").ToString.ToDecimal, dr("Asiento").ToString.ToEntero, dr("Nombre").ToString, dr("INE").ToString, dr("FechaNacimiento").ToString.ToDate, dr("CveSexo").ToString.ToBool, dr("Visa").ToString, dr("VisaVigencia").ToString.ToDate, dr("Celular").ToString, dr("Observaciones").ToString, UsuarioActual.CveUsuario)
|
||||||
|
|
||||||
If CveViajePasajero < 1 Then
|
If CveViajePasajero < 1 Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
@@ -328,6 +316,12 @@ Partial Class Boletos
|
|||||||
DdlDestino.Items.Insert(0, New ListItem("Seleccione Destino", "-1"))
|
DdlDestino.Items.Insert(0, New ListItem("Seleccione Destino", "-1"))
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub DdlDestino_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlDestino.SelectedIndexChanged
|
Protected Sub DdlDestino_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlDestino.SelectedIndexChanged
|
||||||
|
If TxtFechaNacimiento.Text = "" Then
|
||||||
|
DdlDestino.SelectedValue = "-1"
|
||||||
|
DdlPartida.SelectedValue = "-1"
|
||||||
|
Alert("Debe seleccionar la fecha de nacimiento", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
CotizarTarifa()
|
CotizarTarifa()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub GeneraPasajeros(Cantidad As Integer)
|
Private Sub GeneraPasajeros(Cantidad As Integer)
|
||||||
@@ -353,24 +347,30 @@ Partial Class Boletos
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
Dim Dr1 As DataRow = DtPasajeros.NewRow
|
Dim Dr1 As DataRow = DtPasajeros.NewRow
|
||||||
Dr1("Asiento") = AsientoSeleccionado.Replace("A", "")
|
|
||||||
Dr1("Nombre") = TxtNombre.Text.Trim
|
|
||||||
Dr1("Visa") = TxtVisa.Text.Trim
|
|
||||||
Dr1("Sexo") = RblSexo.SelectedItem
|
|
||||||
Dr1("CveSexo") = RblSexo.SelectedValue.ToBool
|
|
||||||
Dr1("Celular") = TxtCelular.Text.Trim
|
|
||||||
Dr1("Observaciones") = TxtObservaciones.Text.Trim
|
|
||||||
Dr1("Partida") = DdlPartida.SelectedItem
|
Dr1("Partida") = DdlPartida.SelectedItem
|
||||||
Dr1("Destino") = DdlDestino.SelectedItem
|
Dr1("Destino") = DdlDestino.SelectedItem
|
||||||
Dr1("CveDestinoOrigen") = DdlPartida.SelectedValue.ToEntero
|
Dr1("CveDestinoOrigen") = DdlPartida.SelectedValue.ToEntero
|
||||||
Dr1("CveDestinoFinal") = DdlDestino.SelectedValue.ToEntero
|
Dr1("CveDestinoFinal") = DdlDestino.SelectedValue.ToEntero
|
||||||
Dr1("Importe") = Me.Importe
|
Dr1("Importe") = Me.Importe
|
||||||
|
Dr1("Asiento") = AsientoSeleccionado.Replace("A", "")
|
||||||
|
Dr1("Nombre") = TxtNombre.Text.Trim
|
||||||
|
Dr1("INE") = TxtINE.Text.Trim
|
||||||
|
Dr1("FechaNacimiento") = TxtFechaNacimiento.Text.Trim
|
||||||
|
Dr1("Sexo") = RblSexo.SelectedItem
|
||||||
|
Dr1("CveSexo") = RblSexo.SelectedValue.ToBool
|
||||||
|
Dr1("Visa") = TxtVisa.Text.Trim
|
||||||
|
Dr1("VisaVigencia") = TxtVisaVigencia.Text.Trim
|
||||||
|
Dr1("Celular") = TxtCelular.Text.Trim
|
||||||
|
Dr1("Observaciones") = TxtObservaciones.Text.Trim
|
||||||
|
|
||||||
'Reiniciamos Datos'
|
'Reiniciamos Datos'
|
||||||
DtPasajeros.Rows.Add(Dr1)
|
DtPasajeros.Rows.Add(Dr1)
|
||||||
AsientoSeleccionado = ""
|
AsientoSeleccionado = ""
|
||||||
TxtNombre.Text = ""
|
TxtNombre.Text = ""
|
||||||
|
TxtINE.Text = ""
|
||||||
|
TxtFechaNacimiento.Text = ""
|
||||||
TxtVisa.Text = ""
|
TxtVisa.Text = ""
|
||||||
TxtCelular.Text = ""
|
TxtVisaVigencia.Text = ""
|
||||||
TxtCelular.Text = ""
|
TxtCelular.Text = ""
|
||||||
TxtObservaciones.Text = ""
|
TxtObservaciones.Text = ""
|
||||||
GvB.DataSource = DtPasajeros
|
GvB.DataSource = DtPasajeros
|
||||||
@@ -408,7 +408,7 @@ Partial Class Boletos
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim ObjFactura = Modelos.Factura.CrearVentaNueva(UsuarioActual, -1, CveCliente, CveMoneda, "Rem")
|
Dim ObjFactura As Modelos.Factura = Modelos.Factura.CrearVentaNueva(UsuarioActual, -1, CveCliente, CveMoneda, "Rem")
|
||||||
|
|
||||||
If ObjFactura IsNot Nothing Then
|
If ObjFactura IsNot Nothing Then
|
||||||
'TOMA EL SUBPROYECTO DEL CLIENTE
|
'TOMA EL SUBPROYECTO DEL CLIENTE
|
||||||
@@ -426,8 +426,8 @@ Partial Class Boletos
|
|||||||
ObjFactura.SetSubProyectoMatriz()
|
ObjFactura.SetSubProyectoMatriz()
|
||||||
|
|
||||||
For Each Dr As DataRow In DtPasajeros.Rows
|
For Each Dr As DataRow In DtPasajeros.Rows
|
||||||
Dim Obs = Dr("Observaciones").ToString
|
Dim Obs As String = Dr("Observaciones").ToString
|
||||||
Dim Importe = Dr("Importe").ToString.ToDecimal()
|
Dim Importe As Decimal = Dr("Importe").ToString.ToDecimal()
|
||||||
|
|
||||||
If Importe <= 0 Then
|
If Importe <= 0 Then
|
||||||
Retorno.Mensajes.Add("El importe debe ser mayor a 0")
|
Retorno.Mensajes.Add("El importe debe ser mayor a 0")
|
||||||
@@ -477,8 +477,5 @@ Partial Class Boletos
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
'Protected Sub TimerActualizar_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles timerActualizar.Tick
|
|
||||||
' ScriptManager.RegisterStartupScript(Me, Me.GetType(), "ActualizarTiempo", "actualizarTiempo();", True)
|
|
||||||
' UpTimer.Update()
|
|
||||||
'End Sub
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -266,25 +266,29 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row my-1">
|
||||||
<label class="col-md-4">Costo dólares</label>
|
<label class="col-md-4">Importe</label>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="input-group">
|
|
||||||
<asp:TextBox ID="TxtDolares" runat="server" CssClass="form-control" type="number"></asp:TextBox>
|
<asp:TextBox ID="TxtImporte" runat="server" CssClass="form-control col-md-6" type="number"
|
||||||
|
Width="50%"></asp:TextBox>
|
||||||
|
<div class="input-group col-md-6" style="width: 50%">
|
||||||
<div class="input-group-addon">
|
<div class="input-group-addon">
|
||||||
<i class="fa fa-usd"></i>
|
<i class="fa fa-usd"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<asp:DropDownList ID="DdlMoneda" AppendDataBoundItems="true" DataTextField="Moneda"
|
||||||
</div>
|
DataValueField="CveMoneda"
|
||||||
</div>
|
CssClass="form-control"
|
||||||
|
Width="100%" runat="server">
|
||||||
<div class="row">
|
</asp:DropDownList>
|
||||||
<label class="col-md-4">Costo pesos</label>
|
<asp:RequiredFieldValidator ID="RFVMoneda" runat="server" ControlToValidate="DdlMoneda"
|
||||||
<div class="col-md-8">
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Moneda''</b> es necesario, por favor ingréselo."
|
||||||
<div class="input-group">
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
<asp:TextBox ID="TxtPesos" runat="server" CssClass="form-control" type="number"></asp:TextBox>
|
<ajax:ValidatorCalloutExtender ID="VCEMoneda" runat="server" HighlightCssClass="vco"
|
||||||
|
TargetControlID="RFVMoneda" Width="400px">
|
||||||
|
</ajax:ValidatorCalloutExtender>
|
||||||
<div class="input-group-addon">
|
<div class="input-group-addon">
|
||||||
<i class="fa fa-usd"></i>
|
<i class="fa fa-money"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -301,13 +305,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
<div style="text-align: center; padding-top: 20px;">
|
||||||
<div style="text-align: center; padding-top: 20px;">
|
<asp:Button runat="server" Text="Guardar Cambios" ValidationGroup="GrpGuardar"
|
||||||
<asp:Button runat="server" Text="Guardar Cambios" ValidationGroup="GrpGuardar"
|
CssClass="btn btn-primary" OnClick="UpdateContrato" />
|
||||||
CssClass="btn btn-primary" OnClick="UpdateContrato" />
|
<asp:Button runat="server" Text="Eliminar" CssClass="btn btn-danger"
|
||||||
<asp:Button runat="server" Text="Eliminar" CssClass="btn btn-danger"
|
data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro de eliminar el contrato?(Si es contrato masivo, se eliminarán todos)"
|
||||||
data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro de eliminar el contrato?(Si es contrato masivo, se eliminarán todos)"
|
data-btn-ok-label="si" OnClick="EliminarContrato" />
|
||||||
data-btn-ok-label="si" OnClick="EliminarContrato" />
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<%-- Contrato Digitalizado --%>
|
<%-- Contrato Digitalizado --%>
|
||||||
@@ -320,7 +324,7 @@
|
|||||||
<input id="C_chkexpand1" type="checkbox" name="ctl00$C$chkexpand" checked="checked"></span>
|
<input id="C_chkexpand1" type="checkbox" name="ctl00$C$chkexpand" checked="checked"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="caption uppercase" style="position: relative;">
|
<div class="caption uppercase" style="position: relative;">
|
||||||
<i class="fa fa-info-circle"></i>Contrato Digitalizado
|
<i class="fa fa-file-pdf-o"></i>Contrato Digitalizado
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -349,6 +353,30 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<%-- Bitácora --%>
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="portlet light bordered">
|
||||||
|
<div class="portlet-title">
|
||||||
|
<div class="tools">
|
||||||
|
<a href="javascript;" data-idchekbox="C_chkexpand" class=" collapse" data-original-title=""
|
||||||
|
title=""></a><span class="hidden">
|
||||||
|
<input id="C_chkexpand2" type="checkbox" name="ctl00$C$chkexpand" checked="checked"></span>
|
||||||
|
</div>
|
||||||
|
<div class="caption uppercase" style="position: relative;">
|
||||||
|
<i class="fa fa-commenting"></i>Bitácora
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body rowpadding">
|
||||||
|
<asp:UpdatePanel ID="UPEventoBitacora" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:GridView ID="GvEventosBitacora" runat="server" AutoGenerateColumns="True"
|
||||||
|
GridLines="None">
|
||||||
|
</asp:GridView>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
@@ -574,6 +602,10 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<%-- Asientos --%>
|
<%-- Asientos --%>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<asp:TextBox runat="server" Text="Hola"/>
|
||||||
|
<asp:Image ID="Image1" runat="server" BackColor="Red" Width="100px" href=""/>
|
||||||
|
</div>
|
||||||
<asp:UpdatePanel runat="server" ID="UpBoletos" UpdateMode="Conditional">
|
<asp:UpdatePanel runat="server" ID="UpBoletos" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:Panel runat="server" ID="PnAsientos" class="col-md-4 center"
|
<asp:Panel runat="server" ID="PnAsientos" class="col-md-4 center"
|
||||||
|
|||||||
@@ -110,7 +110,11 @@ Partial Class RepContratoDetalle
|
|||||||
'Lista Tipo AF
|
'Lista Tipo AF
|
||||||
DdlTipoAF.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("MedidaVehicularClave IN (2,3)")
|
DdlTipoAF.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("MedidaVehicularClave IN (2,3)")
|
||||||
DdlTipoAF.DataBind()
|
DdlTipoAF.DataBind()
|
||||||
DdlTipoAF.Items.Insert(0, New ListItem("-", ""))
|
DdlTipoAF.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
|
||||||
|
'Lista de Monedas
|
||||||
|
DdlMoneda.DataSource = GlobalDTMonedas
|
||||||
|
DdlMoneda.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaDatos()
|
Private Sub CargaDatos()
|
||||||
'Información General
|
'Información General
|
||||||
@@ -118,7 +122,7 @@ Partial Class RepContratoDetalle
|
|||||||
If ObjContratos.GetContratos(CveContrato, UsuarioActual.CveEmpresa) Then
|
If ObjContratos.GetContratos(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||||
Contrato = ObjContratos.DtResultados
|
Contrato = ObjContratos.DtResultados
|
||||||
If Contrato IsNot Nothing AndAlso Contrato.Rows.Count > 0 Then
|
If Contrato IsNot Nothing AndAlso Contrato.Rows.Count > 0 Then
|
||||||
Dim Dolares As Decimal = Contrato.Rows(0)("Importe").ToString.ToDecimal
|
Dim Importe As Decimal = Contrato.Rows(0)("Importe").ToString.ToDecimal
|
||||||
Dim Pesos As Decimal = Contrato.Rows(0)("ImporteMax").ToString.ToDecimal
|
Dim Pesos As Decimal = Contrato.Rows(0)("ImporteMax").ToString.ToDecimal
|
||||||
Dim Anticipo As Decimal = Contrato.Rows(0)("ImporteMin").ToString.ToDecimal
|
Dim Anticipo As Decimal = Contrato.Rows(0)("ImporteMin").ToString.ToDecimal
|
||||||
|
|
||||||
@@ -136,8 +140,7 @@ Partial Class RepContratoDetalle
|
|||||||
TxtFechaRegreso.Text = Contrato.Rows(0)("FechaFinal").ToString
|
TxtFechaRegreso.Text = Contrato.Rows(0)("FechaFinal").ToString
|
||||||
TxtCantidadPasajeros.Text = Contrato.Rows(0)("CantidadPasajeros").ToString
|
TxtCantidadPasajeros.Text = Contrato.Rows(0)("CantidadPasajeros").ToString
|
||||||
DdlTipoAF.SelectedValue = If(Contrato.Rows(0)("CveTipoAF") Is Nothing, "", Contrato.Rows(0)("CveTipoAF").ToString)
|
DdlTipoAF.SelectedValue = If(Contrato.Rows(0)("CveTipoAF") Is Nothing, "", Contrato.Rows(0)("CveTipoAF").ToString)
|
||||||
TxtDolares.Text = Math.Round(Dolares, 2).ToString
|
TxtImporte.Text = Math.Round(Importe, 2).ToString
|
||||||
TxtPesos.Text = Math.Round(Pesos, 2).ToString
|
|
||||||
TxtAnticipo.Text = Math.Round(Anticipo, 2).ToString
|
TxtAnticipo.Text = Math.Round(Anticipo, 2).ToString
|
||||||
CveContratoEstatus = Contrato.Rows(0)("CveContratosEstatus").ToString.ToEntero
|
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
|
If Not IsDBNull(ObjContratos.Archivo) AndAlso ObjContratos.Archivo <> "" AndAlso ObjContratos.Archivo <> "-1" AndAlso ObjContratos.Archivo <> $"{ObjContratos.CveContrato}." Then
|
||||||
@@ -158,6 +161,14 @@ Partial Class RepContratoDetalle
|
|||||||
ObjTransportes.Dispose()
|
ObjTransportes.Dispose()
|
||||||
GvViajesPasajeros.DataBind()
|
GvViajesPasajeros.DataBind()
|
||||||
End If
|
End If
|
||||||
|
'Bitácora
|
||||||
|
Dim ObjEventoBitacora As New ClsOIEventos
|
||||||
|
If ObjEventoBitacora.GetEventos(-1, -1, -1, "-1", "-1", -1, -1, -1, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveContrato:=CveContrato) Then
|
||||||
|
GvEventosBitacora.DataSource = ObjEventoBitacora.DtResultados
|
||||||
|
GvEventosBitacora.DataBind()
|
||||||
|
End If
|
||||||
|
ObjEventoBitacora.Dispose()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
ObjContratos.Dispose()
|
ObjContratos.Dispose()
|
||||||
@@ -245,8 +256,7 @@ Partial Class RepContratoDetalle
|
|||||||
Dim ObjContratos As New ClsContratos
|
Dim ObjContratos As New ClsContratos
|
||||||
ObjContratos.IniciaTransacSQL()
|
ObjContratos.IniciaTransacSQL()
|
||||||
Try
|
Try
|
||||||
'ObjContratos.AddContratos(LbFolio.Text, TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, LbArchivo.Text, "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero, 0, CveContratoTipo:=34, CveContratosEstatus:=50, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero, Observaciones:=TxtObservaciones.Text)
|
If ObjContratos.UpdateContratos(CveContrato, LbFolio.Text, TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", LbCveSubProyecto.Text.ToEntero, -1, -1, -1, -1, ArchivoUpdate, "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, -1, TxtImporte.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero, 0, CveContratoTipo:=CveContratoTipo, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveContratosEstatus:=CveContratoEstatus) Then
|
||||||
If ObjContratos.UpdateContratos(CveContrato, LbFolio.Text, TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", LbCveSubProyecto.Text.ToEntero, -1, -1, -1, -1, ArchivoUpdate, "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=CveContratoTipo, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveContratosEstatus:=CveContratoEstatus) Then
|
|
||||||
Alert("Contrato actualizado correctamente")
|
Alert("Contrato actualizado correctamente")
|
||||||
End If
|
End If
|
||||||
ObjContratos.Commit()
|
ObjContratos.Commit()
|
||||||
@@ -255,6 +265,7 @@ Partial Class RepContratoDetalle
|
|||||||
ObjContratos.RollBack()
|
ObjContratos.RollBack()
|
||||||
Finally
|
Finally
|
||||||
ObjContratos.Dispose()
|
ObjContratos.Dispose()
|
||||||
|
AgregarABitacora($"Actualización del contrato {CveContrato}")
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
@@ -264,12 +275,16 @@ Partial Class RepContratoDetalle
|
|||||||
If CveMasivo <> 0 Then
|
If CveMasivo <> 0 Then
|
||||||
If ObjContratos.RemoveContrato(CveContrato, UsuarioActual.CveEmpresa, CveMasivo:=CveMasivo) Then
|
If ObjContratos.RemoveContrato(CveContrato, UsuarioActual.CveEmpresa, CveMasivo:=CveMasivo) Then
|
||||||
Alert("Viajes masivos eliminados correctamente")
|
Alert("Viajes masivos eliminados correctamente")
|
||||||
|
AgregarABitacora($"Eliminación del contrato {CveContrato}")
|
||||||
|
|
||||||
ObjContratos.Dispose()
|
ObjContratos.Dispose()
|
||||||
Response.Redirect("RepViajes.aspx")
|
Response.Redirect("RepViajes.aspx")
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If ObjContratos.RemoveContrato(CveContrato, UsuarioActual.CveEmpresa) Then
|
If ObjContratos.RemoveContrato(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||||
Alert("Viaje eliminado correctamente")
|
Alert("Viaje eliminado correctamente")
|
||||||
|
AgregarABitacora($"Eliminación de contratos masivos con clave {CveMasivo}")
|
||||||
|
|
||||||
ObjContratos.Dispose()
|
ObjContratos.Dispose()
|
||||||
Response.Redirect("RepViajes.aspx")
|
Response.Redirect("RepViajes.aspx")
|
||||||
End If
|
End If
|
||||||
@@ -296,13 +311,24 @@ Partial Class RepContratoDetalle
|
|||||||
New ReportParameter("FechaRegreso", TxtFechaRegreso.Text.ToDate.ToString("HH:mm")),
|
New ReportParameter("FechaRegreso", TxtFechaRegreso.Text.ToDate.ToString("HH:mm")),
|
||||||
New ReportParameter("CantidadPasajeros", TxtCantidadPasajeros.Text),
|
New ReportParameter("CantidadPasajeros", TxtCantidadPasajeros.Text),
|
||||||
New ReportParameter("TipoAF", DdlTipoAF.Text),
|
New ReportParameter("TipoAF", DdlTipoAF.Text),
|
||||||
New ReportParameter("Dolares", Math.Round(TxtDolares.Text.ToDecimal, 2).ToString),
|
New ReportParameter("Importe", Math.Round(TxtImporte.Text.ToDecimal, 2).ToString),
|
||||||
New ReportParameter("Pesos", Math.Round(TxtPesos.Text.ToDecimal, 2).ToString),
|
|
||||||
New ReportParameter("Anticipo", (TxtAnticipo.Text.ToDecimal * 100).ToString)
|
New ReportParameter("Anticipo", (TxtAnticipo.Text.ToDecimal * 100).ToString)
|
||||||
}
|
}
|
||||||
|
|
||||||
ImprimirPDFStimul($"{UsuarioActual.Empresa.Ruta}Formatos\Contrato.mrt", dtResult, params, NombreArchivo:="Contrato")
|
ImprimirPDFStimul($"{UsuarioActual.Empresa.Ruta}Formatos\Contrato.mrt", dtResult, params, NombreArchivo:="Contrato")
|
||||||
End Sub
|
End Sub
|
||||||
|
Protected Sub AgregarABitacora(Descripcion As String)
|
||||||
|
Dim ObjEventoBitacora As New ClsOIEventos
|
||||||
|
|
||||||
|
Dim FileExtension As String = "-1"
|
||||||
|
|
||||||
|
If ObjEventoBitacora.AddEventoBitacora(Descripcion, FileExtension, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveContrato:=CveContrato) Then
|
||||||
|
Alert("Evento agregado a bitácora correctamente", TipoMensaje.MsgInformacion)
|
||||||
|
|
||||||
|
End If
|
||||||
|
ObjEventoBitacora.Dispose()
|
||||||
|
|
||||||
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Boletos"
|
#Region "Boletos"
|
||||||
@@ -324,6 +350,8 @@ Partial Class RepContratoDetalle
|
|||||||
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalEditar"))
|
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalEditar"))
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub UpdateBoleto(sender As Object, e As EventArgs)
|
Protected Sub UpdateBoleto(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
|
||||||
If PnEditarViaje.Visible = True Then
|
If PnEditarViaje.Visible = True Then
|
||||||
For Each boleto As DataRow In ViajeActual.Rows
|
For Each boleto As DataRow In ViajeActual.Rows
|
||||||
If (boleto.Item("Asiento").ToString = TxtAsiento.Text) Then
|
If (boleto.Item("Asiento").ToString = TxtAsiento.Text) Then
|
||||||
@@ -346,6 +374,8 @@ Partial Class RepContratoDetalle
|
|||||||
ObjTransportes.RollBack()
|
ObjTransportes.RollBack()
|
||||||
Finally
|
Finally
|
||||||
Alert("Su asiento fue actualizado correctamente")
|
Alert("Su asiento fue actualizado correctamente")
|
||||||
|
AgregarABitacora($"Cambio de asiento del pasajero {CveViajePasajero} del asiento al {TxtAsiento.Text} del contrato {CveContrato}")
|
||||||
|
|
||||||
ObjTransportes.Dispose()
|
ObjTransportes.Dispose()
|
||||||
|
|
||||||
End Try
|
End Try
|
||||||
@@ -513,6 +543,15 @@ Partial Class RepContratoDetalle
|
|||||||
Alert($"No se pudo cambiar el estatus del boleto", TipoMensaje.MsgError)
|
Alert($"No se pudo cambiar el estatus del boleto", TipoMensaje.MsgError)
|
||||||
Finally
|
Finally
|
||||||
ObjTransportes.Dispose()
|
ObjTransportes.Dispose()
|
||||||
|
Dim toggleEstatus As String
|
||||||
|
If CBool(RblSexo.SelectedValue) Then
|
||||||
|
toggleEstatus = "Cancelación"
|
||||||
|
Else
|
||||||
|
toggleEstatus = "Reactivación"
|
||||||
|
|
||||||
|
End If
|
||||||
|
AgregarABitacora($"{toggleEstatus} del asiento {TxtAsiento.Text} del viaje {CveContrato} con clave de pasajero {CveViajePasajero}")
|
||||||
|
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
End Try
|
End Try
|
||||||
UpPasajeros.Update()
|
UpPasajeros.Update()
|
||||||
|
|||||||
@@ -227,7 +227,7 @@
|
|||||||
<div id="ModalAgregar" class="modal ADS fade" role="dialog">
|
<div id="ModalAgregar" class="modal ADS fade" role="dialog">
|
||||||
<asp:UpdatePanel runat="server" ID="UpModal" UpdateMode="Conditional">
|
<asp:UpdatePanel runat="server" ID="UpModal" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="modal-dialog">
|
<asp:Panel runat="server" class="modal-dialog" Width="50%">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
@@ -237,163 +237,215 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="row my-1">
|
|
||||||
<label class="col-md-4 bold text-primary">Folio</label>
|
|
||||||
<asp:Label class="col-md-8" runat="server" ID="LbFolio" Text="Folio"></asp:Label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row my-1">
|
|
||||||
<label class="col-md-4">Cliente</label>
|
|
||||||
<div class="col-md-8">
|
|
||||||
<ADS:Dropdownlost CssClassDdl="select2me form-control" ID="DdlClientes" Width="86%"
|
|
||||||
data-metodo="getcliente"
|
|
||||||
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 86%;"
|
|
||||||
UsaWebService="true" Enabled="false"></ADS:Dropdownlost>
|
|
||||||
<asp:LinkButton runat="server" CssClass="btn btn-primary fa-add" Width="12%"
|
|
||||||
PostBackUrl="~/Ventas/Clientes.aspx?CveCliente=-1"></asp:LinkButton>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-4">Servicio</label>
|
<div class="col-md-7">
|
||||||
<div class="col-md-8">
|
<div class="row my-1">
|
||||||
<asp:TextBox ID="TxtDescripcion" runat="server" MaxLength="70" Width="100%" CssClass="select2me form-control"
|
<label class="col-md-4 bold text-primary">Folio</label>
|
||||||
TextMode="MultiLine"
|
<asp:Label class="col-md-8" runat="server" ID="LbFolio" Text="Folio"></asp:Label>
|
||||||
Rows="2"></asp:TextBox>
|
</div>
|
||||||
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripcion"
|
|
||||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Servicio''</b> es necesario, por favor ingréselo."
|
|
||||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEDescripcion" runat="server" HighlightCssClass="vco"
|
|
||||||
TargetControlID="RFVDescripcion" Width="100%">
|
|
||||||
</ajax:ValidatorCalloutExtender>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row my-1">
|
<div class="row my-1">
|
||||||
<label class="col-md-4">Observaciones</label>
|
<label class="col-md-4">Cliente</label>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<asp:TextBox CssClass="select2me form-control" ID="TxtObservaciones" runat="server"
|
<div class="input-group">
|
||||||
MaxLength="70" Width="100%"
|
<ADS:Dropdownlost ID="DdlClientes" CssClass="form-control" data-metodo="getcliente"
|
||||||
TextMode="MultiLine"
|
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente"
|
||||||
Rows="2"></asp:TextBox>
|
UsaWebService="true" Enabled="false"></ADS:Dropdownlost>
|
||||||
</div>
|
<div class="input-group-addon" style="background-color: #428bca">
|
||||||
</div>
|
<asp:LinkButton runat="server" ForeColor="White" Text="<i class='fa fa-add'></i>"
|
||||||
|
PostBackUrl="~/Ventas/Clientes.aspx?CveCliente=-1"></asp:LinkButton>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-4">Lugar de Salida</label>
|
<label class="col-md-4">Servicio</label>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<asp:TextBox ID="TxtUbicacion" runat="server" MaxLength="70" Width="100%" CssClass="form-control"></asp:TextBox>
|
<div class="input-group">
|
||||||
</div>
|
<asp:TextBox ID="TxtDescripcion" runat="server" MaxLength="70" Width="100%"
|
||||||
</div>
|
TextMode="MultiLine"
|
||||||
|
Rows="3"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripcion"
|
||||||
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Servicio''</b> es necesario, por favor ingréselo."
|
||||||
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEDescripcion" runat="server" HighlightCssClass="vco"
|
||||||
|
TargetControlID="RFVDescripcion" Width="100%">
|
||||||
|
</ajax:ValidatorCalloutExtender>
|
||||||
|
<div class="input-group-addon">
|
||||||
|
<i class="fa fa-pencil"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row my-1">
|
<div class="row my-1">
|
||||||
<label class="col-md-4">Fecha Salida</label>
|
<label class="col-md-4">Observaciones</label>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<asp:TextBox ID="TxtFechaSalida" runat="server" CssClass="form-control" CausesValidation="True"
|
<div class="input-group">
|
||||||
Width="100%"
|
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="70" Width="100%"
|
||||||
type="datetime-local"></asp:TextBox>
|
TextMode="MultiLine"
|
||||||
<asp:RequiredFieldValidator ID="RFVTxtFechaSalida" runat="server" ControlToValidate="TxtFechaSalida"
|
Rows="3"></asp:TextBox>
|
||||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Salida''</b> es necesario, por favor ingréselo."
|
<div class="input-group-addon">
|
||||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<i class="fa fa-eye"></i>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCETxtFechaSalida" runat="server" HighlightCssClass="vco"
|
</div>
|
||||||
TargetControlID="RFVTxtFechaSalida" Width="100%">
|
</div>
|
||||||
</ajax:ValidatorCalloutExtender>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-4">Fecha Regreso</label>
|
<label class="col-md-4">Lugar de Salida</label>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<asp:TextBox ID="TxtFechaRegreso" runat="server" CssClass="form-control" CausesValidation="True"
|
<div class="input-group">
|
||||||
Width="100%"
|
<asp:TextBox ID="TxtUbicacion" runat="server" CssClass="form-control"></asp:TextBox>
|
||||||
type="datetime-local"></asp:TextBox>
|
<div class="input-group-addon">
|
||||||
<asp:RequiredFieldValidator ID="RFVTxtFechaRegreso" runat="server" ControlToValidate="TxtFechaRegreso"
|
<i class="fa fa-location"></i>
|
||||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Regreso''</b> es necesario, por favor ingréselo."
|
</div>
|
||||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
</div>
|
||||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco"
|
</div>
|
||||||
TargetControlID="RFVTxtFechaRegreso" Width="100%">
|
</div>
|
||||||
</ajax:ValidatorCalloutExtender>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row my-1">
|
<div class="row my-1">
|
||||||
<label class="col-md-4">Cantidad de pasajeros</label>
|
<label class="col-md-4">Fecha Salida</label>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<asp:TextBox ID="TxtCantidadPasajeros" CssClass="select2me form-control" runat="server"
|
<div class="input-group">
|
||||||
type="number"
|
<asp:TextBox ID="TxtFechaSalida" runat="server" CssClass="form-control" CausesValidation="True"
|
||||||
Width="100%"></asp:TextBox>
|
Width="100%"
|
||||||
<asp:RequiredFieldValidator ID="RFVCantidadPasajeros" runat="server" ControlToValidate="TxtCantidadPasajeros"
|
type="datetime"></asp:TextBox>
|
||||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad de pasajeros''</b> es necesario, por favor ingréselo."
|
<asp:RequiredFieldValidator ID="RFVTxtFechaSalida" runat="server" ControlToValidate="TxtFechaSalida"
|
||||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Salida''</b> es necesario, por favor ingréselo."
|
||||||
<ajax:ValidatorCalloutExtender ID="VCECantidadPasajeros" runat="server" HighlightCssClass="VCOCantidadPasajeros"
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
TargetControlID="RFVCantidadPasajeros" Width="100%">
|
<ajax:ValidatorCalloutExtender ID="VCETxtFechaSalida" runat="server" HighlightCssClass="vco"
|
||||||
</ajax:ValidatorCalloutExtender>
|
TargetControlID="RFVTxtFechaSalida" Width="100%">
|
||||||
</div>
|
</ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
<div class="input-group-addon">
|
||||||
|
<i class="fa fa-calendar"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-4">Tipo Unidad</label>
|
<label class="col-md-4">Fecha Regreso</label>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<asp:DropDownList ID="DdlTipoAF" AppendDataBoundItems="true" DataTextField="TipoActivoFijo"
|
<div class="input-group">
|
||||||
DataValueField="CveTipoActivoFijo" Class="table-group-action-input form-control input-inline select2me"
|
|
||||||
Width="100%" runat="server">
|
|
||||||
</asp:DropDownList>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVTipoAF" runat="server" ControlToValidate="DdlTipoAF"
|
|
||||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Unidad''</b> es necesario, por favor ingréselo."
|
|
||||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCETipoAF" runat="server" HighlightCssClass="vco"
|
|
||||||
TargetControlID="RFVTipoAF" Width="400px">
|
|
||||||
</ajax:ValidatorCalloutExtender>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row my-1">
|
<asp:TextBox ID="TxtFechaRegreso" runat="server" CssClass="form-control" CausesValidation="True"
|
||||||
<label class="col-md-4">Costo dólares</label>
|
Width="100%"
|
||||||
<div class="col-md-8">
|
type="datetime"></asp:TextBox>
|
||||||
<asp:TextBox ID="TxtDolares" CssStyle=" form-control" runat="server" type="number"
|
<asp:RequiredFieldValidator ID="RFVTxtFechaRegreso" runat="server" ControlToValidate="TxtFechaRegreso"
|
||||||
Width="95%"></asp:TextBox>
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Regreso''</b> es necesario, por favor ingréselo."
|
||||||
<span class="fa fa-dollar"></span>
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
</div>
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco"
|
||||||
</div>
|
TargetControlID="RFVTxtFechaRegreso" Width="100%">
|
||||||
|
</ajax:ValidatorCalloutExtender>
|
||||||
|
<div class="input-group-addon">
|
||||||
|
<i class="fa fa-calendar"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row my-1">
|
||||||
<label class="col-md-4">Costo pesos</label>
|
<label class="col-md-4">Cantidad de pasajeros</label>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<asp:TextBox ID="TxtPesos" CssStyle=" form-control" runat="server" type="number"
|
<div class="input-group">
|
||||||
Width="95%"></asp:TextBox>
|
|
||||||
<span class="fa fa-dollar"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row my-1">
|
<asp:TextBox ID="TxtCantidadPasajeros" runat="server" CssClass="form-control" CausesValidation="True"
|
||||||
<label class="col-md-4">Anticipo</label>
|
Width="100%"
|
||||||
<div class="col-md-8">
|
type="number" MaxLength="2" AutoPostBack="True" OnTextChanged="OnChangePasajeros"></asp:TextBox>
|
||||||
<asp:TextBox ID="TxtAnticipo" CssStyle="form-control" Width="95%" runat="server"
|
<asp:RequiredFieldValidator ID="RFVCantidadPasajeros" runat="server" ControlToValidate="TxtCantidadPasajeros"
|
||||||
type="decimal"></asp:TextBox>
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad de pasajeros''</b> es necesario, por favor ingréselo."
|
||||||
<span class="fa fa-percent"></span>
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
</div>
|
<ajax:ValidatorCalloutExtender ID="VCECantidadPasajeros" runat="server" HighlightCssClass="VCOCantidadPasajeros"
|
||||||
</div>
|
TargetControlID="RFVCantidadPasajeros" Width="100%">
|
||||||
|
</ajax:ValidatorCalloutExtender>
|
||||||
|
<div class="input-group-addon">
|
||||||
|
<i class="fa fa-users"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-4">Moneda</label>
|
<label class="col-md-4">Tipo Unidad</label>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<asp:DropDownList ID="DdlMoneda" AppendDataBoundItems="true" DataTextField="Moneda"
|
<div class="input-group">
|
||||||
DataValueField="CveMoneda"
|
|
||||||
CssClass="table-group-action-input form-control input-inline select2me"
|
|
||||||
Width="100%" runat="server">
|
|
||||||
</asp:DropDownList>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVMoneda" runat="server" ControlToValidate="DdlMoneda"
|
|
||||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Moneda''</b> es necesario, por favor ingréselo."
|
|
||||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEMoneda" runat="server" HighlightCssClass="vco"
|
|
||||||
TargetControlID="RFVMoneda" Width="400px">
|
|
||||||
</ajax:ValidatorCalloutExtender>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row my-1">
|
<asp:DropDownList ID="DdlTipoAF" AppendDataBoundItems="true" DataTextField="TipoActivoFijo"
|
||||||
<label class="col-md-4">Archivo</label>
|
DataValueField="CveTipoActivoFijo" Class="table-group-action-input form-control input-inline select2me"
|
||||||
<asp:Label ID="LbArchivo" runat="server" CssClass="col-md-8" Text=""></asp:Label>
|
Width="100%" runat="server">
|
||||||
|
</asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVTipoAF" runat="server" ControlToValidate="DdlTipoAF"
|
||||||
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Unidad''</b> es necesario, por favor ingréselo."
|
||||||
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCETipoAF" runat="server" HighlightCssClass="vco"
|
||||||
|
TargetControlID="RFVTipoAF" Width="400px">
|
||||||
|
</ajax:ValidatorCalloutExtender>
|
||||||
|
<div class="input-group-addon">
|
||||||
|
<i class="fa fa-bus"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row my-1">
|
||||||
|
<label class="col-md-4">Importe</label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
|
||||||
|
<asp:TextBox ID="TxtImporte" runat="server" CssClass="form-control col-md-6" type="number"
|
||||||
|
Width="40%"></asp:TextBox>
|
||||||
|
<div class="input-group col-md-6" style="width: 59%">
|
||||||
|
<div class="input-group-addon">
|
||||||
|
<i class="fa fa-usd"></i>
|
||||||
|
</div>
|
||||||
|
<asp:DropDownList ID="DdlMoneda" AppendDataBoundItems="true" DataTextField="Moneda"
|
||||||
|
DataValueField="CveMoneda"
|
||||||
|
CssClass="form-control"
|
||||||
|
Width="100%" runat="server">
|
||||||
|
</asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVMoneda" runat="server" ControlToValidate="DdlMoneda"
|
||||||
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Moneda''</b> es necesario, por favor ingréselo."
|
||||||
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEMoneda" runat="server" HighlightCssClass="vco"
|
||||||
|
TargetControlID="RFVMoneda" Width="400px">
|
||||||
|
</ajax:ValidatorCalloutExtender>
|
||||||
|
<div class="input-group-addon">
|
||||||
|
<i class="fa fa-money"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-4">Anticipo</label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<div class="input-group">
|
||||||
|
<asp:TextBox ID="TxtAnticipo" runat="server" CssClass="form-control" type="number"></asp:TextBox>
|
||||||
|
<div class="input-group-addon">
|
||||||
|
<i class="fa fa-percent"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-5">
|
||||||
|
<div class="row my-1">
|
||||||
|
<label class="col-md-4">Archivo</label>
|
||||||
|
<asp:Label ID="LbArchivo" runat="server" CssClass="col-md-8" Text=""></asp:Label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<asp:UpdatePanel runat="server" ID="UPAddEventoBitacora" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<asp:TextBox ID="Anexo" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -408,7 +460,7 @@
|
|||||||
aria-hidden="true"></i>Subir Archivo</button>
|
aria-hidden="true"></i>Subir Archivo</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</asp:Panel>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
@@ -445,44 +497,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
<%-- Modal Archivo--%>
|
|
||||||
<asp:UpdatePanel runat="server" ID="UpArchivo" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div id="ModalUpload" class="modal ADS fade" role="dialog">
|
|
||||||
<div class="modal-dialog">
|
|
||||||
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header ">
|
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
||||||
<h4 class="modal-title">Subir Archivo</h4>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal-body">
|
|
||||||
<asp:UpdatePanel runat="server" ID="UPAddEventoBitacora" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<asp:TextBox ID="Anexo" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<asp:UpdatePanel runat="server">
|
|
||||||
<ContentTemplate>
|
|
||||||
<asp:Button runat="server" ClientIDMode="Static" Text="Guardar" CssClass="btn btn-primary"
|
|
||||||
OnClick="GuardarArchivo" />
|
|
||||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
|
||||||
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ Partial Class ListadoContratos
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Carga Página"
|
#Region "Carga Página"
|
||||||
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
|
||||||
txtFechaI.Text = DateTime.Now.AddMonths(-1).ToShortDateString
|
txtFechaI.Text = DateTime.Now.AddMonths(-1).ToShortDateString
|
||||||
@@ -34,7 +33,8 @@ Partial Class ListadoContratos
|
|||||||
'Lista Tipo AF
|
'Lista Tipo AF
|
||||||
DdlTipoAF.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("MedidaVehicularClave IN (2,3)")
|
DdlTipoAF.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("MedidaVehicularClave IN (2,3)")
|
||||||
DdlTipoAF.DataBind()
|
DdlTipoAF.DataBind()
|
||||||
DdlTipoAF.Items.Insert(0, New ListItem("-", ""))
|
DdlTipoAF.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
DdlTipoAF.SelectedValue = "-1"
|
||||||
|
|
||||||
DdlTipoUnidad.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("MedidaVehicularClave IN (2,3)")
|
DdlTipoUnidad.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("MedidaVehicularClave IN (2,3)")
|
||||||
DdlTipoUnidad.DataBind()
|
DdlTipoUnidad.DataBind()
|
||||||
@@ -74,6 +74,21 @@ Partial Class ListadoContratos
|
|||||||
UpTitulos.Update()
|
UpTitulos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
#Region "Contrato"
|
||||||
|
Protected Sub OnChangePasajeros(sender As Object, e As EventArgs)
|
||||||
|
If TxtCantidadPasajeros.Text.ToDecimal > 19 Then
|
||||||
|
Dim sprintersItem As ListItem = DdlTipoAF.Items.FindByText("Sprinter")
|
||||||
|
If sprintersItem IsNot Nothing Then
|
||||||
|
DdlTipoAF.Items.Remove(sprintersItem)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Dim sprintersItem As ListItem = DdlTipoAF.Items.FindByText("Sprinter")
|
||||||
|
If sprintersItem Is Nothing Then
|
||||||
|
DdlTipoAF.Items.Add(New ListItem("Sprinter", "183"))
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
Protected Sub AddContrato(sender As Object, e As EventArgs)
|
Protected Sub AddContrato(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
If DdlClientes.SelectedValue = "" Then
|
If DdlClientes.SelectedValue = "" Then
|
||||||
@@ -85,7 +100,7 @@ Partial Class ListadoContratos
|
|||||||
'Agregamos Contrato
|
'Agregamos Contrato
|
||||||
Dim ObjContratos As New ClsContratos
|
Dim ObjContratos As New ClsContratos
|
||||||
ObjContratos.IniciaTransacSQL()
|
ObjContratos.IniciaTransacSQL()
|
||||||
If ObjContratos.AddContratos(LbFolio.Text, TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDateTime, TxtFechaRegreso.Text.ToDateTime, TxtUbicacion.Text, "", CveSubProyecto, -1, -1, -1, -1, LbArchivo.Text, "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero, 0, CveContratoTipo:=34, CveContratosEstatus:=50, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero, Observaciones:=TxtObservaciones.Text) > 0 Then
|
If ObjContratos.AddContratos(LbFolio.Text, TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDateTime, TxtFechaRegreso.Text.ToDateTime, TxtUbicacion.Text, "", CveSubProyecto, -1, -1, -1, -1, LbArchivo.Text, "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, -1, TxtImporte.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero, 0, CveContratoTipo:=34, CveContratosEstatus:=50, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero, Observaciones:=TxtObservaciones.Text) > 0 Then
|
||||||
ObjContratos.Commit()
|
ObjContratos.Commit()
|
||||||
Alert("Agregado Correctamente.")
|
Alert("Agregado Correctamente.")
|
||||||
End If
|
End If
|
||||||
@@ -105,8 +120,7 @@ Partial Class ListadoContratos
|
|||||||
TxtUbicacion.Text = ""
|
TxtUbicacion.Text = ""
|
||||||
DdlClientes.SelectedText = ""
|
DdlClientes.SelectedText = ""
|
||||||
DdlTipoAF.SelectedValue = ""
|
DdlTipoAF.SelectedValue = ""
|
||||||
TxtDolares.Text = ""
|
TxtImporte.Text = ""
|
||||||
TxtPesos.Text = ""
|
|
||||||
TxtAnticipo.Text = ""
|
TxtAnticipo.Text = ""
|
||||||
TxtCantidadPasajeros.Text = ""
|
TxtCantidadPasajeros.Text = ""
|
||||||
LbArchivo.Text = ""
|
LbArchivo.Text = ""
|
||||||
@@ -188,10 +202,10 @@ Partial Class ListadoContratos
|
|||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
UpArchivo.Update()
|
|
||||||
UpModal.Update()
|
UpModal.Update()
|
||||||
|
|
||||||
RegistraScript("$('#ModalUpload').modal('hide')", "hidemodal1")
|
RegistraScript("$('#ModalUpload').modal('hide')", "hidemodal1")
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user