Commit inicial Ventas Productivo
This commit is contained in:
85
Compras/PopUpFacturasPendientesAutorizar.aspx.vb
Normal file
85
Compras/PopUpFacturasPendientesAutorizar.aspx.vb
Normal file
@@ -0,0 +1,85 @@
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
|
||||
Partial Class Compras_PopUpFacturasPendientesAutorizar
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Sub Compras_PopUpFacturasPendientesAutorizar_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
CType(Me.Master, BaseMasterPage).EsPopup = True
|
||||
CType(Me.Master, BaseMasterPage).PopupWidth = 750
|
||||
|
||||
|
||||
If Not IsPostBack Then
|
||||
Dim dTime As Date = Now
|
||||
' txtFechaF.Text = dTime.ToString("dd/MM/yyyy")
|
||||
dTime = dTime.AddDays(-30)
|
||||
' txtFechaI.Text = dTime.ToString("dd/MM/yyyy")
|
||||
cargadatos()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub cargadatos()
|
||||
Dim objCompras As New ClsCompras
|
||||
|
||||
Dim dTime As Date = Now
|
||||
|
||||
Dim FechaInc As Date = dTime
|
||||
dTime = dTime.AddDays(-30)
|
||||
Dim FechaFin As Date = dTime
|
||||
objCompras.GetFacturasPendientesDeAutorizar(UsuarioActual.Empresa.CveEmpresa, FechaInc, FechaFin)
|
||||
|
||||
If objCompras.DtResultados.Rows.Count > 0 Then
|
||||
TblBusqueda.Visible = True
|
||||
Else
|
||||
TblBusqueda.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
LtlTotalRegistros.Text = objCompras.DtResultados.Rows.Count.ToString
|
||||
|
||||
GV.DataSource = objCompras.DtResultados
|
||||
GV.DataBind()
|
||||
UPDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
'Protected Sub BtnBuscar_Click(sender As Object, e As EventArgs) Handles BtnBuscar.Click
|
||||
' cargadatos()
|
||||
'End Sub
|
||||
|
||||
Protected Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GV.RowDataBound
|
||||
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then
|
||||
|
||||
Dim saldo As Double = e.Row.DBCampo("Saldo").Trim.ToDecimal
|
||||
|
||||
'ostBackUrl =""
|
||||
' e.Row.FCLinkButton("lnkSerieFolio").PostBackUrl = "" & e.Row.DBCampo("CveCompra")
|
||||
' e.Row.FCLinkButton("lnkSerieFolio").Text = e.Row.DBCampo("SerieFolio")
|
||||
|
||||
Dim Liga As String = String.Empty
|
||||
|
||||
Liga = String.Format("<a class='Texto' href='javascript:Ir(""{0}"");'>", e.Row.DBCampo("CveCompra"))
|
||||
|
||||
e.Row.FCLabel("lblSerieFolio").Text = String.Format("<div >{0}{1}</a></div>", Liga, e.Row.DBCampo("SerieFolio"))
|
||||
|
||||
|
||||
e.Row.FCLabel("LblSaldo").Font.Bold = True
|
||||
e.Row.FCLabel("LblSaldo").Text = "$" & saldo.ToString("###,###,###.00") & " " & e.Row.DBCampo("Abreviatura").ToString & " "
|
||||
|
||||
e.Row.FCLabel("lblFecha").Text = Date.Parse(e.Row.DBCampo("Fecha").ToString).ToString("dd/MM/yyyy")
|
||||
e.Row.FCLabel("lblFechav").Text = Date.Parse(e.Row.DBCampo("Fechav").ToString).ToString("dd/MM/yyyy")
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user