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 MovimientoFolio As String
Public Property CveIE As Integer Public Property CveIE As Integer
Public Property FolioIE As String Public Property FolioIE As String
Public Property Pesos As Double
Public Property Dolares As Double
Public Property Anticipo As Double
End Class 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 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 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 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 Dim Retorno As Boolean = False
DataAdapter("PA_Con_ContratosUpdate") DataAdapter("PA_Con_ContratosUpdate")
@@ -428,17 +428,16 @@ Public Class ClsContratos
.Add("@PorAnticipo", SqlDbType.Float).Value = PorAnticipo .Add("@PorAnticipo", SqlDbType.Float).Value = PorAnticipo
.Add("@PorAmortizacionAnticipo", SqlDbType.Float).Value = PorAmortizacionAnticipo .Add("@PorAmortizacionAnticipo", SqlDbType.Float).Value = PorAmortizacionAnticipo
.Add("@PorGarantia", SqlDbType.Float).Value = PorGarantia .Add("@PorGarantia", SqlDbType.Float).Value = PorGarantia
'.Add("@EstatusContrato", SqlDbType.Bit).Value = EstatusContrato
.Add("@Archivo", SqlDbType.VarChar).Value = Archivo .Add("@Archivo", SqlDbType.VarChar).Value = Archivo
.Add("@Geom", SqlDbType.VarChar).Value = Geom .Add("@Geom", SqlDbType.VarChar).Value = Geom
.Add("@CveContratoPadre", SqlDbType.Int).Value = CveContratoPadre .Add("@CveContratoPadre", SqlDbType.Int).Value = CveContratoPadre
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .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("@ImporteMin", SqlDbType.Money).Value = Minimo
.Add("@ImporteMax", SqlDbType.Money).Value = Maximo .Add("@ImporteMax", SqlDbType.Money).Value = Maximo
.Add("@Importe", SqlDbType.Money).Value = Importe .Add("@Importe", SqlDbType.Money).Value = Importe
.Add("@CveContratoTipo", SqlDbType.SmallInt).Value = CveContratoTipo
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
.Add("@TipoCambio", SqlDbType.Money).Value = TipoCambio .Add("@TipoCambio", SqlDbType.Money).Value = TipoCambio
.Add("@ModalidadDetalle", SqlDbType.TinyInt).Value = ModalidadDetalle .Add("@ModalidadDetalle", SqlDbType.TinyInt).Value = ModalidadDetalle
@@ -462,7 +461,8 @@ Public Class ClsContratos
.Add("@DiaMesFacturacion", SqlDbType.TinyInt).Value = DiaMesFacturacion .Add("@DiaMesFacturacion", SqlDbType.TinyInt).Value = DiaMesFacturacion
.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo .Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
.Add("@ObservacionesGenerales", SqlDbType.VarChar).Value = ObservacionesGenerales .Add("@ObservacionesGenerales", SqlDbType.VarChar).Value = ObservacionesGenerales
.Add("@CveTipoAF", SqlDbType.Int).Value = CveTipoAF
.Add("@CveChofer", SqlDbType.Int).Value = CveChofer
End With End With
Try Try

View File

@@ -464,7 +464,13 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime) 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.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.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 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.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.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.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 '11/05/2018 - Evento Gasto Recurrente
cevent.CveTipoEvento = dr("CveTipoEvento").ToString.ToEntero cevent.CveTipoEvento = dr("CveTipoEvento").ToString.ToEntero
@@ -543,6 +553,8 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
cevent.description = dr("DescripcionContrato").ToString cevent.description = dr("DescripcionContrato").ToString
cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime) 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.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.allDay = False
'cevent.CveEventoEstatus = dr("NumeroContrato").ToString.ToEntero 'cevent.CveEventoEstatus = dr("NumeroContrato").ToString.ToEntero
'cevent.CveEventoEstatus = dr("CveEventoEstatus").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 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 Then If Request.QueryString("CveViaje") Is Nothing Then
Response.Redirect("/Transportes/ListadoViajes.aspx") Response.Redirect("/Transportes/RepViajes.aspx")
End If End If
AsientoSeleccionado = "" AsientoSeleccionado = ""
CveRuta = 0 CveRuta = 0

View File

@@ -63,7 +63,7 @@
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvContratos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado" <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" 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> <Columns>
<asp:TemplateField HeaderText="No. Contrato"> <asp:TemplateField HeaderText="No. Contrato">
@@ -145,7 +145,7 @@
<label>Cliente</label> <label>Cliente</label>
</div> </div>
<div class="col-md-8"> <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> </div>
<div class="row"> <div class="row">

