T129 Auditoria SAT
This commit is contained in:
@@ -27,34 +27,36 @@
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-8">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveTipoContrato,CveDocumentacion" EmptyDataText="No se encontraron datos" Width="100%"
|
||||
ToolTip="Listado de Genero" CssClass="table table-striped table-advance table-hover" GridLines="None" >
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Tipo Contrato">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LrlTipoContrato" runat="server" Text='<%# Eval("TipoContrato") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Documento" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDocumento" runat="server" Text='<%# Eval("Documentacion") %>' ></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Requerido" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="ChkRequerido" Checked= '<%# Eval("Requerido") %>' AutoPostBack="true" OnCheckedChanged="ChkRequerido_CheckedChanged" CssClass="md-checksd" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveTipoContrato,CveDocumentacion" EmptyDataText="No se encontraron datos" Width="100%"
|
||||
ToolTip="Listado de Genero" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None" >
|
||||
<Columns>
|
||||
|
||||
</div>
|
||||
<asp:TemplateField HeaderText="Tipo Contrato">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LrlTipoContrato" runat="server" Text='<%# Eval("TipoContrato") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Documento" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDocumento" runat="server" Text='<%# Eval("Documentacion") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Requerido" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="ChkRequerido" Checked='<%# Eval("Requerido") %>' AutoPostBack="true" OnCheckedChanged="ChkRequerido_CheckedChanged" CssClass="md-checksd" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
<div class="col-md-8">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveTipoContrato,TipoContrato,Estatus" EmptyDataText="No se encontraron Tipos de contrato" Width="100%"
|
||||
ToolTip="Listado de Genero" CssClass="table table-striped table-advance table-hover" GridLines="None" >
|
||||
ToolTip="Listado de Genero" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None" >
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Tipo Contrato">
|
||||
|
||||
@@ -21,17 +21,77 @@
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px; position: relative;">
|
||||
|
||||
<div class="tools">
|
||||
<asp:Button ID="btConsultar" CssClass="btn btn-primary" runat="server" ValidationGroup="GrpConsultar" Text="Consultar" OnClick="btConsultar_Click" /></td>
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption magindate">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-md-1 "><asp:Label runat="server" id="LblSubProyectoFiltro" ></asp:Label></div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlSubProyectoFiltro" runat="server" CssClass="select2me" Width="100%" DataTextField="SubProyecto" DataValueField="CveSubProyecto">
|
||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 ">Proveedor:</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlProveedorFiltro" runat="server" CssClass="select2me" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor" >
|
||||
</asp:DropDownList >
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 ">Perfil:</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlTipoContratoFiltro" runat="server" CssClass="select2me" Width="100%" DataTextField="TipoContrato" DataValueField="CveTipoContrato">
|
||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- <div class="portlet-body">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1 ">Estatus:</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlEstatus" runat="server" CssClass="select2me" Width="100%" >
|
||||
|
||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||
<asp:ListItem Value="1" >Vigente</asp:ListItem>
|
||||
<asp:ListItem Value="2" >Rescindido</asp:ListItem>
|
||||
<asp:ListItem Value="3" >Suspendido</asp:ListItem>
|
||||
<asp:ListItem Value="4" >Terminado</asp:ListItem>
|
||||
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div> --%>
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveContrato,Contrato,CveProveedor,NombreComercial,CveSubProyecto,CveTipoContrato,CveRepresentanteLegal,FechaInicio, FechaFin,Estatus" EmptyDataText="No se encontraron contratos" Width="100%"
|
||||
ToolTip="Listado Contratos" CssClass="table table-striped table-advance table-hover" GridLines="None">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveContrato,Contrato,CveProveedor,NombreComercial,CveSubProyecto,CveTipoContrato,CveRepresentanteLegal,FechaInicio, FechaFin,Estatus"
|
||||
EmptyDataText="No se encontraron contratos" Width="100%" OnRowDataBound="GvDatos_RowDataBound"
|
||||
ToolTip="Listado Contratos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Proveedor" ItemStyle-HorizontalAlign="Left">
|
||||
@@ -40,7 +100,10 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Sub Proyecto">
|
||||
<asp:TemplateField >
|
||||
<HeaderTemplate>
|
||||
<asp:Label runat="server" ID="LblSubProyecto"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSubProyecto" runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
@@ -121,7 +184,7 @@
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="width:500px!important">
|
||||
<label for="DdlProveedores" >Proveedor:</label>
|
||||
<ADS:Dropdownlost ID="DdlProveedores" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor" Onselectedindexchange="DdlProveedores_selectedindexchange" ></ADS:Dropdownlost>
|
||||
<ADS:Dropdownlost ID="DdlProveedores" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor" Onselectedindexchange="DdlProveedores_selectedindexchange" ></ADS:Dropdownlost>
|
||||
|
||||
<i></i>
|
||||
|
||||
@@ -137,7 +200,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="DdlSubProyecto">Sub Proyecto:</label><br />
|
||||
<asp:Label runat="server" ID="LblSubProyecto" for="DdlSubProyecto">Sub Proyecto:</asp:Label><br />
|
||||
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="500px" AutoPostBack="True">
|
||||
<asp:ListItem Selected="true" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
@@ -147,7 +210,7 @@
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="DdlSubProyecto">Representante Legal:</label><br />
|
||||
<label for="DDlRePresentanteLegal">Representante Legal:</label><br />
|
||||
<asp:DropDownList ID="DDlRePresentanteLegal" CssClass="form-control input-sm select2me" runat="server" DataTextField="RepresentanteLegal" DataValueField="CveRepresentanteLegal" Width="500px" >
|
||||
<asp:ListItem Selected="true" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
@@ -157,11 +220,17 @@
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2" for="<%= TxtFechaInicio.ClientID.ToString()%>">Fecha Inicio:</label>
|
||||
<div class=" input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="margin-right: 10px!important">
|
||||
<div class="row" style="vertical-align:bottom!important">
|
||||
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
|
||||
<td style="vertical-align:bottom!important;text-align:center!important">
|
||||
<label style="width:100px!important">Fecha Inicio:</label>
|
||||
</td>
|
||||
<td>
|
||||
<div class=" input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="margin-right: 10px!important">
|
||||
<asp:TextBox ID="TxtFechaInicio" Style="margin-top: 10px" Width="100" CssClass="form-control " runat="server" MaxLength="10" CausesValidation="true"></asp:TextBox>
|
||||
|
||||
<span class="input-group-btn " style="position: absolute; right: 41px; top: 0px;">
|
||||
@@ -172,14 +241,16 @@
|
||||
<asp:RequiredFieldValidator ID="RfvtxtFechaInicio" runat="server" ControlToValidate="txtFechaInicio" Display="None" ErrorMessage="El campo <b>''Fecha Inicio''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardaContrato" ></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="RfvctxtFechaInicio" runat="server" HighlightCssClass="vco" TargetControlID="RfvtxtFechaInicio" Width="100px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2" for="<%= TxtFechaFin.ClientID.ToString()%>">Fecha Fin:</label>
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||
|
||||
|
||||
|
||||
|
||||
<td style="vertical-align:bottom!important;text-align:center!important" > <label style="width:100px!important">Fecha Fin:</label></td>
|
||||
<td>
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||
<asp:TextBox ID="TxtFechaFin" Width="100" Style="margin-top: 10px" CssClass="form-control " runat="server" MaxLength="10" CausesValidation="true"></asp:TextBox>
|
||||
|
||||
<span class="input-group-btn " style="position: absolute; right: 41px; top: 0px;">
|
||||
@@ -191,9 +262,27 @@
|
||||
<asp:RequiredFieldValidator ID="RfvTxtFechaFin" runat="server" ControlToValidate="TxtFechaFin" Display="None" ErrorMessage="El campo <b>''Fecha Fin''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardaContrato" ></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CXRfvTxtFechaFin" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtFechaFin" Width="100px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<%-- <div class="col-md-6">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -202,7 +291,7 @@
|
||||
|
||||
|
||||
|
||||
<div ID="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright">
|
||||
<div ID="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright" visible="false">
|
||||
<label for="ChkEstatus">Activo:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
|
||||
@@ -243,7 +332,7 @@
|
||||
|
||||
<br />
|
||||
|
||||
<asp:GridView ID="GvRepresentante" runat="server" AutoGenerateColumns="False" DataKeyNames="CveRepresentanteLegal" EmptyDataText="No se encontraron Representantes" Width="100%"
|
||||
<asp:GridView ID="GvRepresentante" runat="server" AutoGenerateColumns="False" DataKeyNames="CveRepresentanteLegal,CveProveedor" EmptyDataText="No se encontraron Representantes" Width="100%"
|
||||
ToolTip="Listado de representantes" CssClass="table table-striped table-advance table-hover" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
|
||||
@@ -23,8 +23,10 @@ Partial Class Proveedores_Contratos
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
CargaDatos()
|
||||
|
||||
CargaCombos()
|
||||
CargaDatos()
|
||||
|
||||
|
||||
End If
|
||||
|
||||
@@ -35,7 +37,7 @@ Partial Class Proveedores_Contratos
|
||||
|
||||
Dim ObjProv As New ClsCompProveedores
|
||||
|
||||
If ObjProv.GetContrato(-1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjProv.GetContrato(-1, DdlSubProyectoFiltro.SelectedValue.ToEntero, DdlProveedorFiltro.SelectedValue.ToEntero, DdlTipoContratoFiltro.SelectedValue.ToEntero, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = ObjProv.DtResultados
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
@@ -50,18 +52,24 @@ Partial Class Proveedores_Contratos
|
||||
|
||||
Private Sub CargaCombos()
|
||||
'CargaProveedores
|
||||
|
||||
|
||||
|
||||
DdlProveedores.setEsWebService(True)
|
||||
DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
|
||||
DdlProveedores.SelectedText = "Todos"
|
||||
DdlProveedores.SelectedValue = "-1"
|
||||
|
||||
|
||||
DdlSubProyecto.Items.Clear()
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
'DdlSubProyecto.Items.Clear()
|
||||
'DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||
'DdlSubProyecto.DataBind()
|
||||
'DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyectoFiltro, Nothing, LblSubProyectoFiltro)
|
||||
|
||||
DdlTipoContrato.Items.Clear()
|
||||
|
||||
Dim ObjProveedor As New ClsCompProveedores
|
||||
@@ -69,15 +77,26 @@ Partial Class Proveedores_Contratos
|
||||
|
||||
If ObjProveedor.GetTiposContratos(-1, UsuarioActual.CveEmpresa, 1) Then
|
||||
DdlTipoContrato.DataSource = ObjProveedor.DtResultados
|
||||
DdlTipoContratoFiltro.DataSource = ObjProveedor.DtResultados
|
||||
End If
|
||||
|
||||
If ObjProveedor.GetContratoProvedores(UsuarioActual.CveEmpresa) Then
|
||||
DdlProveedorFiltro.DataSource = ObjProveedor.DtResultados
|
||||
End If
|
||||
|
||||
|
||||
ObjProveedor.Dispose()
|
||||
|
||||
DdlTipoContrato.DataBind()
|
||||
DdlTipoContratoFiltro.DataBind()
|
||||
DdlProveedorFiltro.DataBind()
|
||||
|
||||
DdlTipoContrato.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
CargaRepresentantes()
|
||||
DdlTipoContratoFiltro.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlProveedorFiltro.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -96,6 +115,10 @@ Partial Class Proveedores_Contratos
|
||||
|
||||
DdlTipoContrato.SelectedValueExist("-1")
|
||||
DdlSubProyecto.SelectedValueExist("-1")
|
||||
|
||||
|
||||
DDlRePresentanteLegal.Items.Clear()
|
||||
DDlRePresentanteLegal.Items.Add(New ListItem("Seleccione uno", "-1"))
|
||||
DDlRePresentanteLegal.SelectedValueExist("-1")
|
||||
|
||||
TxtFechaInicio.Text = ""
|
||||
@@ -104,6 +127,11 @@ Partial Class Proveedores_Contratos
|
||||
|
||||
BtnAgregarModalContrato.Text = "Agregar"
|
||||
|
||||
CheckActiveSection.Visible = False
|
||||
ChkEstatus.Enabled = True
|
||||
|
||||
|
||||
|
||||
UpModalContrato.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarContrato"))
|
||||
|
||||
@@ -119,8 +147,13 @@ Partial Class Proveedores_Contratos
|
||||
|
||||
DdlProveedores.txtValue.Value = GvRow.DataKey("CveProveedor")
|
||||
DdlProveedores.txtText.Value = GvRow.DataKey("NombreComercial")
|
||||
|
||||
DdlTipoContrato.SelectedValueExist(GvRow.DataKey("CveTipoContrato"))
|
||||
DdlSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto"))
|
||||
|
||||
|
||||
CargaRepresentantes(GvRow.DataKey("CveProveedor").ToEntero)
|
||||
|
||||
DDlRePresentanteLegal.SelectedValueExist(GvRow.DataKey("CveRepresentanteLegal"))
|
||||
|
||||
TxtFechaInicio.Text = GvRow.DataKey("FechaInicio").ToString.ToDate().ToString("dd/MM/yyyy")
|
||||
@@ -128,9 +161,12 @@ Partial Class Proveedores_Contratos
|
||||
|
||||
ChkEstatus.Checked = Boolean.Parse(GvRow.DataKey("Estatus"))
|
||||
|
||||
|
||||
BtnAgregarModalContrato.Text = "Actualizar"
|
||||
|
||||
CheckActiveSection.Visible = True
|
||||
|
||||
|
||||
|
||||
UpModalContrato.Update()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarContrato"))
|
||||
@@ -183,10 +219,6 @@ Partial Class Proveedores_Contratos
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkGvEliminar_Click(sender As Object, e As EventArgs)
|
||||
@@ -221,25 +253,32 @@ Partial Class Proveedores_Contratos
|
||||
|
||||
Protected Sub BtnAgregarRepresentante_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim CveProveedor As Integer = DdlProveedores.txtValue.Value.ToEntero
|
||||
|
||||
If CveProveedor <= 0 Then
|
||||
Alert("Debe de seleccionar un proveedor", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim ObjProv As New ClsCompProveedores
|
||||
|
||||
If ObjProv.AddRePresentanteLegal(TxtRepresentanteLegal.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
If ObjProv.AddRePresentanteLegal(TxtRepresentanteLegal.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProveedor) Then
|
||||
Alert("Se agrego representante correctamente.")
|
||||
TxtRepresentanteLegal.Text = ""
|
||||
End If
|
||||
|
||||
ObjProv.Dispose()
|
||||
|
||||
CargaRepresentantes()
|
||||
CargaRepresentantes(CveProveedor)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaRepresentantes()
|
||||
Private Sub CargaRepresentantes(CveProveedor As Integer)
|
||||
|
||||
Dim ObjProv As New ClsCompProveedores
|
||||
|
||||
|
||||
If ObjProv.GetRePresentanteLegal(-1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjProv.GetRePresentanteLegal(-1, UsuarioActual.CveEmpresa, CveProveedor) Then
|
||||
GvRepresentante.DataSource = ObjProv.DtResultados
|
||||
DDlRePresentanteLegal.DataSource = ObjProv.DtResultados
|
||||
Else
|
||||
@@ -263,6 +302,7 @@ Partial Class Proveedores_Contratos
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
Dim CveRepresentanteLegal As Integer = GvRow.DataKey("CveRepresentanteLegal").ToEntero
|
||||
Dim CveProveedor As Integer = GvRow.DataKey("CveProveedor").ToEntero
|
||||
Dim ObjProv As New ClsCompProveedores
|
||||
|
||||
If ObjProv.RemoveRePresentanteLegal(CveRepresentanteLegal, UsuarioActual.CveEmpresa) Then
|
||||
@@ -271,7 +311,22 @@ Partial Class Proveedores_Contratos
|
||||
|
||||
ObjProv.Dispose()
|
||||
|
||||
CargaRepresentantes()
|
||||
CargaRepresentantes(CveProveedor)
|
||||
|
||||
End Sub
|
||||
Protected Sub DdlProveedores_selectedindexchange(sender As Object, e As EventArgs)
|
||||
|
||||
Dim CveProveedor As Integer = DdlProveedores.txtValue.Value.ToEntero
|
||||
CargaRepresentantes(CveProveedor)
|
||||
End Sub
|
||||
Protected Sub btConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
e.Row.FCLabel("LblSubProyecto").Text = LblSubProyectoFiltro.Text
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user