-- mejora

This commit is contained in:
2024-08-03 12:40:26 -07:00
parent fdc7b990ea
commit b61ecf9b6f
3 changed files with 20 additions and 51 deletions

View File

@@ -494,6 +494,10 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
Dim CveContratoEstatus As Integer = If(context.Request("CveContratoEstatus") IsNot Nothing, context.Request("CveContratoEstatus").ToEntero, -1)
Dim CveTipoActivoFijo As Integer = If(context.Request("CveTipoActivoFijo") IsNot Nothing, context.Request("CveTipoActivoFijo").ToEntero, -1)
Dim CvePersonal As Integer = If(context.Request("CvePersonal") IsNot Nothing, context.Request("CvePersonal").ToEntero, -1)
Dim FI As DateTime, FF As DateTime, FT As DateTime
FI = context.Request("start").ToDate
FF = context.Request("end").ToDate
If Not cveContrato > 0 Then
cveContrato = -1
@@ -503,7 +507,8 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
CveCliente = -1
End If
If ObjContratos.GetContratos(cveContrato, usuarioActual_.CveEmpresa, TipoContrato:=34, CveCliente:=CveCliente, CveEstatus:=CveContratoEstatus) Then
If ObjContratos.GetContratosReporte(usuarioActual_.CveEmpresa, FI.ToString.ToDate, FF.ToString.ToDate, CveCliente:=CveCliente, CveTipoAF:=CveTipoActivoFijo,
CveTipoContrato:=34, CveEstatus:=CveContratoEstatus) Then
'CveTipoAF
'CveChofer, CveChofer2
@@ -589,7 +594,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
'EMPIEZA METODO PARA AGREGAR CUANDO SI ES RECURRENTE
Dim FinRecurrencia As Integer = cevent.recurrenciafin.ToEntero
Dim FI As DateTime, FF As DateTime, FT As DateTime
Dim DiasSemana As String() = cevent.diassemana.Split(","c)
FI = cevent.start.ToDateTime
FF = cevent.end.ToDateTime

View File

@@ -454,18 +454,11 @@
Width="100%" runat="server">
</asp:DropDownList>
</div>
</div>
</div>
<div class="row my-1">
<label class="col-md-4">Requiere Seguncdo Chofer</label>
<div class="col-md-8" style="text-align:left!important">
<asp:CheckBox runat="server" ID="chkSegundoChofer" AutoPostBack="true" OnCheckedChanged="chkSegundoChofer_CheckedChanged" />
</div>
</div>
<div class="row my-1" runat="server" id="DVChofer2">
<label class="col-md-4">Chofer 2</label>
<div class="col-md-8">
<div class="row my-1" >
<label class="col-md-4">Chofer 2 &nbsp;<asp:CheckBox runat="server" ID="chkSegundoChofer" AutoPostBack="true" OnCheckedChanged="chkSegundoChofer_CheckedChanged" /></label>
<div class="col-md-8" runat="server" id="DVChofer2">
<asp:DropDownList ID="DdlChofer2" AppendDataBoundItems="true" DataValueField="CvePersonal"
DataTextField="NombreCompleto" Class="table-group-action-input form-control input-inline select2me"
Width="100%" runat="server">
@@ -523,8 +516,7 @@
<asp:UpdatePanel ID="UpCommando" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Button runat="server" ID="BtnModal" OnClick="MostrarModal"></asp:Button>
<asp:HiddenField runat="server" ID="HdnCveContrato" Value="-1" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="HdnCveContrato" Value="-1" ClientIDMode="Static" />
<asp:Button runat="server" ID="BtnDdlTipoAF" OnClick="BtnDdlTipoAF_Click" ClientIDMode="Static"></asp:Button>
</ContentTemplate>
@@ -532,21 +524,14 @@
</div>
<asp:HiddenField runat="server" ID="HidModClienteNombre" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="HidModCveCliente" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="HidCurrentMonth" ClientIDMode="Static" Value="-1" />
<asp:HiddenField runat="server" ID="HidCurrentYear" ClientIDMode="Static" Value="-1" />
<asp:HiddenField runat="server" ID="HidCurrentYear" ClientIDMode="Static" Value="-1" />
<asp:HiddenField runat="server" ID="HidCveTipoAF" Value="-1" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="HidNumChoferes" Value="-1" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="HidRemisionSerieFolio" Value="-1" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="HidCveVentaRemision" Value="-1" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="HidRemisionSaldo" Value="-1" ClientIDMode="Static" />
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="JS" runat="Server">
@@ -836,8 +821,7 @@
$('#HidModCveCliente').val(event.CveCliente);
$('#<%=BtnModal.ClientID%>').click();
$('#<%=BtnModal.ClientID%>').click();
}
@@ -926,8 +910,7 @@
}
function Calendario(mes = -1, anio = -1) {
let fechaActual = new Date();
if (mes === -1) {
mes = fechaActual.getMonth() + 1;
@@ -1018,10 +1001,8 @@
let currentYear = pointDate.year();
$('#<%=HidCurrentMonth.ClientID%>').val(currentMonth);
$('#<%=HidCurrentYear.ClientID%>').val(currentYear);
$('#<%=HidCurrentYear.ClientID%>').val(currentYear);
}
});
}

