This commit is contained in:
2024-01-31 17:42:36 -07:00
9 changed files with 346 additions and 265 deletions

View File

@@ -54,6 +54,10 @@ Public Class CalendarEvent
Public Property MovimientoFolio As String
Public Property CveIE As Integer
Public Property FolioIE As String
Public Property Pesos As Double
Public Property Dolares As Double
Public Property Anticipo As Double
End Class

View File

@@ -406,7 +406,7 @@ Public Class ClsContratos
Optional CveContratosEstatus As Integer = -1, Optional CveContratoTipo As Integer = -1, Optional TipoCambio As Double = 1.0, Optional CveSucursalCliente As Integer = -1, Optional CveAlmacenOrigen As Integer = -1, Optional CveAlmacenDestino As Integer = -1, Optional PorcentajeComision As Integer = -1,
Optional TipoGarantia As Integer = -1, Optional Folio As Integer = -1, Optional FechaVenc As Date = Nothing, Optional EstatusFianza As Integer = -1, Optional CveContratoPlantilla As Integer = -1, Optional CveCuentaEquipo As Integer = -1,
Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", Optional FacturacionCicilica As Boolean = False, Optional FacturacionCiclicaAutomatico As Boolean = False,
Optional DiaMesFacturacion As Integer = 1, Optional CvePeriodo As Integer = -1, Optional ObservacionesGenerales As String = "") As Boolean
Optional DiaMesFacturacion As Integer = 1, Optional CvePeriodo As Integer = -1, Optional ObservacionesGenerales As String = "", Optional CveTipoAF As Integer = -1, Optional CveChofer As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Con_ContratosUpdate")
@@ -428,17 +428,16 @@ Public Class ClsContratos
.Add("@PorAnticipo", SqlDbType.Float).Value = PorAnticipo
.Add("@PorAmortizacionAnticipo", SqlDbType.Float).Value = PorAmortizacionAnticipo
.Add("@PorGarantia", SqlDbType.Float).Value = PorGarantia
'.Add("@EstatusContrato", SqlDbType.Bit).Value = EstatusContrato
.Add("@Archivo", SqlDbType.VarChar).Value = Archivo
.Add("@Geom", SqlDbType.VarChar).Value = Geom
.Add("@CveContratoPadre", SqlDbType.Int).Value = CveContratoPadre
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@EsPresupuestal", SqlDbType.Int).Value = EsPresupuestal
.Add("@EsPresupuestal", SqlDbType.Int).Value = EsPresupuestal
.Add("@CveContratoTipo", SqlDbType.SmallInt).Value = CveContratoTipo
.Add("@ImporteMin", SqlDbType.Money).Value = Minimo
.Add("@ImporteMax", SqlDbType.Money).Value = Maximo
.Add("@Importe", SqlDbType.Money).Value = Importe
.Add("@CveContratoTipo", SqlDbType.SmallInt).Value = CveContratoTipo
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
.Add("@TipoCambio", SqlDbType.Money).Value = TipoCambio
.Add("@ModalidadDetalle", SqlDbType.TinyInt).Value = ModalidadDetalle
@@ -462,7 +461,8 @@ Public Class ClsContratos
.Add("@DiaMesFacturacion", SqlDbType.TinyInt).Value = DiaMesFacturacion
.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
.Add("@ObservacionesGenerales", SqlDbType.VarChar).Value = ObservacionesGenerales
.Add("@CveTipoAF", SqlDbType.Int).Value = CveTipoAF
.Add("@CveChofer", SqlDbType.Int).Value = CveChofer
End With
Try

View File

