This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2020-05-12 14:14:56 -07:00
parent 2ef099cf27
commit 7a18d716b2
6 changed files with 451 additions and 125 deletions

View File

@@ -1,14 +1,144 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Extensiones;
public partial class OI_RepReuniones : ClsPaginas
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
// ORDEN ASIGNADAS
ViewState["Orden"] = "";
CargaFiltros();
CargaDatosOIMinutas();
CargaDatosReunion();
}
}
private void CargaFiltros()
{
TxtFechaI.Text = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).ToShortDateString();
TxtFechaF.Text = DateTime.Now.ToShortDateString();
TxtCFechaInicio.Text = TxtFechaI.Text;
TxtCFechaFin.Text = TxtFechaF.Text;
}
public void CargaDatosReunion()
{
GVConvocatoria.DataSource = new DataTable();
using (ClsOIEventos ObjProspectos = new ClsOIEventos())
{
DateTime FechaI, FechaF;
FechaI = TxtCFechaInicio.Text.ToDate();
FechaF = TxtCFechaFin.Text.ToDate();
if (ObjProspectos.GetRepEventos(-1, 11, -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))
{ GVConvocatoria.DataSource = ObjProspectos.DtResultados.FiltraParametros("","FechaInicio DESC"); }
}
GVConvocatoria.DataBind();
UpContenido.Update();
}
public void CargaDatosOIMinutas()
{
using (ClsOIEventos ObjProspectos = new ClsOIEventos())
{
DateTime FechaI, FechaF;
int CveEventoEstatus;
FechaI = TxtFechaI.Text.ToDate();
FechaF = TxtFechaF.Text.ToDate();
if (DdlEventoEstatus.SelectedValue.ToEntero() > 0)
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))
ViewState["DTOIMinutas"] = ObjProspectos.DtResultados;
}
if (ViewState["Orden"].ToString() != string.Empty) { CargaGridOIMinutas(ViewState["Orden"].ToString()); }
else { CargaGridOIMinutas(""); }
UpContenido.Update();
}
protected void GvDatosOIMinutas_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
// 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/MinutaDetalle.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/MinutaDetalle.aspx?CveEvento={0}\">{1}</a>", e.Row.DBCampo("CveEvento"), e.Row.DBCampo("Asunto"));
}
}
//protected void LbOrden_Click(object sender, EventArgs e)
//{
// string Orden = "";
// string Campo = "";
// Literal Literal = null/* TODO Change to default(_) if this is not a reference type */;
// const string OrdenInicial = "";
// string[] Arg = new string[3];
// Arg = (LinkButton)sender.CommandArgument().ToString.Split(';');
// Campo = Arg[0];
// Literal = (Literal)(LinkButton)sender.NamingContainer.FindControl("Img" + Campo.Replace(",", "_"));
// if (ViewState(string.Format("O{0}", Campo)) != null && ViewState(string.Format("O{0}", Campo)).ToString == string.Format("{0} DESC", Campo))
// {
// 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>");
// }
// Orden = OrdenInicial + ViewState(string.Format("O{0}", Campo)).ToString;
// ViewState("Orden") = Orden;
// CargaGridOIMinutas(Orden);
//}
private void CargaGridOIMinutas(string Orden)
{
if (Orden != string.Empty)
{
DataView DV = new DataView((DataTable)ViewState["DTOIMinutas"], "", Orden, DataViewRowState.CurrentRows);
GvDatosOIMinutas.DataSource = DV.ToTable();
DV.Dispose();
}
else { GvDatosOIMinutas.DataSource = (DataTable)ViewState["DTOIMinutas"]; }
GvDatosOIMinutas.DataBind();
}
protected void BtnConsultar_Click(object sender, EventArgs e)
{
CargaDatosOIMinutas();
UpContenido.Update();
}
protected void Button1_Click(object sender, EventArgs e)
{
CargaDatosReunion();
UpContenido.Update();
}
}