Contratos obras se agrega CveCliente

This commit is contained in:
Rakcsle Supertramp
2020-11-06 10:42:03 -07:00
parent 056d2b0456
commit 2f25614e40
2 changed files with 38 additions and 15 deletions

View File

@@ -326,20 +326,40 @@
<ajax:ValidatorCalloutExtender ID="VCEDescripcionContrato" runat="server" HighlightCssClass="vco" TargetControlID="RFVDescripcionContrato" Width="300px" BehaviorID="_content_VCEDescripcionContrato"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCEDescripcionContrato" runat="server" HighlightCssClass="vco" TargetControlID="RFVDescripcionContrato" Width="300px" BehaviorID="_content_VCEDescripcionContrato"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<div id="trLicitacion" runat="server" class="row"> <div id="trLicitacion" runat="server" class="row">
<label class="col-md-2 truncate">Número Licitación:</label> <label class="col-md-2 truncate">Número Licitación:</label>
<div class="col-md-10"> <div class="col-md-10">
<asp:TextBox ID="TxtNumeroLicitacion" runat="server" MaxLength="70" Width="200px"></asp:TextBox> <asp:TextBox ID="TxtNumeroLicitacion" runat="server" MaxLength="70" Width="200px"></asp:TextBox>
</div> </div>
</div> </div>
<div class="row" id="TrProveedor" runat="server"> <div class="row" id="TrProveedor" runat="server">
<label class="col-md-2 truncate "> <label class="col-md-2 truncate ">
<asp:Label ID="LblProveedor" runat="server" Text="Proveedor:"></asp:Label></label><div class="col-md-10"> <asp:Label ID="LblProveedor" runat="server" Text="Proveedor:"></asp:Label></label>
<div class="col-md-10">
<asp:DropDownList ID="DdlContratista" runat="server" CssClass="input-sm form-control select2me" AppendDataBoundItems="True" DataTextField="RazonSocial" DataValueField="CveProveedor" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 350px !important;" ValidationGroup="GrpGuardar"> <asp:DropDownList ID="DdlContratista" runat="server" CssClass="input-sm form-control select2me" AppendDataBoundItems="True" DataTextField="RazonSocial" DataValueField="CveProveedor" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 350px !important;" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
</div> </div>
<div class="row" >
<label class="col-md-2 truncate ">
<asp:Label ID="LblCliente" runat="server" Text="Cliente:"></asp:Label></label>
<div class="col-md-10">
<asp:DropDownList ID="DdlCliente" runat="server" AppendDataBoundItems="True" DataTextField="NombreComercial" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-sm select2me" Style="width: 350px !important;" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="row" style="display: none;"> <div class="row" style="display: none;">
<label class="col-md-2 truncate ">Ubicacion:</label> <label class="col-md-2 truncate ">Ubicacion:</label>
<div class="col-md-10"> <div class="col-md-10">
@@ -460,9 +480,7 @@
<div class="row" id="TrCliente" runat="server" visible="False"> <div class="row" id="TrCliente" runat="server" visible="False">
<label class="col-md-2 truncate"> <label class="col-md-2 truncate">
<asp:Label ID="Label1" runat="server" Text="Cliente:"></asp:Label></label><div class="col-md-10"> <asp:Label ID="Label1" runat="server" Text="Cliente:"></asp:Label></label><div class="col-md-10">
<asp:DropDownList ID="DdlCliente" AutoPostBack="True" OnSelectedIndexChanged="DdlCliente_SelectedIndexChanged" runat="server" AppendDataBoundItems="True" DataTextField="NombreComercial" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-sm select2me" Width="75%" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div> </div>
</div> </div>
<asp:UpdatePanel runat="server"> <asp:UpdatePanel runat="server">

View File

@@ -362,12 +362,12 @@ Partial Class Contratos_ContratoObra
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
CargaValoresIniciales() CargaValoresIniciales()
CreaDtTmpFianzas() CreaDtTmpFianzas()
If Request("CveCliente") IsNot Nothing Then
cargaClientes() cargaClientes()
End If
If Request("CveContrato") IsNot Nothing AndAlso IsNumeric(Request("CveContrato")) AndAlso Request("CveContrato").ToEntero > 0 Then If Request("CveContrato") IsNot Nothing AndAlso IsNumeric(Request("CveContrato")) AndAlso Request("CveContrato").ToEntero > 0 Then
ViewState("CveContrato") = Request("CveContrato") ViewState("CveContrato") = Request("CveContrato")
@@ -474,6 +474,11 @@ Partial Class Contratos_ContratoObra
End If End If
TabAvanveDocumento.Visible = False
TabContratosGastos.Visible = False
TabPed.Visible = False
End Sub End Sub
#Region " CARGA VALORES INICIALES " #Region " CARGA VALORES INICIALES "
@@ -545,13 +550,13 @@ Partial Class Contratos_ContratoObra
End Sub End Sub
Public Function isWithFamily() As Boolean Public Function isWithFamily() As Boolean
Return UsuarioActual.CveEmpresa = 66 Return UsuarioActual.CveEmpresa = 66
End Function End Function
Private Sub cargaClientes()
TrCliente.Visible = True Private Sub cargaClientes()
TrProveedor.Visible = False
DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1) DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
DdlCliente.DataBind() DdlCliente.DataBind()
End Sub End Sub
Private Sub CreaDT() Private Sub CreaDT()
TmpDT = New DataTable TmpDT = New DataTable
TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer)) TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer))
@@ -951,7 +956,7 @@ Partial Class Contratos_ContratoObra
' TxtPorcentajeComision.Text = ObjContratos.PorcentajeComision.ToString ' TxtPorcentajeComision.Text = ObjContratos.PorcentajeComision.ToString
CveTipoContrato = ObjContratos.DtResultados.Rows(0)("CveContratoTipo").ToString.ToEntero CveTipoContrato = ObjContratos.DtResultados.Rows(0)("CveContratoTipo").ToString.ToEntero
TxtCorreoNotificacion.Text = ObjContratos.DtResultados.Rows(0)("CorreoNotificacionPedDev").ToString TxtCorreoNotificacion.Text = ObjContratos.DtResultados.Rows(0)("CorreoNotificacionPedDev").ToString
DdlCliente.SelectedValueExist(ObjContratos.DtResultados.Rows(0)("CveCliente").ToString)
If ObjContratos.CveProveedor > 0 Then If ObjContratos.CveProveedor > 0 Then
TrProveedor.Visible = True TrProveedor.Visible = True