View File

@@ -68,7 +68,6 @@ Partial Class RepContratosCalendario
CargaCronograma(DdlTipoVista.SelectedValue.ToEntero)
End If
GvContratos.DataSource = DtAvance
DdlEstatusContrato.Enabled = UsuarioActual.TienePermisoProceso(173)
ObjContratos.Dispose()
@@ -291,8 +290,6 @@ Partial Class RepContratosCalendario
DdlChofer.SelectedValueExist(GvRow.DataKey("CveChofer"))
DdlChofer2.SelectedValueExist(GvRow.DataKey("CveChofer2"))
chkSegundoChofer.Checked = If(NumChoferes = 2, True, False)
DdlEstatusContrato.SelectedValueExist(GvRow.DataKey("CveContratosEstatus"))
@@ -365,12 +362,13 @@ Partial Class RepContratosCalendario
Private Sub OcultarMostrarSegundoChofer()
If chkSegundoChofer.Checked Then
DVChofer2.Attributes.Add("style", "display:block")
DdlChofer2.Visible = True
'DVChofer2.Attributes.Add("style", "display:block")
Else
DVChofer2.Attributes.Add("style", "display:none")
DdlChofer2.Visible = False
'DVChofer2.Attributes.Add("style", "display:none")
End If
UpCommando.Update()
UpModal.Update()
End Sub
@@ -392,8 +390,6 @@ Partial Class RepContratosCalendario
DdlAF.Items.Clear()
Dim ObjContratos As New ClsContratos
If ObjContratos.GetContratosValUnidadesAgendadas(DdlAF.SelectedValue.ToEntero, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, UsuarioActual.CveEmpresa, CveContrato, 2) Then
If CveTipoAF > 0 Then
@@ -401,9 +397,6 @@ Partial Class RepContratosCalendario
Else
DdlAF.DataSource = ObjContratos.DtResultados
End If
End If
ObjContratos.Dispose()
@@ -415,9 +408,6 @@ Partial Class RepContratosCalendario
DdlAF.DataBind()
DdlAF.Items.Insert(0, New ListItem("-", "-1"))
UpModal.Update()
End Sub
@@ -454,17 +444,10 @@ Partial Class RepContratosCalendario
Protected Sub RBTipoVista_SelectedIndexChanged(sender As Object, e As EventArgs)
InicializaCalendar()
CargaCronograma()
End Sub
Protected Sub DdlTipoVista_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaCronograma(DdlTipoVista.SelectedValue.ToEntero)
End Sub
End Class