@@ -464,7 +464,13 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime)
cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime)) 'Agregar una hora, fecha final como default
cevent.allDay = False
cevent.CveEventoEstatus = dr("NumeroContrato").ToString.ToEntero
cevent.NombreAcercamiento = dr("Ubicacion").ToString
cevent.CveCliente = dr("CveCliente").ToString.ToEntero
cevent.CveActivoFijo = dr("CveTipoAF").ToString.ToEntero
cevent.CvePersonal = dr("CveChofer").ToString.ToEntero
cevent.Dolares = dr("Importe").ToString.ToDecimal
cevent.Pesos = dr("ImporteMax").ToString.ToDecimal
cevent.Anticipo = dr("ImporteMin").ToString.ToDecimal
If Not cevent.recurrenciatipo > 0 Then
@@ -520,7 +526,11 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime)
cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime))
cevent.allDay = False
cevent.CveEventoEstatus = dr("NumeroContrato").ToString.ToEntero
cevent.CveCliente = dr("CveCliente").ToString.ToEntero
cevent.NombreAcercamiento = dr("Ubicacion").ToString
cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero
cevent.CvePersonal = dr("CveChofer").ToString.ToEntero
'11/05/2018 - Evento Gasto Recurrente
cevent.CveTipoEvento = dr("CveTipoEvento").ToString.ToEntero
@@ -543,6 +553,8 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
cevent.description = dr("DescripcionContrato").ToString
cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime)
cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime))
cevent.NombreAcercamiento = dr("Ubicacion").ToString
cevent.allDay = False
'cevent.CveEventoEstatus = dr("NumeroContrato").ToString.ToEntero
'cevent.CveEventoEstatus = dr("CveEventoEstatus").ToString.ToEntero

View File

@@ -41,7 +41,7 @@ Partial Class Boletos
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then
If Request.QueryString("CveViaje") Is Nothing Then
Response.Redirect("/Transportes/ListadoViajes.aspx")
Response.Redirect("/Transportes/RepViajes.aspx")
End If
AsientoSeleccionado = ""
CveRuta = 0

View File

@@ -63,7 +63,7 @@
<ContentTemplate>
<asp:GridView ID="GvContratos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado"
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
data-sort="true" DataKeyNames="CveContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, CveTipoAF, Importe, ImporteMin, ImporteMax ">
data-sort="true" DataKeyNames="CveContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, CveTipoAF, Importe, ImporteMin, ImporteMax,CveChofer ">
<Columns>
<asp:TemplateField HeaderText="No. Contrato">
@@ -145,7 +145,7 @@
<label>Cliente</label>
</div>
<div class="col-md-8">
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;" UsaWebService="true"></ADS:Dropdownlost>
</div>
</div>
<div class="row">

View File

@@ -16,6 +16,7 @@ Partial Class ListadoContratos
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
ViewState("CveContrato") = 0
InicializaCombos()
CargaDatos()
End If
@@ -94,22 +95,21 @@ Partial Class ListadoContratos
End If
'Agregar contrato
If BtnGuardar.Text = "Guardar" Then
CveContratoHijo = ObjContratos.AddContratos("", TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero)
End If
If CveContratoHijo > 0 Then
ObjContratos.Commit()
Alert("Agregado Correctamente.")
CveContratoHijo = ObjContratos.AddContratos("", TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1, CveTipoAF:=DdlTransporte.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero)
If CveContratoHijo > 0 Then
ObjContratos.Commit()
Alert("Agregado Correctamente.")
End If
End If
'Actualizar contrato
If BtnGuardar.Text = "Editar" Then
retorno = ObjContratos.UpdateContratos(CveContrato, "", TxtDescripcion.Text, "", -1, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1)
End If
retorno = ObjContratos.UpdateContratos(CveContrato, "", TxtDescripcion.Text, "", -1, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveTipoAF:=DdlTransporte.SelectedValue.ToEntero)
If retorno Then
ObjContratos.Commit()
Alert("Actualizado Correctamente.")
If retorno Then
ObjContratos.Commit()
Alert("Actualizado Correctamente.")
End If
End If
TxtDescripcion.Text = ""
@@ -118,7 +118,8 @@ Partial Class ListadoContratos
TxtObservaciones.Text = ""
TxtUbicacion.Text = ""
DdlClientes.SelectedText = ""
DdlAF.SelectedValue = ""
DdlTransporte.SelectedValue = ""
DdlChofer.SelectedValue = ""
TxtDolares.Text = ""
TxtPesos.Text = ""
TxtAnticipo.Text = ""
@@ -129,13 +130,13 @@ Partial Class ListadoContratos
Finally
ObjContratos.Dispose()
CargaDatos()
End Try
End Sub
Protected Sub UpdateContrato(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
ViewState("CveContrato") = GvRow.DataKey("CveContrato")
MostrarModal(
Descripcion:=GvRow.DataKey("DescripcionContrato"), FechaSalida:=GvRow.DataKey("FechaInicial").ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T"), FechaRegreso:=GvRow.DataKey("FechaFinal").ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T"), Observaciones:=GvRow.DataKey("DescripcionContrato"), Ubicacion:=GvRow.DataKey("Ubicacion"), Transporte:=GvRow.DataKey("CveTipoAF"), Cliente:=GvRow.DataKey("CveCliente"), Dolares:=GvRow.DataKey("Importe"), Pesos:=GvRow.DataKey("ImporteMax"), Anticipo:=GvRow.DataKey("ImporteMin"), Boton:="Editar", Chofer:=GvRow.DataKey("CveChofer"))
End Sub

