Commit inicial Ventas Productivo
This commit is contained in:
60
CGame/PopUpBuscarOrdenProduccion.aspx.vb
Normal file
60
CGame/PopUpBuscarOrdenProduccion.aspx.vb
Normal file
@@ -0,0 +1,60 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class CGame_PopUpBuscarOrdenProduccion
|
||||
Inherits ClsPaginas
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
CType(Me.Master, BaseMasterPage).EsPopup = True
|
||||
TxtFechaEntregaI.Text = Now.AddDays(0).ToShortDateString
|
||||
TxtFechaEntregaF.Text = Now.AddDays(0).ToShortDateString
|
||||
CargaCliente()
|
||||
CargaEstatus()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCliente()
|
||||
Dim ObjOP As New ClsCGame
|
||||
If ObjOP.GetCliente(-1, -1, UsuarioActual.CveEmpresa) Then
|
||||
DdlCliente.DataSource = ObjOP.DtResultados
|
||||
DdlCliente.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlCliente.DataBind()
|
||||
End If
|
||||
ObjOP.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaEstatus()
|
||||
Dim ObjOP As New ClsCGame
|
||||
If ObjOP.GetEstatus(UsuarioActual.CveEmpresa, Estado:=1) Then
|
||||
DdlEstatus.DataSource = ObjOP.DtResultados
|
||||
DdlEstatus.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlEstatus.DataBind()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnBuscar_Click(sender As Object, e As System.EventArgs) Handles BtnBuscar.Click
|
||||
Dim Folio As String
|
||||
If TxtFolio.Text.Trim <> "" Then Folio = TxtFolio.Text Else Folio = "-1"
|
||||
Dim ObjOP As New ClsCGame
|
||||
If ObjOP.GetOrdenProduccion(-1, UsuarioActual.CveEmpresa, DdlEstatus.SelectedValue.ToEntero, Folio, TxtFechaEntregaI.Text.ToDate, TxtFechaEntregaF.Text.ToDate, DdlCliente.SelectedValue.ToEntero) Then
|
||||
GvOP.DataSource = ObjOP.DtResultados
|
||||
GvOP.DataBind()
|
||||
LtlTotalRegistros.Text = ObjOP.DtResultados.Rows.Count.ToString
|
||||
If Not ObjOP.DtResultados.Rows.Count > 0 Then
|
||||
Alert("No se encontraron resultados con los filtros seleccionados", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
TblBusqueda.Visible = True
|
||||
End If
|
||||
End If
|
||||
ObjOP.Dispose()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub GvOP_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvOP.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.FCLabel("LblFolio").Text = String.Format("<div class='truncate' style='width:200px;'>{0}{1}</a></div>", "<a href='javascript:Ir(""" & e.Row.DBCampo("CveOrdenProduccion") & """);'>", e.Row.DBCampo("Folio"))
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user