Importe en NC desde catalogo de autorizaciones
This commit is contained in:
@@ -38,8 +38,7 @@
|
||||
</div>
|
||||
<div class="titlefiltros caption" style="margin-top: -8px;">
|
||||
<ul class="list-inline" style="font-size: 12px;">
|
||||
<li>Estatus:
|
||||
|
||||
<li>Estatus:
|
||||
<asp:DropDownList AppendDataBoundItems="true" ID="DdlEstatus" runat="server" Width="200px" DataTextField="Nombre" DataValueField="CveDispositivosGrupos" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Value="-1" Text="Todos"></asp:ListItem>
|
||||
<asp:ListItem Value="0" Text="Solicitada"></asp:ListItem>
|
||||
@@ -48,6 +47,13 @@
|
||||
<asp:ListItem Value="3" Text="Rechazada"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>Cliente:
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClienteFiltro" Width="200px" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
||||
</li>
|
||||
<li>Vendedor:
|
||||
<asp:DropDownList ID="DdlVendedorFiltro" CssClass="form-control marginFixRow select2me" runat="server" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Width="200px">
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -27,21 +27,38 @@ Partial Class Ventas_CatAutorizacionLimites
|
||||
If Not IsPostBack Then
|
||||
CargaCombos()
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "CARGAS"
|
||||
Private Sub CargaCombos()
|
||||
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||
If EsWS Then
|
||||
DdlCliente.setEsWebService(True)
|
||||
DdlClienteFiltro.setEsWebService(True)
|
||||
Else
|
||||
DdlCliente.setEsWebService(False)
|
||||
DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
DdlCliente.DataBind()
|
||||
DdlCliente.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
DdlClienteFiltro.setEsWebService(False)
|
||||
DdlClienteFiltro.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
DdlClienteFiltro.DataBind()
|
||||
DdlClienteFiltro.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End If
|
||||
|
||||
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
||||
DdlVendedor.DataBind()
|
||||
|
||||
DdlVendedorFiltro.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
||||
DdlVendedorFiltro.DataBind()
|
||||
DdlVendedorFiltro.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
UpModal.Update()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim CveCliente As Integer = -1
|
||||
If DdlClienteFiltro.SelectedValue.ToEntero() <= 0 Then
|
||||
CveCliente = -1
|
||||
Else
|
||||
@@ -78,24 +95,18 @@ Partial Class Ventas_CatAutorizacionLimites
|
||||
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub LnkAgregar_Click(sender As Object, e As EventArgs)
|
||||
LimpiaModal()
|
||||
Modalidad = "A"
|
||||
BtnGuardar.Text = "Agregar"
|
||||
ltlMotititulo.Text = "Agregar autorización"
|
||||
UpModal.Update()
|
||||
RegistraScript("$('#DModal').modal()")
|
||||
RegistraScript("$('#DModal').modal()")
|
||||
End Sub
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
If DdlTipoDocto.SelectedValue = "Ing" AndAlso DdlTipoAutorizacion.SelectedValue.ToEntero() <= 0 Then
|
||||
Alert("Debe seleccionar un tipo de autorización", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
If DdlTipoAutorizacion.SelectedValue.ToEntero() <= 0 Then
|
||||
Dim CveTipoAutorizacion As Integer = -1
|
||||
Alert("Debe seleccionar un tipo de autorización", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
@@ -166,7 +177,6 @@ Partial Class Ventas_CatAutorizacionLimites
|
||||
Protected Sub LnkAutorizar_Click(sender As Object, e As EventArgs)
|
||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
|
||||
Dim CveAutorizacion = gvRow.DataKey("CveAutorizacion").ToEntero()
|
||||
Dim CveAutorizacion = gvRow.DataKey("CveAutorizacion").ToEntero()
|
||||
Dim CveCliente = gvRow.DataKey("CveCliente").ToEntero()
|
||||
Dim CveVendedor = gvRow.DataKey("CveVendedor").ToEntero()
|
||||
@@ -204,11 +214,12 @@ Partial Class Ventas_CatAutorizacionLimites
|
||||
End Sub
|
||||
Protected Sub DdlCliente_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
Dim CveCliente As Integer = DdlCliente.SelectedValue.ToEntero()
|
||||
If CveCliente > 0 Then
|
||||
Using ObjClientes As New ClsClientes
|
||||
If CveCliente > 0 Then
|
||||
Using ObjClientes As New ClsClientes
|
||||
If ObjClientes.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) AndAlso ObjClientes.DtResultados.Rows.Count > 0 Then
|
||||
DdlVendedor.SelectedValueExist(ObjClientes.DtResultados.Rows(0)("CveVendedor"))
|
||||
DdlVendedor.SelectedValueExist(ObjClientes.DtResultados.Rows(0)("CveVendedor"))
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
|
||||
UpModal.Update()
|
||||
|
||||
Reference in New Issue
Block a user