View File

@@ -20,270 +20,279 @@
<asp:Content ID="Content4" ContentPlaceHolderID="C" runat="Server">
<asp:Panel ID="PnlGeneral" runat="server">
<ContentTemplate>
<%--Calendario Tab--%>
<ajax:TabContainer ID="Tab" runat="server" Width="100%" ActiveTabIndex="0">
<%--Calendario Tab--%>
<ajax:TabContainer ID="Tab" runat="server" Width="100%" ActiveTabIndex="0">
<ajax:TabPanel ID="TabAlta" runat="server" HeaderText="Calendario">
<ContentTemplate>
<div class="row">
<div class="col-md-12 col-sm-12">
<div class="portlet light calendar ">
<div class="tipo_vista">
<div>
<h4 class="bold ribbon-color-success">Tipo de Vista</h4>
</div>
<asp:RadioButtonList ID="RBTipoVista" runat="server" AutoPostBack="True">
<asp:ListItem Text="Duración" Value="duracion" Selected="True" />
<asp:ListItem Text="Fecha de Inicio" Value="fecha" />
</asp:RadioButtonList>
<ajax:TabPanel ID="TabAlta" runat="server" HeaderText="Calendario">
<ContentTemplate>
<div class="row">
<div class="col-md-12 col-sm-12">
<div class="portlet light calendar ">
<div class="tipo_vista">
<div>
<h4 class="bold ribbon-color-success">Tipo de Vista</h4>
</div>
<asp:RadioButtonList ID="RBTipoVista" runat="server" AutoPostBack="True">
<asp:ListItem Text="Duración" Value="duracion" Selected="True" />
<asp:ListItem Text="Fecha de Inicio" Value="fecha" />
</asp:RadioButtonList>
</div>
<div class="portlet-body">
<div id="calendar">
</div>
<div class="portlet-body">
<div id="calendar">
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</ajax:TabPanel>
</ContentTemplate>
</ajax:TabPanel>
<%--Contratos Tab--%>
<ajax:TabPanel ID="TabPanel1" runat="server" HeaderText="Contratos">
<ContentTemplate>
<asp:GridView ID="GvContratos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado"
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
data-sort="true" DataKeyNames="CveContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, CveTipoAF, Importe, ImporteMin, ImporteMax ">
<Columns>
<ajax:TabPanel ID="TabPanel1" runat="server" HeaderText="Contratos">
<ContentTemplate>
<asp:GridView ID="GvContratos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado"
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
data-sort="true" DataKeyNames="CveContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, CveTipoAF, Importe, ImporteMin, ImporteMax ">
<Columns>
<asp:TemplateField HeaderText="No. Contrato">
<ItemTemplate>
<asp:Literal ID="LtlCveContrato" runat="server" Text='<%# Eval("CveContrato") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="No. Contrato">
<ItemTemplate>
<asp:Literal ID="LtlCveContrato" runat="server" Text='<%# Eval("CveContrato") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Descripcion">
<ItemTemplate>
<asp:Literal ID="LtlDescripcionContrato" runat="server" Text='<%# Eval("DescripcionContrato") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Descripcion">
<ItemTemplate>
<asp:Literal ID="LtlDescripcionContrato" runat="server" Text='<%# Eval("DescripcionContrato") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Ubicación">
<ItemTemplate>
<asp:Literal ID="LtUbicacion" runat="server" Text='<%# Eval("Ubicacion") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Ubicación">
<ItemTemplate>
<asp:Literal ID="LtUbicacion" runat="server" Text='<%# Eval("Ubicacion") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Cliente">
<ItemTemplate>
<asp:Literal ID="LtNombreComercial" runat="server" Text='<%# Eval("NombreComercial") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Cliente">
<ItemTemplate>
<asp:Literal ID="LtNombreComercial" runat="server" Text='<%# Eval("NombreComercial") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Chofer">
<ItemTemplate>
<asp:Literal ID="LtlChofer" runat="server" Text='<%# Eval("NombreCompleto") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Chofer">
<ItemTemplate>
<asp:Literal ID="LtlChofer" runat="server" Text='<%# Eval("NombreCompleto") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
<HeaderTemplate>
Fecha<br />
Salida
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaInicial", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
<HeaderTemplate>
Fecha<br />
Salida
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaInicial", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha Final" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
<HeaderTemplate>
Fecha<br />
Regreso
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFechaFinal" runat="server" Text='<%# Eval("FechaFinal", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha Final" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
<HeaderTemplate>
Fecha<br />
Regreso
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFechaFinal" runat="server" Text='<%# Eval("FechaFinal", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</ajax:TabPanel>
</ajax:TabContainer>
</ContentTemplate>
</Columns>
</asp:GridView>
</ContentTemplate>
</ajax:TabPanel>
</ajax:TabContainer>
</asp:Panel>
<div id="ModalActualizar" class="modal ADS fade" role="dialog">
<div class="modal-dialog">
<div id="UpAddChofer" class="modal-content rowpadding" tabindex="-1"
runat="server">
<contenttemplate>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="myModalLabel" runat="server">Actualizar Contrato</h4>
<asp:UpdatePanel runat="server" ID="UpModal" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-dialog">
<div id="UpAddChofer" class="modal-content rowpadding" tabindex="-1"
runat="server">
<contenttemplate>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="myModalLabel" runat="server">Actualizar Contrato</h4>
</div>
<div class="modal-body">
<div class="portlet-body">
<div class="row">
<div class="col-md-4">
<label>Cliente</label>
</div>
<div class="col-md-8">
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente"
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"
UsaWebService="true"></ADS:Dropdownlost>
</div>
</div>
<div class="row my-1">
<label class="col-md-4 bold">Servicio:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtDescripcion" runat="server" MaxLength="70" Width="100%"
TextMode="MultiLine"></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>''Descripcion''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEDescripcion" runat="server" HighlightCssClass="vco"
TargetControlID="RFVDescripcion" Width="100%" BehaviorID="_content_VCEDescripcion">
</ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row">
<label class="col-md-4 bold">Lugar de Salida:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtUbicacion" runat="server" MaxLength="70" Width="100%"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVUbicacion" runat="server" ControlToValidate="TxtUbicacion"
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ubicación''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEUbicacion" runat="server" HighlightCssClass="vco"
TargetControlID="RFVUbicacion" Width="100%" BehaviorID="_content_VCEUbicacion">
</ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row my-1">
<label class="col-md-4 bold">Fecha Salida:</label>
<div class="col-md-8">
<div class="input-group input-sm input-small date date-picker">
<asp:TextBox ID="TxtFechaSalida" runat="server" CssClass="form-control" CausesValidation="True"
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%" BehaviorID="_content_VCETxtFechaSalida">
</ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
<div class="row my-1">
<label class="col-md-4 bold">Fecha Regreso:</label>
<div class="col-md-8">
<div class="input-group input-sm input-small date date-picker">
<asp:TextBox ID="TxtFechaRegreso" runat="server" CssClass="form-control" CausesValidation="True"
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%" BehaviorID="_content_VCETxtFechaRegreso">
</ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
<div class="row margin-bottom-5" id="TrAF" runat="server">
<label class="col-md-4 bold">
<asp:Label runat="server" Text="Transporte:"></asp:Label></label><div
class="col-md-8">
<asp:DropDownList ID="DdlTransporte" AppendDataBoundItems="true" DataValueField="CveActivoFijo"
DataTextField="Descripcion" Class="table-group-action-input form-control input-inline text-center"
Width="200px" runat="server">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVTransporte" runat="server" ControlToValidate="DdlTransporte"
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Transporte''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCETransporte" runat="server" HighlightCssClass="vco"
TargetControlID="RFVTransporte" Width="400px" BehaviorID="_content_VCETransporte">
</ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row margin-bottom-5" id="TrChofer" runat="server">
<label class="col-md-4 bold">
<asp:Label runat="server" Text="Chofer:"></asp:Label></label><div
class="col-md-8">
<asp:DropDownList ID="DdlChofer" AppendDataBoundItems="true" DataValueField="CvePersonal"
DataTextField="NombreCompleto" Class="table-group-action-input form-control input-inline text-center"
Width="200px" runat="server">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVChofer" runat="server" ControlToValidate="DdlChofer"
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEChofer" runat="server" HighlightCssClass="vco"
TargetControlID="RFVChofer" Width="400px" BehaviorID="_content_VCEChofer">
</ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row my-1">
<label class="col-md-4 bold">Observaciones:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="70" Width="100%"
TextMode="MultiLine"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVObservaciones" runat="server" ControlToValidate="TxtObservaciones"
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripcion''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEObservaciones" runat="server" HighlightCssClass="vco"
TargetControlID="RFVObservaciones" Width="100%" BehaviorID="_content_VCEObservaciones">
</ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row my-1">
<label class="col-md-4 bold">Costo dólares:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtDolares" runat="server" type="number"></asp:TextBox>
</div>
</div>
<div class="row my-1">
<label class="col-md-4 bold">Costo pesos:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtPesos" runat="server" type="number"></asp:TextBox>
</div>
</div>
<div class="row my-1">
<label class="col-md-4 bold">Anticipo:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtAnticipo" runat="server" type="decimal"></asp:TextBox>
</div>
</div>
<div class="modal-footer">
<asp:Button ID="BtnActualizar" OnClick="UpdateContrato" runat="server" CssClass="btn btn-primary"
Text="Editar"
ValidationGroup="GrpGuardar"></asp:Button>
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
</div>
</div>
</div>
</div>
<div class="modal-body">
<div class="portlet-body">
<div class="row my-1" id="TrCliente" runat="server">
<label class="col-md-4 bold">
<asp:Label ID="Label1" runat="server" Text="Cliente:"></asp:Label></label><div class="col-md-8">
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente"
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"
UsaWebService="true"></ADS:Dropdownlost>
</div>
</div>
<div class="row my-1">
<label class="col-md-4 bold">Servicio:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtDescripcion" runat="server" MaxLength="70" Width="100%"
TextMode="MultiLine"></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>''Descripcion''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEDescripcion" runat="server" HighlightCssClass="vco"
TargetControlID="RFVDescripcion" Width="100%" BehaviorID="_content_VCEDescripcion">
</ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row">
<label class="col-md-4 bold">Lugar de Salida:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtUbicacion" runat="server" MaxLength="70" Width="100%"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVUbicacion" runat="server" ControlToValidate="TxtUbicacion"
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ubicación''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEUbicacion" runat="server" HighlightCssClass="vco"
TargetControlID="RFVUbicacion" Width="100%" BehaviorID="_content_VCEUbicacion">
</ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row my-1">
<label class="col-md-4 bold">Fecha Salida:</label>
<div class="col-md-8">
<div class="input-group input-sm input-small date date-picker">
<asp:TextBox ID="TxtFechaSalida" runat="server" CssClass="form-control" CausesValidation="True"
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%" BehaviorID="_content_VCETxtFechaSalida">
</ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
<div class="row my-1">
<label class="col-md-4 bold">Fecha Regreso:</label>
<div class="col-md-8">
<div class="input-group input-sm input-small date date-picker">
<asp:TextBox ID="TxtFechaRegreso" runat="server" CssClass="form-control" CausesValidation="True"
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%" BehaviorID="_content_VCETxtFechaRegreso">
</ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
<div class="row margin-bottom-5" id="TrAF" runat="server">
<label class="col-md-4 bold">
<asp:Label runat="server" Text="Transporte:"></asp:Label></label><div
class="col-md-8">
<asp:DropDownList ID="DdlTransporte" AppendDataBoundItems="true" DataTextField="Descripcion"
DataValueField="CveTipoActivoFijo" Class="table-group-action-input form-control input-inline text-center"
Width="200px" runat="server">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVTransporte" runat="server" ControlToValidate="DdlTransporte"
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Transporte''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCETransporte" runat="server" HighlightCssClass="vco"
TargetControlID="RFVTransporte" Width="400px" BehaviorID="_content_VCETransporte">
</ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row margin-bottom-5" id="TrChofer" runat="server">
<label class="col-md-4 bold">
<asp:Label runat="server" Text="Chofer:"></asp:Label></label><div
class="col-md-8">
<asp:DropDownList ID="DdlChofer" AppendDataBoundItems="true" DataValueField="CvePersonal"
DataTextField="NombreCompleto" Class="table-group-action-input form-control input-inline text-center"
Width="200px" runat="server">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVChofer" runat="server" ControlToValidate="DdlChofer"
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEChofer" runat="server" HighlightCssClass="vco"
TargetControlID="RFVChofer" Width="400px" BehaviorID="_content_VCEChofer">
</ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row my-1">
<label class="col-md-4 bold">Observaciones:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="70" Width="100%"
TextMode="MultiLine"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVObservaciones" runat="server" ControlToValidate="TxtObservaciones"
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripcion''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEObservaciones" runat="server" HighlightCssClass="vco"
TargetControlID="RFVObservaciones" Width="100%" BehaviorID="_content_VCEObservaciones">
</ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row my-1">
<label class="col-md-4 bold">Costo dólares:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtDolares" runat="server" type="number"></asp:TextBox>
</div>
</div>
<div class="row my-1">
<label class="col-md-4 bold">Costo pesos:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtPesos" runat="server" type="number"></asp:TextBox>
</div>
</div>
<div class="row my-1">
<label class="col-md-4 bold">Anticipo:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtAnticipo" runat="server" type="decimal"></asp:TextBox>
</div>
</div>
</div>
</div>
</contenttemplate>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div style="display: none">
<asp:UpdatePanel ID="UpCommando" runat="server">
<ContentTemplate>
<asp:Button runat="server" ID="BtnActualizar" OnClick="ActualizarContrato"></asp:Button>
<asp:Button runat="server" ID="BtnModal" OnClick="MostrarModal"></asp:Button>
<asp:HiddenField runat="server" ID="CveContrato" Value="-1" ClientIDMode="Static" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
@@ -309,8 +318,20 @@
}
function updateEvent(event, element) {
console.log(event)
$('#<%=BtnActualizar.ClientID%>').click();
$('#<%=TxtObservaciones.ClientID%>').val(event.title);
$('#<%=TxtDescripcion.ClientID%>').val(event.title);
$('#<%=TxtUbicacion.ClientID%>').val(event.NombreAcercamiento);
$('#<%=TxtFechaSalida.ClientID.ToString%>').val(event.start._i);
$('#<%=TxtFechaRegreso.ClientID.ToString%>').val(event.end._i);
$('#<%=DdlClientes.ClientID%>').val(event.CveCliente);
$('#<%=DdlTransporte.ClientID%>').val(event.CveActivoFijo);
$('#<%=DdlChofer.ClientID%>').val(event.CvePersonal);
$('#<%=TxtDolares.ClientID%>').val(event.Dolares);
$('#<%=TxtPesos.ClientID%>').val(event.Pesos);
$('#<%=TxtAnticipo.ClientID%>').val(event.Anticipo);
$('#<%=CveContrato.ClientID%>').val(event.id);
$('#<%=BtnModal.ClientID%>').click();
}
function RadionButtonSelectedValueSet(name, SelectdValue) {
@@ -419,7 +440,6 @@
eventDrop: eventDropped,
eventResize: eventResized
});
clickSemana();
}
</script>

