Commit inicial Ventas Productivo

This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2019-08-14 16:40:54 -07:00
commit c35cf91883
13328 changed files with 3711549 additions and 0 deletions

78
AF/RepFlotillas.aspx.vb Normal file
View File

@@ -0,0 +1,78 @@
Option Explicit On
Option Strict On
Imports System.Data
Imports Extensiones
Imports Microsoft.Reporting.WebForms
Partial Class AF_RepFlotillas
Inherits ClsPaginas
Private Sub AF_RepFlotillas_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then
CargaCombos()
End If
End Sub
#Region "C A R G A S"
Private Sub CargaCombos()
'Estatus AF
DdlEstatus.DataSource = GlobalDTEstadoActivoFijo
DdlEstatus.DataBind()
DdlEstatus.Items.Insert(0, New ListItem("Todos", "-1"))
'Tipos Activo
DdlTipoActivo.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("", "TipoActivoFijo")
DdlTipoActivo.DataBind()
DdlTipoActivo.Items.Insert(0, New ListItem("Todos", "-1"))
'Proveedor
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
DdlProveedor.DataBind()
DdlProveedor.Items.Insert(0, New ListItem("Todos", "-1"))
'CentroCosto
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
#End Region
#Region " CARGA DATOS "
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
CargaDatos()
UPDatos.Update()
End Sub
Private Sub CargaDatos()
Dim ObjAF As New ClsAF()
Dim FechaI, FechaF As String
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
If ObjAF.GetRepCargasCombustible(FechaI, FechaF, DdlTipoActivo.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlGrupo.SelectedValue.ToEntero, DdlProveedor.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
GvDatos.DataSource = ObjAF.DtResultados
End If
GvDatos.DataBind()
ObjAF.Dispose()
End Sub
#End Region
#Region " GV DATOS - ROW DATABOUND "
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim Css As String = "Texto"
' PARA LIGA
Dim FechaI, FechaF As String
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
'LIGA A DETALLE
Dim Liga As String = $"/AF/CatCargasCombustible.aspx?GPO={DdlGrupo.SelectedValue}&AnioMes={e.Row.DBCampo("AnioMes")}&CveProveedor={e.Row.DBCampo("CveProveedor")}&CveSubProyecto={e.Row.DBCampo("CveSubProyecto")}&CveTipoAF={ e.Row.DBCampo("CveTipoAF")}&CveAF={e.Row.DBCampo("CveAF")}&FechaI={FechaI}&FechaF={FechaF}"
e.Row.FCLiteral("LtlGrupo").Text = "<a class=""" & Css & """ target='_blank' href=""" & Liga & """>" & e.Row.FCLiteral("LtlGrupo").Text & "</a>"
e.Row.FCLiteral("LtlCantidad").Text = "<a class=""" & Css & """ target='_blank' href=""" & Liga & """>" & e.Row.FCLiteral("LtlCantidad").Text & "</a>"
End If
End Sub
#End Region
End Class