Reporte de Precios de Compras
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user