View File

@@ -1,11 +1,12 @@
Option Explicit On
Option Strict On
Imports ADSNetLibrary.SIGAPI.Helpers
Imports Extensiones.ModExtensiones
Partial Class RepContratosCalendario
Inherits ClsPaginas
#Region "PROPIEDADES"
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
@@ -27,15 +28,57 @@ Partial Class RepContratosCalendario
End Sub
Private Sub InicializaCalendar()
'Lista Activos Fijos'
Dim ObjAF As New ClsAF()
If ObjAF.GetActivosFijos(-1, 13, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, 1, "-1", -1, -1, -1) Then
If ObjAF.DtResultados.Rows.Count > 0 Then
DdlTransporte.DataSource = ObjAF.DtResultados
DdlTransporte.Items.Insert(0, New ListItem("Seleccione", ""))
End If
End If
DdlTransporte.DataBind()
ObjAF.Dispose()
'Lista Chofer'
DdlChofer.DataSource = GlobalDTRHPersonal(185)
DdlChofer.DataBind()
DdlChofer.Items.Insert(0, New ListItem("Seleccione", ""))
RegistraScript("InitCalendar();")
DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True
End Sub
Protected Sub ActualizarContrato(sender As Object, e As System.EventArgs)
Protected Sub MostrarModal(sender As Object, e As System.EventArgs)
RegistraScript("$('#ModalActualizar').modal('show');")
End Sub
Protected Sub UpdateContrato(sender As Object, e As EventArgs)
If DdlClientes.SelectedValue = "" Then
Alert("Debe seleccionar al cliente", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim ObjContratos As New ClsContratos
ObjContratos.IniciaTransacSQL()
Try
If ObjContratos.UpdateContratos(CveContrato.Value.ToEntero, "", TxtDescripcion.Text, "", -1, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveTipoAF:=DdlTransporte.SelectedValue.ToEntero) Then
ObjContratos.Commit()
Alert("Actualizado Correctamente.")
End If
Catch ex As Exception
Alert("Ocurrió un error al actualizar el contrato", TipoMensaje.MsgError)
ObjContratos.RollBack()
Finally
ObjContratos.Dispose()
CargaDatos()
End Try
End Sub
End Class

View File

@@ -9834,6 +9834,7 @@ Partial Class Clientes
DivCrearPrecioLista.Visible = False
End If
TabFiscalContable.Visible = DdlTipoCliente.SelectedValue = "1"
UpDatos.Update()
End Sub