-- permiso para cancelación de contratos
This commit is contained in:
@@ -447,7 +447,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<asp:Label ID="LbEstatus" runat="server" class="col-md-4">Estatus:</asp:Label>
|
<asp:Label ID="LbEstatus" runat="server" class="col-md-4">Estatus:</asp:Label>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<asp:DropDownList ID="DdlEstatusContrato" runat="server" Class="table-group-action-input form-control input-inline select2me"
|
<asp:DropDownList ID="DdlEstatusContrato" Enabled="false" runat="server" Class="table-group-action-input form-control input-inline select2me"
|
||||||
AppendDataBoundItems="true" DataValueField="CveContratoEstatus"
|
AppendDataBoundItems="true" DataValueField="CveContratoEstatus"
|
||||||
DataTextField="ContratoEstatus"
|
DataTextField="ContratoEstatus"
|
||||||
Width="100%">
|
Width="100%">
|
||||||
@@ -494,7 +494,7 @@
|
|||||||
<asp:UpdatePanel ID="UpCommando" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpCommando" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:Button runat="server" ID="BtnModal" OnClick="MostrarModal"></asp:Button>
|
<asp:Button runat="server" ID="BtnModal" OnClick="MostrarModal"></asp:Button>
|
||||||
<asp:HiddenField runat="server" ID="CveContrato" Value="-1" ClientIDMode="Static" />
|
<asp:HiddenField runat="server" ID="HdnCveContrato" Value="-1" ClientIDMode="Static" />
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
@@ -726,7 +726,7 @@
|
|||||||
$('#<%=TxtDolares.ClientID%>').val(event.Dolares);
|
$('#<%=TxtDolares.ClientID%>').val(event.Dolares);
|
||||||
$('#<%=TxtPesos.ClientID%>').val(event.Pesos);
|
$('#<%=TxtPesos.ClientID%>').val(event.Pesos);
|
||||||
$('#<%=TxtAnticipo.ClientID%>').val(event.Anticipo);
|
$('#<%=TxtAnticipo.ClientID%>').val(event.Anticipo);
|
||||||
$('#<%=CveContrato.ClientID%>').val(event.id);
|
$('#<%=HdnCveContrato.ClientID%>').val(event.id);
|
||||||
|
|
||||||
|
|
||||||
if (event.NombreComercial !== null) {
|
if (event.NombreComercial !== null) {
|
||||||
|
|||||||
@@ -28,6 +28,16 @@ Partial Class RepContratosCalendario
|
|||||||
ViewState("Contrato") = value
|
ViewState("Contrato") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public Property CveContrato As Integer
|
||||||
|
Get
|
||||||
|
Return IfNull(ViewState("CveContrato"), "").ToString.ToEntero
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CveContrato") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
#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
|
||||||
@@ -53,6 +63,8 @@ Partial Class RepContratosCalendario
|
|||||||
End If
|
End If
|
||||||
GvContratos.DataSource = DtAvance
|
GvContratos.DataSource = DtAvance
|
||||||
|
|
||||||
|
DdlEstatusContrato.Enabled = UsuarioActual.TienePermisoProceso(173)
|
||||||
|
|
||||||
ObjContratos.Dispose()
|
ObjContratos.Dispose()
|
||||||
GvContratos.DataBind()
|
GvContratos.DataBind()
|
||||||
UpTitulos.Update()
|
UpTitulos.Update()
|
||||||
@@ -77,7 +89,8 @@ Partial Class RepContratosCalendario
|
|||||||
|
|
||||||
'DATOS
|
'DATOS
|
||||||
Dim strAF As New StringBuilder
|
Dim strAF As New StringBuilder
|
||||||
For Each Row As DataRow In DtAvance.FiltraParametros("CodigoAF <> ''").Rows
|
'se quitan los estatus cancelados
|
||||||
|
For Each Row As DataRow In DtAvance.FiltraParametros("CodigoAF <> '' AND TipoEstatus <> 3").Rows
|
||||||
Dim obj As New JObject(
|
Dim obj As New JObject(
|
||||||
New JProperty("category", Row("CodigoAF")),
|
New JProperty("category", Row("CodigoAF")),
|
||||||
New JProperty("fromDate", Row("FechaInicial").ToString().ToDateTime().ToString("dd/MM/yyyy HH:mm").ToDateTime()),
|
New JProperty("fromDate", Row("FechaInicial").ToString().ToDateTime().ToString("dd/MM/yyyy HH:mm").ToDateTime()),
|
||||||
@@ -171,7 +184,6 @@ Partial Class RepContratosCalendario
|
|||||||
End Sub
|
End Sub
|
||||||
Protected Sub MostrarModal(sender As Object, e As System.EventArgs)
|
Protected Sub MostrarModal(sender As Object, e As System.EventArgs)
|
||||||
|
|
||||||
|
|
||||||
If HidModClienteNombre.Value = "" Then
|
If HidModClienteNombre.Value = "" Then
|
||||||
HidModClienteNombre.Value = GlobalDTCliente(UsuarioActual.CveEmpresa, -1, HidModCveCliente.Value.ToEntero).FiltroPrimeroValor("NombreComercial")
|
HidModClienteNombre.Value = GlobalDTCliente(UsuarioActual.CveEmpresa, -1, HidModCveCliente.Value.ToEntero).FiltroPrimeroValor("NombreComercial")
|
||||||
End If
|
End If
|
||||||
@@ -182,8 +194,6 @@ Partial Class RepContratosCalendario
|
|||||||
DdlClientes.txtText.Value = HidModClienteNombre.Value
|
DdlClientes.txtText.Value = HidModClienteNombre.Value
|
||||||
DdlClientes.txtValue.Value = HidModCveCliente.Value
|
DdlClientes.txtValue.Value = HidModCveCliente.Value
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
UpModal.Update()
|
UpModal.Update()
|
||||||
|
|
||||||
RegistraScript("$('#ModalActualizar').modal('show');")
|
RegistraScript("$('#ModalActualizar').modal('show');")
|
||||||
@@ -192,11 +202,9 @@ Partial Class RepContratosCalendario
|
|||||||
|
|
||||||
Protected Sub UpdateContrato(sender As Object, e As EventArgs)
|
Protected Sub UpdateContrato(sender As Object, e As EventArgs)
|
||||||
Dim ObjContratos As New ClsContratos
|
Dim ObjContratos As New ClsContratos
|
||||||
ObjContratos.IniciaTransacSQL()
|
ObjContratos.IniciaTransacSQL()
|
||||||
|
|
||||||
Contrato = CveContrato.Value
|
If ObjContratos.UpdateContratos(CveContrato, TxtFolio.Text, 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:=34, CveContratosEstatus:=DdlEstatusContrato.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveChofer2:=DdlChofer2.SelectedValue.ToEntero, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveAF:=DdlAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero) Then
|
||||||
|
|
||||||
If ObjContratos.UpdateContratos(Contrato.ToEntero, TxtFolio.Text, 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:=34, CveContratosEstatus:=DdlEstatusContrato.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveChofer2:=DdlChofer2.SelectedValue.ToEntero, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveAF:=DdlAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero) Then
|
|
||||||
ObjContratos.Commit()
|
ObjContratos.Commit()
|
||||||
Alert("Actualizado Correctamente.")
|
Alert("Actualizado Correctamente.")
|
||||||
Else
|
Else
|
||||||
@@ -221,7 +229,7 @@ Partial Class RepContratosCalendario
|
|||||||
TxtFechaRegreso.Text = Convert.ToDateTime(GvRow.DataKey("FechaFinal")).ToString("dd/MM/yyyy hh:mm tt")
|
TxtFechaRegreso.Text = Convert.ToDateTime(GvRow.DataKey("FechaFinal")).ToString("dd/MM/yyyy hh:mm tt")
|
||||||
TxtMoneda.Text = GvRow.DataKey("CveMoneda")
|
TxtMoneda.Text = GvRow.DataKey("CveMoneda")
|
||||||
'Requeridos
|
'Requeridos
|
||||||
ViewState("Contrato") = GvRow.DataKey("CveContrato")
|
ViewState("CveContrato") = GvRow.DataKey("CveContrato")
|
||||||
DdlAF.SelectedValue = GvRow.DataKey("CveAF")
|
DdlAF.SelectedValue = GvRow.DataKey("CveAF")
|
||||||
DdlChofer.SelectedValueExist(GvRow.DataKey("CveChofer"))
|
DdlChofer.SelectedValueExist(GvRow.DataKey("CveChofer"))
|
||||||
DdlChofer2.SelectedValueExist(GvRow.DataKey("CveChofer2"))
|
DdlChofer2.SelectedValueExist(GvRow.DataKey("CveChofer2"))
|
||||||
|
|||||||
Reference in New Issue
Block a user