Reporte de Precios de Compras

This commit is contained in:
janeth arvizu
2019-10-23 11:55:47 -07:00
parent b400414c1f
commit 67e049f541
2 changed files with 45 additions and 33 deletions

View File

@@ -21,13 +21,8 @@ Partial Class RepComprasPrecios
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
'txtFechaI.Text = Now.ToShortDateString
'txtFechaF.Text = Now.ToShortDateString
'CargaSucursal()
CargaProveedor()
CargaDatos()
End If
End Sub
@@ -35,10 +30,7 @@ Partial Class RepComprasPrecios
Public Sub CargaDatos()
Dim ObjCompras As New ClsCompras
'FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), MinFecha.ToShortDateString)
'FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), MaxFecha.ToShortDateString)
If ObjCompras.GetRepReqOCCompraInv("".ToDate, "".ToDate, DdlProveedor.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then
If ObjCompras.GetRepComprasPrecios(DdlProveedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
GvDatos.DataSource = ObjCompras.DtResultados
DtCompras = ObjCompras.DtResultados
GvDatos.DataBind()
@@ -53,6 +45,31 @@ Partial Class RepComprasPrecios
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
GvDatos.HeaderRow.Cells(0).Visible = False
e.Row.Cells(0).Visible = False
e.Row.HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
If e.Row.DBCampo("CvePS") = "" Then
e.Row.CssClass = "Totales"
End If
For Each Cells As TableCell In e.Row.Cells
Dim Celda As String = Cells.Text
If IsNumeric(Celda) Then
'If Celda.ToDouble = 0 Then
' Cells.Text = ""
'Else
Dim ce = DirectCast(Cells, System.Web.UI.WebControls.DataControlFieldCell)
If Not ce.ContainingField.HeaderText = "PS" Then
Cells.Text = Cells.Text.FormatoNumero(2)
End If
'End If
End If
Next
'Cuando es titulo
'If e.Row.DBCampo("PS").ToString.Trim = "" Then
' e.Row.CssClass = "Totales"