View File

@@ -16,6 +16,7 @@ Partial Class ListadoContratos
End Property End Property
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
If Not IsPostBack Then If Not IsPostBack Then
ViewState("CveContrato") = 0
InicializaCombos() InicializaCombos()
CargaDatos() CargaDatos()
End If End If
@@ -94,22 +95,21 @@ Partial Class ListadoContratos
End If End If
'Agregar contrato 'Agregar contrato
If BtnGuardar.Text = "Guardar" Then 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) 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)
End If If CveContratoHijo > 0 Then
ObjContratos.Commit()
If CveContratoHijo > 0 Then Alert("Agregado Correctamente.")
ObjContratos.Commit() End If
Alert("Agregado Correctamente.")
End If End If
'Actualizar contrato 'Actualizar contrato
If BtnGuardar.Text = "Editar" Then 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) 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)
End If
If retorno Then If retorno Then
ObjContratos.Commit() ObjContratos.Commit()
Alert("Actualizado Correctamente.") Alert("Actualizado Correctamente.")
End If
End If End If
TxtDescripcion.Text = "" TxtDescripcion.Text = ""
@@ -118,7 +118,8 @@ Partial Class ListadoContratos
TxtObservaciones.Text = "" TxtObservaciones.Text = ""
TxtUbicacion.Text = "" TxtUbicacion.Text = ""
DdlClientes.SelectedText = "" DdlClientes.SelectedText = ""
DdlAF.SelectedValue = "" DdlTransporte.SelectedValue = ""
DdlChofer.SelectedValue = ""
TxtDolares.Text = "" TxtDolares.Text = ""
TxtPesos.Text = "" TxtPesos.Text = ""
TxtAnticipo.Text = "" TxtAnticipo.Text = ""
@@ -129,13 +130,13 @@ Partial Class ListadoContratos
Finally Finally
ObjContratos.Dispose() ObjContratos.Dispose()
CargaDatos() CargaDatos()
End Try End Try
End Sub End Sub
Protected Sub UpdateContrato(sender As Object, e As EventArgs) Protected Sub UpdateContrato(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
ViewState("CveContrato") = GvRow.DataKey("CveContrato")
MostrarModal( 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")) 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 End Sub

View File

@@ -20,270 +20,279 @@
<asp:Content ID="Content4" ContentPlaceHolderID="C" runat="Server"> <asp:Content ID="Content4" ContentPlaceHolderID="C" runat="Server">
<asp:Panel ID="PnlGeneral" runat="server"> <asp:Panel ID="PnlGeneral" runat="server">
<ContentTemplate> <%--Calendario Tab--%>
<%--Calendario Tab--%> <ajax:TabContainer ID="Tab" runat="server" Width="100%" ActiveTabIndex="0">
<ajax:TabContainer ID="Tab" runat="server" Width="100%" ActiveTabIndex="0">
<ajax:TabPanel ID="TabAlta" runat="server" HeaderText="Calendario"> <ajax:TabPanel ID="TabAlta" runat="server" HeaderText="Calendario">
<ContentTemplate> <ContentTemplate>
<div class="row"> <div class="row">
<div class="col-md-12 col-sm-12"> <div class="col-md-12 col-sm-12">
<div class="portlet light calendar "> <div class="portlet light calendar ">
<div class="tipo_vista"> <div class="tipo_vista">
<div> <div>
<h4 class="bold ribbon-color-success">Tipo de Vista</h4> <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>
<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 class="portlet-body">
<div id="calendar"> <div id="calendar">
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div>
</ContentTemplate> </ContentTemplate>
</ajax:TabPanel> </ajax:TabPanel>
<%--Contratos Tab--%> <%--Contratos Tab--%>
<ajax:TabPanel ID="TabPanel1" runat="server" HeaderText="Contratos"> <ajax:TabPanel ID="TabPanel1" runat="server" HeaderText="Contratos">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvContratos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado" <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" 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 ">
<Columns> <Columns>
<asp:TemplateField HeaderText="No. Contrato"> <asp:TemplateField HeaderText="No. Contrato">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlCveContrato" runat="server" Text='<%# Eval("CveContrato") %>'></asp:Literal> <asp:Literal ID="LtlCveContrato" runat="server" Text='<%# Eval("CveContrato") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Descripcion"> <asp:TemplateField HeaderText="Descripcion">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlDescripcionContrato" runat="server" Text='<%# Eval("DescripcionContrato") %>'></asp:Literal> <asp:Literal ID="LtlDescripcionContrato" runat="server" Text='<%# Eval("DescripcionContrato") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Ubicación"> <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Ubicación">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtUbicacion" runat="server" Text='<%# Eval("Ubicacion") %>'></asp:Literal> <asp:Literal ID="LtUbicacion" runat="server" Text='<%# Eval("Ubicacion") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Cliente"> <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Cliente">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtNombreComercial" runat="server" Text='<%# Eval("NombreComercial") %>'></asp:Literal> <asp:Literal ID="LtNombreComercial" runat="server" Text='<%# Eval("NombreComercial") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Chofer"> <asp:TemplateField HeaderText="Chofer">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlChofer" runat="server" Text='<%# Eval("NombreCompleto") %>'></asp:Literal> <asp:Literal ID="LtlChofer" runat="server" Text='<%# Eval("NombreCompleto") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px"> <asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
<HeaderTemplate> <HeaderTemplate>
Fecha<br /> Fecha<br />
Salida Salida
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaInicial", "{0:d}") %>'></asp:Literal> <asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaInicial", "{0:d}") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Fecha Final" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px"> <asp:TemplateField HeaderText="Fecha Final" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
<HeaderTemplate> <HeaderTemplate>
Fecha<br /> Fecha<br />
Regreso Regreso
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlFechaFinal" runat="server" Text='<%# Eval("FechaFinal", "{0:d}") %>'></asp:Literal> <asp:Literal ID="LtlFechaFinal" runat="server" Text='<%# Eval("FechaFinal", "{0:d}") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</ContentTemplate> </ContentTemplate>
</ajax:TabPanel> </ajax:TabPanel>
</ajax:TabContainer> </ajax:TabContainer>
</ContentTemplate>
</asp:Panel> </asp:Panel>
<div id="ModalActualizar" class="modal ADS fade" role="dialog"> <div id="ModalActualizar" class="modal ADS fade" role="dialog">
<div class="modal-dialog"> <asp:UpdatePanel runat="server" ID="UpModal" UpdateMode="Conditional">
<div id="UpAddChofer" class="modal-content rowpadding" tabindex="-1" <ContentTemplate>
runat="server"> <div class="modal-dialog">
<contenttemplate> <div id="UpAddChofer" class="modal-content rowpadding" tabindex="-1"
<div class="modal-header"> runat="server">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <contenttemplate>
<span aria-hidden="true">&times;</span> <div class="modal-header">
</button> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<h4 class="modal-title" id="myModalLabel" runat="server">Actualizar Contrato</h4> <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>
<div class="modal-body"> </div>
</ContentTemplate>
<div class="portlet-body"> </asp:UpdatePanel>
<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> </div>
<div style="display: none"> <div style="display: none">
<asp:UpdatePanel ID="UpCommando" runat="server"> <asp:UpdatePanel ID="UpCommando" runat="server">
<ContentTemplate> <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> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
@@ -309,8 +318,20 @@
} }
function updateEvent(event, element) { function updateEvent(event, element) {
console.log(event) $('#<%=TxtObservaciones.ClientID%>').val(event.title);
$('#<%=BtnActualizar.ClientID%>').click(); $('#<%=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) { function RadionButtonSelectedValueSet(name, SelectdValue) {
@@ -419,7 +440,6 @@
eventDrop: eventDropped, eventDrop: eventDropped,
eventResize: eventResized eventResize: eventResized
}); });
clickSemana();
} }
</script> </script>

View File

@@ -1,11 +1,12 @@
Option Explicit On Option Explicit On
Option Strict On Option Strict On
Imports ADSNetLibrary.SIGAPI.Helpers
Imports Extensiones.ModExtensiones
Partial Class RepContratosCalendario Partial Class RepContratosCalendario
Inherits ClsPaginas Inherits ClsPaginas
#Region "PROPIEDADES" #Region "PROPIEDADES"
#End Region #End Region
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
@@ -27,15 +28,57 @@ Partial Class RepContratosCalendario
End Sub End Sub
Private Sub InicializaCalendar() 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();") RegistraScript("InitCalendar();")
DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True
End Sub 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');") RegistraScript("$('#ModalActualizar').modal('show');")
End Sub 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 End Class

View File

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