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

View File

@@ -0,0 +1,70 @@
Option Explicit On
Option Strict On
Imports System.Data
Imports Extensiones
Partial Class Compras_RepFletes
Inherits ClsPaginas
#Region "PROPIEDADES"
Private Property DtFletes As DataTable
Get
Return CType(ViewState("DtFletes"), DataTable)
End Get
Set(value As DataTable)
ViewState("DtFletes") = 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
InicializaValores()
End If
End Sub
Private Sub InicializaValores()
TxtFechaI.Text = Date.Now.AddDays(-Now.DayOfYear + 1).ToShortDateString
TxtFechaF.Text = Date.Now.ToShortDateString
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
DdlProveedor.DataBind()
DdlProveedor.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
#Region " CARGA DAATOS "
Protected Sub BtnConsultarFiltros_Click(sender As Object, e As EventArgs)
CargaDatos()
End Sub
Private Sub CargaDatos()
Dim ObjInv As New ClsInventarios
If TxtFolio.Text <> "" Then TxtFechaI.Text = MinFecha.ToShortDateString : TxtFechaF.Text = MaxFecha.ToShortDateString
If ObjInv.GetFletes(UsuarioActual.CveEmpresa, -1, If(TxtFolio.Text = "", "-1", TxtFolio.Text), DdlProveedor.SelectedValue.ToString.ToEntero, -1, -1, TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate) Then
DtFletes = ObjInv.DtResultados
End If
ObjInv.Dispose()
CargaGrid()
End Sub
Private Sub CargaGrid()
GvDatos.DataSource = DtFletes
GvDatos.DataBind()
UpDatos.Update()
End Sub
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
Dim Modalidad = e.Row.DBCampo("Modalidad").ToString.ToEntero
Dim Liga = If(Modalidad = 1, "/OC/OC.aspx?OC", "/Compras/Compras.aspx?CveCompra")
e.Row.Cells(4).Text = $"<a target='_blank' href='{Liga}={e.Row.DBCampo("CveDocumento")}'>{If(Modalidad = 1, "OC: ", "Compra: ")}{e.Row.DBCampo("FolioDocumento")}</a>"
e.Row.Cells(5).Text = $"<a target='_blank' href='{Liga}={e.Row.DBCampo("CveDocumento")}'>{e.Row.DBCampo("FechaDocumento").ToDate.ToShortDateString}</a>"
e.Row.Cells(6).Text = $"<a target='_blank' href='{Liga}={e.Row.DBCampo("CveDocumento")}'>{e.Row.DBCampo("DescripcionDocumento")}</a>"
e.Row.Cells(7).Text = $"<a target='_blank' href='{Liga}={e.Row.DBCampo("CveDocumento")}'>{e.Row.DBCampo("TotalDocumento")}</a>"
End If
End Sub
#End Region
End Class