Commit inicial Ventas Productivo
This commit is contained in:
112
Ventas/AuxiliarClienteVentas.aspx.vb
Normal file
112
Ventas/AuxiliarClienteVentas.aspx.vb
Normal file
@@ -0,0 +1,112 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Ventas_AuxiliarClienteVentas
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES"
|
||||
Private Property DtActivosFijos As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtActivosFijos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtActivosFijos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private ReadOnly Property CveActivoFijo As Integer
|
||||
Get
|
||||
Return ViewState("CveActivoFijo").ToString.ToEntero
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Property DTAFCaracteristicas As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DTAFCaracteristicas"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTAFCaracteristicas") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CargaFiltros()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub CargaFiltros()
|
||||
|
||||
If (UsuarioActual.Empresa.Funcionalidad(105) = "1") Then
|
||||
DdlClientes.setEsWebService(True)
|
||||
DdlClientes.Attributes.Add("data-metodo", "getcliente")
|
||||
DdlClientes.SelectedText = "Todos"
|
||||
DdlClientes.SelectedValue = "-1"
|
||||
Else
|
||||
DdlClientes.setEsWebService(False)
|
||||
DdlClientes.ddl.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
||||
DdlClientes.ddl.DataBind()
|
||||
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
'Vendedor
|
||||
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
||||
DdlVendedor.DataBind()
|
||||
DdlVendedor.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlSubProyecto.Items.Clear()
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa) 'GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
txtFechaI.Text = Now.AddDays(-30).ToString("dd/MM/yyyy")
|
||||
txtFechaF.Text = Now.ToString("dd/MM/yyyy")
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
'Falta PA
|
||||
If ObjConta.GetClienteAuxiliarxVenta(DdlClientes.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlVendedor.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvAuxCliente.DataSource = ObjConta.DtResultados
|
||||
Else
|
||||
GvAuxCliente.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
GvAuxCliente.DataBind()
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
Private Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
GvAuxCliente.ExportToExcelG("Auxiliar" & DdlClientes.SelectedText & ".xlsx")
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||
End Sub
|
||||
|
||||
Private Sub GvAuxCliente_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvAuxCliente.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("ConceptoContable") = "" Then
|
||||
e.Row.CssClass = "Totales"
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user