97 lines
2.9 KiB
C#
97 lines
2.9 KiB
C#
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 Documentacion_TableroMaterialidad :ClsPaginas
|
|
{
|
|
#region "Propiedades"
|
|
|
|
public int anio
|
|
{
|
|
get { return ViewState["anio"] != null ? ViewState["anio"].ToString().ToEntero() : 0; }
|
|
set { ViewState["anio"] = value; }
|
|
}
|
|
public int mes
|
|
{
|
|
get { return ViewState["mes"] != null ? ViewState["mes"].ToString().ToEntero() : 0; }
|
|
set { ViewState["mes"] = value; }
|
|
}
|
|
#endregion
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
cargadatos();
|
|
}
|
|
}
|
|
DataTable dt;
|
|
public void cargadatos()
|
|
{
|
|
using (ClsEdocumentacion edoc = new ClsEdocumentacion())
|
|
{
|
|
if(edoc.TableroMaterialidadGET(UsuarioActual.CveEmpresa,(anio= Txtanio.Text.ToEntero()), (mes= ddlMes.SelectedValue.ToEntero())) && edoc.DSResultados.Tables.Count >1)
|
|
{
|
|
RptDatos.DataSource = edoc.DSResultados.Tables[0];
|
|
dt = edoc.DSResultados.Tables[1];
|
|
RPTTableroHeader.DataSource = edoc.DSResultados.Tables[1];
|
|
RPTTableroHeader.DataBind();
|
|
RptDatos.DataBind();
|
|
DdlDocumentacion.DataSource = dt;
|
|
DdlDocumentacion.DataBind();
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
protected void RptDatos_ItemDataBound(object sender, RepeaterItemEventArgs e)
|
|
{
|
|
DataRowView item = (DataRowView)(e.Item.DataItem);
|
|
Repeater rpt =((Repeater)e.Item.FindControl("rptdocumentacion"));
|
|
rpt.DataSource = dt;
|
|
rpt.DataBind();
|
|
}
|
|
|
|
|
|
|
|
protected void BtnAddClienteDocumento_Click(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
protected void BtnEnviarDoctos_Click(object sender, EventArgs e)
|
|
{
|
|
Alert("El correo se ha enviado.");
|
|
}
|
|
|
|
protected void BtnConsultar_Click(object sender, EventArgs e)
|
|
{
|
|
cargadatos();
|
|
}
|
|
|
|
protected void BtnAddClienteDocumentoxmlpd_Click(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
protected void LckOpModalDoctos_Click(object sender, EventArgs e)
|
|
{
|
|
DateTime fecha = string.Format("{0}-{1}-01", anio, mes).ToDateTime();
|
|
LtlPeriodo.Text = fecha.ToString("MMMM yyyy", System.Globalization.CultureInfo.CreateSpecificCulture("es-MX"));//string.Format("");
|
|
UpModalDoctos.Update();
|
|
RegistraScript("$('#ModalDoctos').modal();");
|
|
}
|
|
|
|
protected void LckOpModalDoctosPDFXML_Click(object sender, EventArgs e)
|
|
{
|
|
DateTime fecha = string.Format("{0}-{1}-01", anio, mes).ToDateTime();
|
|
LtlPeriodoXMLPDF.Text = fecha.ToString("MMMM yyyy", System.Globalization.CultureInfo.CreateSpecificCulture("es-MX"));
|
|
RegistraScript("$('#ModalDoctos').modal();");
|
|
Upxmlpdf.Update();
|
|
}
|
|
} |