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