--
This commit is contained in:
@@ -114,9 +114,9 @@
|
||||
|
||||
<div class="portlet-body form">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-4">
|
||||
<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>
|
||||
<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."
|
||||
@@ -126,16 +126,29 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtVisa" runat="server" Width="100%" CssClass="form-control"></asp:TextBox>
|
||||
<label>Visa:</label>
|
||||
<asp:TextBox ID="TxtINE" runat="server" Width="100%" CssClass="form-control" MaxLength="15"></asp:TextBox>
|
||||
<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 class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="RblSexo" CssClass="form-control input-sm select2me" runat="server">
|
||||
<asp:ListItem Text="Masculino" Value="1" Selected="True" />
|
||||
@@ -146,23 +159,50 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-4">
|
||||
<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:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" CssClass="help-block errorimput"
|
||||
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:TextBox ID="TxtVisa" runat="server" Width="100%" CssClass="form-control"
|
||||
type="text" MaxLength="15"></asp:TextBox>
|
||||
<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>
|
||||
<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 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>
|
||||
@@ -237,7 +277,7 @@
|
||||
</div>
|
||||
<%-- Botón para Agregar Pasajero(Oculto) --%>
|
||||
<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"
|
||||
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"
|
||||
@@ -249,11 +289,12 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<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>
|
||||
<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="Visa" HeaderText="Visa" />
|
||||
<asp:BoundField DataField="Celular" HeaderText="Celular" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField DataField="Observaciones" HeaderText="Observaciones" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField DataField="Asiento" HeaderText="Asiento" ItemStyle-HorizontalAlign="Center" />
|
||||
|
||||
@@ -59,6 +59,7 @@ Partial Class Boletos
|
||||
|
||||
|
||||
#End Region
|
||||
#Region "Carga Página"
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack 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("Numero", GetType(Integer))
|
||||
DtPasajeros.Columns.Add("Nombre", GetType(String))
|
||||
DtPasajeros.Columns.Add("INE", 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("CveSexo", GetType(Integer))
|
||||
DtPasajeros.Columns.Add("Celular", GetType(String))
|
||||
@@ -140,29 +144,15 @@ Partial Class Boletos
|
||||
If ObjDestinos.GetDestinosTarifas(CveSubProyecto, -1, -1) Then
|
||||
If ObjDestinos.DtResultados.Rows.Count > 0 Then
|
||||
DtDestinos = ObjDestinos.DtResultados
|
||||
DdlPartida.DataSource = DtDestinos.FiltraParametros("", DistinctColumns:={"CveDestinoOrigen", "Partida"})
|
||||
DdlPartida.DataBind()
|
||||
DdlPartida.DataSource = DtDestinos.FiltraParametros("", DistinctColumns:={"CveDestinoOrigen", "Partida"}) : DataBind()
|
||||
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
|
||||
|
||||
'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()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub CotizarTarifa()
|
||||
If DdlDestino.SelectedValue <> "-1" And DdlPartida.SelectedValue <> "-1" Then
|
||||
Dim ImporteR As Decimal = 0
|
||||
@@ -170,7 +160,18 @@ Partial Class Boletos
|
||||
Dim CveSubProyecto As Integer = Contrato.Rows(0)("CveSubProyecto").ToString.ToEntero
|
||||
|
||||
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
|
||||
If ImporteR > 0 Then
|
||||
ViewState("Importe") = ImporteR
|
||||
@@ -216,22 +217,9 @@ Partial Class Boletos
|
||||
|
||||
Try
|
||||
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
|
||||
TieneError = True
|
||||
@@ -328,6 +316,12 @@ Partial Class Boletos
|
||||
DdlDestino.Items.Insert(0, New ListItem("Seleccione Destino", "-1"))
|
||||
End Sub
|
||||
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()
|
||||
End Sub
|
||||
Private Sub GeneraPasajeros(Cantidad As Integer)
|
||||
@@ -353,24 +347,30 @@ Partial Class Boletos
|
||||
Exit Sub
|
||||
End If
|
||||
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("Destino") = DdlDestino.SelectedItem
|
||||
Dr1("CveDestinoOrigen") = DdlPartida.SelectedValue.ToEntero
|
||||
Dr1("CveDestinoFinal") = DdlDestino.SelectedValue.ToEntero
|
||||
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'
|
||||
DtPasajeros.Rows.Add(Dr1)
|
||||
AsientoSeleccionado = ""
|
||||
TxtNombre.Text = ""
|
||||
TxtINE.Text = ""
|
||||
TxtFechaNacimiento.Text = ""
|
||||
TxtVisa.Text = ""
|
||||
TxtCelular.Text = ""
|
||||
TxtVisaVigencia.Text = ""
|
||||
TxtCelular.Text = ""
|
||||
TxtObservaciones.Text = ""
|
||||
GvB.DataSource = DtPasajeros
|
||||
@@ -408,7 +408,7 @@ Partial Class Boletos
|
||||
Return Retorno
|
||||
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
|
||||
'TOMA EL SUBPROYECTO DEL CLIENTE
|
||||
@@ -426,8 +426,8 @@ Partial Class Boletos
|
||||
ObjFactura.SetSubProyectoMatriz()
|
||||
|
||||
For Each Dr As DataRow In DtPasajeros.Rows
|
||||
Dim Obs = Dr("Observaciones").ToString
|
||||
Dim Importe = Dr("Importe").ToString.ToDecimal()
|
||||
Dim Obs As String = Dr("Observaciones").ToString
|
||||
Dim Importe As Decimal = Dr("Importe").ToString.ToDecimal()
|
||||
|
||||
If Importe <= 0 Then
|
||||
Retorno.Mensajes.Add("El importe debe ser mayor a 0")
|
||||
@@ -477,8 +477,5 @@ Partial Class Boletos
|
||||
|
||||
Return Retorno
|
||||
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
|
||||
|
||||
@@ -266,25 +266,29 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Costo dólares</label>
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Importe</label>
|
||||
<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">
|
||||
<i class="fa fa-usd"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Costo pesos</label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group">
|
||||
<asp:TextBox ID="TxtPesos" runat="server" CssClass="form-control" type="number"></asp:TextBox>
|
||||
<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-usd"></i>
|
||||
<i class="fa fa-money"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -301,13 +305,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div style="text-align: center; padding-top: 20px;">
|
||||
<asp:Button runat="server" Text="Guardar Cambios" ValidationGroup="GrpGuardar"
|
||||
CssClass="btn btn-primary" OnClick="UpdateContrato" />
|
||||
<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-btn-ok-label="si" OnClick="EliminarContrato" />
|
||||
<div style="text-align: center; padding-top: 20px;">
|
||||
<asp:Button runat="server" Text="Guardar Cambios" ValidationGroup="GrpGuardar"
|
||||
CssClass="btn btn-primary" OnClick="UpdateContrato" />
|
||||
<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-btn-ok-label="si" OnClick="EliminarContrato" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- Contrato Digitalizado --%>
|
||||
@@ -320,7 +324,7 @@
|
||||
<input id="C_chkexpand1" type="checkbox" name="ctl00$C$chkexpand" checked="checked"></span>
|
||||
</div>
|
||||
<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>
|
||||
|
||||
@@ -349,6 +353,30 @@
|
||||
</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>
|
||||
</ContentTemplate>
|
||||
@@ -574,6 +602,10 @@
|
||||
|
||||
</div>
|
||||
<%-- 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">
|
||||
<ContentTemplate>
|
||||
<asp:Panel runat="server" ID="PnAsientos" class="col-md-4 center"
|
||||
|
||||
@@ -110,7 +110,11 @@ Partial Class RepContratoDetalle
|
||||
'Lista Tipo AF
|
||||
DdlTipoAF.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("MedidaVehicularClave IN (2,3)")
|
||||
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
|
||||
Private Sub CargaDatos()
|
||||
'Información General
|
||||
@@ -118,7 +122,7 @@ 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 Importe 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
|
||||
|
||||
@@ -136,8 +140,7 @@ 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 = Math.Round(Dolares, 2).ToString
|
||||
TxtPesos.Text = Math.Round(Pesos, 2).ToString
|
||||
TxtImporte.Text = Math.Round(Importe, 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
|
||||
@@ -158,6 +161,14 @@ Partial Class RepContratoDetalle
|
||||
ObjTransportes.Dispose()
|
||||
GvViajesPasajeros.DataBind()
|
||||
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
|
||||
Else
|
||||
ObjContratos.Dispose()
|
||||
@@ -245,8 +256,7 @@ Partial Class RepContratoDetalle
|
||||
Dim ObjContratos As New ClsContratos
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
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, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 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, -1, TxtImporte.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero, 0, CveContratoTipo:=CveContratoTipo, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveContratosEstatus:=CveContratoEstatus) Then
|
||||
Alert("Contrato actualizado correctamente")
|
||||
End If
|
||||
ObjContratos.Commit()
|
||||
@@ -255,6 +265,7 @@ Partial Class RepContratoDetalle
|
||||
ObjContratos.RollBack()
|
||||
Finally
|
||||
ObjContratos.Dispose()
|
||||
AgregarABitacora($"Actualización del contrato {CveContrato}")
|
||||
CargaDatos()
|
||||
End Try
|
||||
End Sub
|
||||
@@ -264,12 +275,16 @@ Partial Class RepContratoDetalle
|
||||
If CveMasivo <> 0 Then
|
||||
If ObjContratos.RemoveContrato(CveContrato, UsuarioActual.CveEmpresa, CveMasivo:=CveMasivo) Then
|
||||
Alert("Viajes masivos eliminados correctamente")
|
||||
AgregarABitacora($"Eliminación del contrato {CveContrato}")
|
||||
|
||||
ObjContratos.Dispose()
|
||||
Response.Redirect("RepViajes.aspx")
|
||||
End If
|
||||
Else
|
||||
If ObjContratos.RemoveContrato(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||
Alert("Viaje eliminado correctamente")
|
||||
AgregarABitacora($"Eliminación de contratos masivos con clave {CveMasivo}")
|
||||
|
||||
ObjContratos.Dispose()
|
||||
Response.Redirect("RepViajes.aspx")
|
||||
End If
|
||||
@@ -296,13 +311,24 @@ Partial Class RepContratoDetalle
|
||||
New ReportParameter("FechaRegreso", TxtFechaRegreso.Text.ToDate.ToString("HH:mm")),
|
||||
New ReportParameter("CantidadPasajeros", TxtCantidadPasajeros.Text),
|
||||
New ReportParameter("TipoAF", DdlTipoAF.Text),
|
||||
New ReportParameter("Dolares", Math.Round(TxtDolares.Text.ToDecimal, 2).ToString),
|
||||
New ReportParameter("Pesos", Math.Round(TxtPesos.Text.ToDecimal, 2).ToString),
|
||||
New ReportParameter("Importe", Math.Round(TxtImporte.Text.ToDecimal, 2).ToString),
|
||||
New ReportParameter("Anticipo", (TxtAnticipo.Text.ToDecimal * 100).ToString)
|
||||
}
|
||||
|
||||
ImprimirPDFStimul($"{UsuarioActual.Empresa.Ruta}Formatos\Contrato.mrt", dtResult, params, NombreArchivo:="Contrato")
|
||||
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
|
||||
|
||||
#Region "Boletos"
|
||||
@@ -324,6 +350,8 @@ Partial Class RepContratoDetalle
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalEditar"))
|
||||
End Sub
|
||||
Protected Sub UpdateBoleto(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
If PnEditarViaje.Visible = True Then
|
||||
For Each boleto As DataRow In ViajeActual.Rows
|
||||
If (boleto.Item("Asiento").ToString = TxtAsiento.Text) Then
|
||||
@@ -346,6 +374,8 @@ Partial Class RepContratoDetalle
|
||||
ObjTransportes.RollBack()
|
||||
Finally
|
||||
Alert("Su asiento fue actualizado correctamente")
|
||||
AgregarABitacora($"Cambio de asiento del pasajero {CveViajePasajero} del asiento al {TxtAsiento.Text} del contrato {CveContrato}")
|
||||
|
||||
ObjTransportes.Dispose()
|
||||
|
||||
End Try
|
||||
@@ -513,6 +543,15 @@ Partial Class RepContratoDetalle
|
||||
Alert($"No se pudo cambiar el estatus del boleto", TipoMensaje.MsgError)
|
||||
Finally
|
||||
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()
|
||||
End Try
|
||||
UpPasajeros.Update()
|
||||
|
||||
@@ -227,7 +227,7 @@
|
||||
<div id="ModalAgregar" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel runat="server" ID="UpModal" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-dialog">
|
||||
<asp:Panel runat="server" class="modal-dialog" Width="50%">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
@@ -237,163 +237,215 @@
|
||||
</div>
|
||||
|
||||
<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">
|
||||
<label class="col-md-4">Servicio</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" MaxLength="70" Width="100%" CssClass="select2me form-control"
|
||||
TextMode="MultiLine"
|
||||
Rows="2"></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>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<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">Observaciones</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox CssClass="select2me form-control" ID="TxtObservaciones" runat="server"
|
||||
MaxLength="70" Width="100%"
|
||||
TextMode="MultiLine"
|
||||
Rows="2"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Cliente</label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group">
|
||||
<ADS:Dropdownlost ID="DdlClientes" CssClass="form-control" data-metodo="getcliente"
|
||||
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente"
|
||||
UsaWebService="true" Enabled="false"></ADS:Dropdownlost>
|
||||
<div class="input-group-addon" style="background-color: #428bca">
|
||||
<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">
|
||||
<label class="col-md-4">Lugar de Salida</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtUbicacion" runat="server" MaxLength="70" Width="100%" CssClass="form-control"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-4">Servicio</label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group">
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" MaxLength="70" Width="100%"
|
||||
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">
|
||||
<label class="col-md-4">Fecha Salida</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtFechaSalida" runat="server" CssClass="form-control" CausesValidation="True"
|
||||
Width="100%"
|
||||
type="datetime-local"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtFechaSalida" runat="server" ControlToValidate="TxtFechaSalida"
|
||||
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."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETxtFechaSalida" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTxtFechaSalida" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Observaciones</label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="70" Width="100%"
|
||||
TextMode="MultiLine"
|
||||
Rows="3"></asp:TextBox>
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-eye"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Fecha Regreso</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtFechaRegreso" runat="server" CssClass="form-control" CausesValidation="True"
|
||||
Width="100%"
|
||||
type="datetime-local"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtFechaRegreso" runat="server" ControlToValidate="TxtFechaRegreso"
|
||||
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."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTxtFechaRegreso" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-4">Lugar de Salida</label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group">
|
||||
<asp:TextBox ID="TxtUbicacion" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-location"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Cantidad de pasajeros</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtCantidadPasajeros" CssClass="select2me form-control" runat="server"
|
||||
type="number"
|
||||
Width="100%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCantidadPasajeros" runat="server" ControlToValidate="TxtCantidadPasajeros"
|
||||
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."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECantidadPasajeros" runat="server" HighlightCssClass="VCOCantidadPasajeros"
|
||||
TargetControlID="RFVCantidadPasajeros" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Fecha Salida</label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group">
|
||||
<asp:TextBox ID="TxtFechaSalida" runat="server" CssClass="form-control" CausesValidation="True"
|
||||
Width="100%"
|
||||
type="datetime"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtFechaSalida" runat="server" ControlToValidate="TxtFechaSalida"
|
||||
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."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETxtFechaSalida" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTxtFechaSalida" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Tipo Unidad</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlTipoAF" AppendDataBoundItems="true" DataTextField="TipoActivoFijo"
|
||||
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">
|
||||
<label class="col-md-4">Fecha Regreso</label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group">
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Costo dólares</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtDolares" CssStyle=" form-control" runat="server" type="number"
|
||||
Width="95%"></asp:TextBox>
|
||||
<span class="fa fa-dollar"></span>
|
||||
</div>
|
||||
</div>
|
||||
<asp:TextBox ID="TxtFechaRegreso" runat="server" CssClass="form-control" CausesValidation="True"
|
||||
Width="100%"
|
||||
type="datetime"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtFechaRegreso" runat="server" ControlToValidate="TxtFechaRegreso"
|
||||
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."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTxtFechaRegreso" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Costo pesos</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtPesos" CssStyle=" form-control" runat="server" type="number"
|
||||
Width="95%"></asp:TextBox>
|
||||
<span class="fa fa-dollar"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Cantidad de pasajeros</label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group">
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Anticipo</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtAnticipo" CssStyle="form-control" Width="95%" runat="server"
|
||||
type="decimal"></asp:TextBox>
|
||||
<span class="fa fa-percent"></span>
|
||||
</div>
|
||||
</div>
|
||||
<asp:TextBox ID="TxtCantidadPasajeros" runat="server" CssClass="form-control" CausesValidation="True"
|
||||
Width="100%"
|
||||
type="number" MaxLength="2" AutoPostBack="True" OnTextChanged="OnChangePasajeros"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCantidadPasajeros" runat="server" ControlToValidate="TxtCantidadPasajeros"
|
||||
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."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECantidadPasajeros" runat="server" HighlightCssClass="VCOCantidadPasajeros"
|
||||
TargetControlID="RFVCantidadPasajeros" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-users"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Moneda</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlMoneda" AppendDataBoundItems="true" DataTextField="Moneda"
|
||||
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">
|
||||
<label class="col-md-4">Tipo Unidad</label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group">
|
||||
|
||||
<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>
|
||||
<asp:DropDownList ID="DdlTipoAF" AppendDataBoundItems="true" DataTextField="TipoActivoFijo"
|
||||
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 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>
|
||||
|
||||
@@ -408,7 +460,7 @@
|
||||
aria-hidden="true"></i>Subir Archivo</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
@@ -445,44 +497,7 @@
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</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>
|
||||
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ Partial Class ListadoContratos
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region "Carga Página"
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
txtFechaI.Text = DateTime.Now.AddMonths(-1).ToShortDateString
|
||||
@@ -34,7 +33,8 @@ Partial Class ListadoContratos
|
||||
'Lista Tipo AF
|
||||
DdlTipoAF.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("MedidaVehicularClave IN (2,3)")
|
||||
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.DataBind()
|
||||
@@ -74,6 +74,21 @@ Partial Class ListadoContratos
|
||||
UpTitulos.Update()
|
||||
End Sub
|
||||
#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)
|
||||
|
||||
If DdlClientes.SelectedValue = "" Then
|
||||
@@ -85,7 +100,7 @@ Partial Class ListadoContratos
|
||||
'Agregamos Contrato
|
||||
Dim ObjContratos As New ClsContratos
|
||||
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()
|
||||
Alert("Agregado Correctamente.")
|
||||
End If
|
||||
@@ -105,8 +120,7 @@ Partial Class ListadoContratos
|
||||
TxtUbicacion.Text = ""
|
||||
DdlClientes.SelectedText = ""
|
||||
DdlTipoAF.SelectedValue = ""
|
||||
TxtDolares.Text = ""
|
||||
TxtPesos.Text = ""
|
||||
TxtImporte.Text = ""
|
||||
TxtAnticipo.Text = ""
|
||||
TxtCantidadPasajeros.Text = ""
|
||||
LbArchivo.Text = ""
|
||||
@@ -188,10 +202,10 @@ Partial Class ListadoContratos
|
||||
|
||||
Next
|
||||
|
||||
UpArchivo.Update()
|
||||
UpModal.Update()
|
||||
|
||||
RegistraScript("$('#ModalUpload').modal('hide')", "hidemodal1")
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user