Commit inicial Ventas Productivo
This commit is contained in:
103
OI/RepMinutas.aspx.vb
Normal file
103
OI/RepMinutas.aspx.vb
Normal file
@@ -0,0 +1,103 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class OI_RepMinutas
|
||||
Inherits ClsPaginas
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
'ORDEN ASIGNADAS
|
||||
ViewState("Orden") = ""
|
||||
|
||||
CargaFiltros()
|
||||
CargaDatosOIMinutas()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaFiltros()
|
||||
txtFechaI.Text = New Date(Now.Year, Now.Month, 1).ToShortDateString
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
End Sub
|
||||
Public Sub CargaDatosOIMinutas()
|
||||
Dim ObjProspectos As New ClsOIEventos
|
||||
|
||||
Dim FechaI, FechaF As DateTime
|
||||
Dim CveEventoEstatus As Integer
|
||||
FechaI = txtFechaI.Text.ToDate
|
||||
FechaF = txtFechaF.Text.ToDate
|
||||
If DdlEventoEstatus.SelectedValue > "0" Then CveEventoEstatus = DdlEventoEstatus.SelectedValue.ToEntero Else CveEventoEstatus = -1
|
||||
|
||||
If ObjProspectos.GetRepEventos(-1, 5, -1, "-1", "-1", -1, -1, -1, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FechaI, FechaF) Then
|
||||
ViewState("DTOIMinutas") = ObjProspectos.DtResultados
|
||||
End If
|
||||
|
||||
ObjProspectos.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGridOIMinutas(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGridOIMinutas("")
|
||||
End If
|
||||
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatosOIMinutas_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatosOIMinutas.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
'e.Row.Cells(0).Width = Unit.Pixel(100) 'FechaInicio
|
||||
'e.Row.Cells(1).Width = Unit.Pixel(200) 'Asunto
|
||||
'e.Row.Cells(2).Width = Unit.Pixel(550) 'Descripcion
|
||||
'e.Row.Cells(3).Width = Unit.Pixel(70) 'TareasTotal
|
||||
|
||||
e.Row.FCLiteral("LtlFechaInicio").Text = String.Format("<a class=""Texto"" href=""/OI/Minutas.aspx?CveEvento={0}"">{1}</a>", e.Row.DBCampo("CveEvento"), e.Row.DBCampo("FechaInicio").ToDateTime.ToString("dd/MM/yyyy"))
|
||||
e.Row.FCLiteral("LtlAsunto").Text = String.Format("<a class=""Texto"" href=""/OI/Minutas.aspx?CveEvento={0}"">{1}</a>", e.Row.DBCampo("CveEvento"), e.Row.DBCampo("Asunto"))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} ASC", Campo)
|
||||
Literal.Text = String.Format("<i class='fa fa-sort-asc' style='color:#999' ></i>")
|
||||
Else
|
||||
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} DESC", Campo)
|
||||
Literal.Text = String.Format("<i class='fa fa-sort-desc' style='color:#999' ></i>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
CargaGridOIMinutas(Orden)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGridOIMinutas(Orden As String)
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DTOIMinutas"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
GvDatosOIMinutas.DataSource = DV.ToTable()
|
||||
DV.Dispose()
|
||||
Else
|
||||
GvDatosOIMinutas.DataSource = CType(ViewState("DTOIMinutas"), DataTable)
|
||||
End If
|
||||
GvDatosOIMinutas.DataBind()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatosOIMinutas()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user