- ,mmejora

This commit is contained in:
2024-01-31 17:39:12 -07:00
parent c9adc2bfae
commit 2812b53d1d
2 changed files with 30 additions and 15 deletions

View File

@@ -211,14 +211,14 @@
<div class="row"> <div class="row">
<label class="col-md-4"> <label class="col-md-4">
<asp:Label runat="server" Text="Transporte:"></asp:Label></label><div <asp:Label runat="server" Text="Tipo Unidad:"></asp:Label></label><div
class="col-md-8"> class="col-md-8">
<asp:DropDownList ID="DdlTransporte" AppendDataBoundItems="true" DataTextField="Descripcion" <asp:DropDownList ID="DdlTipoAF" AppendDataBoundItems="true" DataTextField="TipoActivoFijo"
DataValueField="CveTipoActivoFijo" Class="table-group-action-input form-control input-inline select2me" DataValueField="CveTipoActivoFijo" Class="table-group-action-input form-control input-inline select2me"
Width="100%" runat="server"> Width="100%" runat="server">
</asp:DropDownList> </asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVTransporte" runat="server" ControlToValidate="DdlTransporte" <asp:RequiredFieldValidator ID="RFVTransporte" runat="server" ControlToValidate="DdlTipoAF"
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Transporte''</b> es necesario, por favor ingréselo." 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> ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCETransporte" runat="server" HighlightCssClass="vco" <ajax:ValidatorCalloutExtender ID="VCETransporte" runat="server" HighlightCssClass="vco"
@@ -227,6 +227,19 @@
</div> </div>
</div> </div>
<div class="row" runat="server" visible="false">
<label class="col-md-4">
<asp:Label runat="server" Text="Unidad:"></asp:Label></label><div
class="col-md-8">
<asp:DropDownList ID="DdlAF" AppendDataBoundItems="true" DataTextField="Descripcion"
DataValueField="CveAF" Class="table-group-action-input form-control input-inline select2me"
Width="100%" runat="server">
</asp:DropDownList>
</div>
</div>
<div class="row margin-bottom-5"> <div class="row margin-bottom-5">
<label class="col-md-4"> <label class="col-md-4">

View File

@@ -22,15 +22,17 @@ Partial Class ListadoContratos
End Sub End Sub
Private Sub InicializaCombos() Private Sub InicializaCombos()
'Lista Activos Fijos' 'Lista Activos Fijos'
Dim ObjAF As New ClsAF() 'Dim ObjAF As New ClsAF()
If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, 1, "-1", -1, -1, -1) Then 'If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, 1, "-1", -1, -1, -1) Then
If ObjAF.DtResultados.Rows.Count > 0 Then ' If ObjAF.DtResultados.Rows.Count > 0 Then
DdlTransporte.DataSource = ObjAF.DtResultados ' DdlAF.DataSource = ObjAF.DtResultados
DdlTransporte.Items.Insert(0, New ListItem("Seleccione", "")) ' DdlAF.Items.Insert(0, New ListItem("Seleccione", ""))
End If ' End If
End If 'End If
DdlTransporte.DataBind() 'ObjAF.Dispose()
ObjAF.Dispose() DdlTipoAF.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa)
DdlTipoAF.DataBind()
'Lista Chofer' 'Lista Chofer'
DdlChofer.DataSource = GlobalDTRHPersonal(185) DdlChofer.DataSource = GlobalDTRHPersonal(185)
@@ -57,7 +59,7 @@ Partial Class ListadoContratos
TxtFechaRegreso.Text = FechaRegreso TxtFechaRegreso.Text = FechaRegreso
TxtObservaciones.Text = Observaciones TxtObservaciones.Text = Observaciones
TxtUbicacion.Text = Ubicacion TxtUbicacion.Text = Ubicacion
DdlTransporte.SelectedValue = Transporte DdlAF.SelectedValue = Transporte
DdlClientes.SelectedText = Cliente DdlClientes.SelectedText = Cliente
DdlChofer.SelectedValue = Chofer DdlChofer.SelectedValue = Chofer
TxtDolares.Text = Dolares TxtDolares.Text = Dolares
@@ -92,7 +94,7 @@ 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:=DdlTransporte.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:=DdlTipoAF.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero)
End If End If
If CveContratoHijo > 0 Then If CveContratoHijo > 0 Then
@@ -116,7 +118,7 @@ Partial Class ListadoContratos
TxtObservaciones.Text = "" TxtObservaciones.Text = ""
TxtUbicacion.Text = "" TxtUbicacion.Text = ""
DdlClientes.SelectedText = "" DdlClientes.SelectedText = ""
DdlTransporte.SelectedValue = "" DdlAF.SelectedValue = ""
TxtDolares.Text = "" TxtDolares.Text = ""
TxtPesos.Text = "" TxtPesos.Text = ""
TxtAnticipo.Text = "" TxtAnticipo.Text = ""