Commit inicial Ventas Productivo
This commit is contained in:
56
OC/RepOCSinFactura.aspx.vb
Normal file
56
OC/RepOCSinFactura.aspx.vb
Normal file
@@ -0,0 +1,56 @@
|
||||
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 = GlobalDTSucursales.FiltraParametros("CveEmpresa = " & 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
|
||||
Reference in New Issue
Block a user