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,63 @@
Option Explicit On
Option Strict On
Imports Extensiones
Imports Microsoft.Reporting.WebForms
Imports System.Data
Partial Class Ventas_RepTopVentas
Inherits ClsPaginas
Private Property TipoCambio As Integer
Get
Return ViewState("TipoCambio").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("TipoCambio") = value
End Set
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
TipoCambio = -1
CargaDatos()
End If
End Sub
Protected Sub CargaDatos()
Dim TCEspecifico As Decimal = -1
If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then TCEspecifico = TxtEspecifico.Text.ToDecimal Else TCEspecifico = -1
Dim ObjVentas As New ClsVentas
If ObjVentas.GetRepTopVenta(DdlGrupo.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, TipoCambio, TCEspecifico, UsuarioActual.CveUsuario) Then
GvDatos.DataSource = ObjVentas.DtResultados
End If
ObjVentas.Dispose()
GvDatos.DataBind()
End Sub
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Select Case e.Row.DBCampo("TipoFila")
Case "1"
e.Row.CssClass = "Totales"
Case "2"
e.Row.CssClass = "SubTotales"
Case "3"
e.Row.CssClass = "Texto"
End Select
End If
End Sub
Private Sub RblTipoCambio_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipoCambio.SelectedIndexChanged
TipoCambio = RblTipoCambio.SelectedValue.ToEntero
If RblTipoCambio.SelectedValue.ToEntero = 3 Then
Dim TipoCambio As Double
LiEspecifico.Visible = True
TipoCambio = GlobalTipoCambio(Now)
TxtEspecifico.Text = TipoCambio.ToString
Else
LiEspecifico.Visible = False
End If
UpBodyTipoCambio.Update()
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
CargaDatos()
UPDatos.Update()
End Sub
End Class