Files
SIG/OC/RepOCSinFactura.aspx.vb
2020-07-09 17:08:13 -07:00

57 lines
1.9 KiB
VB.net

Option Explicit On
Option Strict On
Imports System.Data
Imports System.Linq
Imports Extensiones
Partial Class OC_RepOCSinFactura
Inherits ClsPaginas
Private Sub OC_RepOCSinFactura_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then
CargaCombos()
End If
End Sub
Private Sub CargaCombos()
'CargaSucursales
DdlSucursal.DataSource = GlobalDTSubProyectos(UsuarioActual.CveEmpresa)
DdlSucursal.DataBind()
'Vendedor
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
DdlVendedor.DataBind()
End Sub
Private Sub CargaDatos()
Dim ObjOC As New ClsOC
If ObjOC.GetOCSinFactura(DdlSucursal.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
GvDatos.DataSource = ObjOC.DtResultados()
Else
GvDatos.DataSource = Nothing
End If
ObjOC.Dispose()
GvDatos.DataBind()
UpDatos.Update()
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
CargaDatos()
End Sub
Private Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim LigaFolio As String = String.Format("/OC/OC.aspx?OC={0}", e.Row.DBCampo("CveOrdenCompra"))
Dim LigaSerie As String = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DBCampo("CveCotizacion"))
e.Row.FCLiteral("LtOCFolio").Text = String.Format("<a class='Texto' href='{0}' target='_blank'>{1}</a>", LigaFolio, e.Row.DBCampo("OCFolio"))
e.Row.FCLiteral("LtSerieFolio").Text = String.Format("<a class='Texto' href='{0}' target='_blank'>{1}</a>", LigaSerie, e.Row.DBCampo("CotSerieFolio"))
End If
End Sub
End Class