Proveedores grid representates

This commit is contained in:
Rakcsle Supertramp
2020-02-19 18:26:04 -07:00
parent cb9c073a83
commit 6e6bfc51d9
3 changed files with 74 additions and 1 deletions

View File

@@ -1858,7 +1858,7 @@ Public Class ClsCompProveedores
Return Retorno Return Retorno
End Function End Function
Public Function GetRePresentanteLegal(CveRepresentanteLegal As Integer, CveEmpresa As Integer) As Boolean Public Function GetRePresentanteLegal(CveRepresentanteLegal As Integer, CveEmpresa As Integer, Optional CveProveedor As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -1868,6 +1868,7 @@ Public Class ClsCompProveedores
.Add("@CveRepresentanteLegal", SqlDbType.Int).Value = CveRepresentanteLegal .Add("@CveRepresentanteLegal", SqlDbType.Int).Value = CveRepresentanteLegal
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
End With End With

View File

@@ -603,6 +603,51 @@
</div> </div>
</div> </div>
</div>--%> </div>--%>
<div class="portlet light smmallpadding bordered ">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Representastes Legales</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
<a href="javascript:;" class="reload" data-original-title="" title=""></a>
<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>
<a href="javascript:;" class="remove" data-original-title="" title=""></a>
</div>
</div>
<div class="portlet-body form-horizontal form-row-sepe formnombottom">
<asp:GridView ID="GvRepresentante" runat="server" AutoGenerateColumns="False" DataKeyNames="CveRepresentanteLegal" EmptyDataText="No se encontraron Representantes" Width="100%"
ToolTip="Listado de representantes" CssClass="table table-striped table-advance table-hover" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="Representante" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Literal ID="LtlProveedor" runat="server" Text='<%# Eval("RepresentanteLegal") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<%--
<asp:TemplateField HeaderText="Eliminar" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:LinkButton runat="server" ID="LnkEliminar" OnClick="LnkGvRepresentantesEliminar_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
</ItemTemplate>
</asp:TemplateField>--%>
</Columns>
</asp:GridView>
</div>
</div>
</div> </div>

View File

@@ -380,6 +380,9 @@ Partial Class Compras_Proveedores
End If End If
HlEvento.Visible = True HlEvento.Visible = True
HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CveProveedor=" & CveProveedor & "&TB_iframe=true&height=370&width=600;" HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CveProveedor=" & CveProveedor & "&TB_iframe=true&height=370&width=600;"
CargaRepresentantes()
Else Else
'Configuración de Modalidad Insert 'Configuración de Modalidad Insert
@@ -500,6 +503,30 @@ Partial Class Compras_Proveedores
'ViewState("OUsuario") = "Usuario DESC" 'ViewState("OUsuario") = "Usuario DESC"
End Sub End Sub
Private Sub CargaRepresentantes()
If CveProveedor > 0 Then
Dim ObjProveedores As New ClsCompProveedores
If ObjProveedores.GetRePresentanteLegal(-1, UsuarioActual.CveEmpresa, CveProveedor) Then
GvRepresentante.DataSource = ObjProveedores.DtResultados
Else
GvRepresentante.DataSource = Nothing
End If
ObjProveedores.Dispose()
GvRepresentante.DataBind()
End If
End Sub
Private Sub CargaCuentasContables(Optional IdCuentaPadre As Integer = -1) Private Sub CargaCuentasContables(Optional IdCuentaPadre As Integer = -1)
If UsuarioActual.Empresa.UsaContabilidad Then If UsuarioActual.Empresa.UsaContabilidad Then
Dim ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa) Dim ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa)