/// <summary> /// Obtiene todas las comisiones y las empaqueta en un DataTable. /// </summary> public DataTable GetAllTable() { PlanAdapter planData = new PlanAdapter(); DataTable table = new DataTable(); table.Columns.Add("ID", typeof(int)); table.Columns.Add("descComision", typeof(string)); table.Columns.Add("anio", typeof(int)); table.Columns.Add("descPlan", typeof(string)); List <Comision> comisiones = GetAll(); DataRow row; foreach (Comision comision in comisiones) { row = table.NewRow(); row["ID"] = comision.ID; row["descComision"] = comision.Descripcion; row["anio"] = comision.AñoEspecialidad; row["descPlan"] = planData.GetOne(comision.IdPlan).Descripcion; table.Rows.Add(row); } return(table); }
public DataTable GetAllTable() { PlanAdapter planData = new PlanAdapter(); DataTable table = new DataTable(); table.Columns.Add("ID", typeof(int)); table.Columns.Add("descMateria", typeof(string)); table.Columns.Add("hsSemanales", typeof(int)); table.Columns.Add("hsTotales", typeof(int)); table.Columns.Add("descPlan", typeof(string)); List <Materia> materias = GetAll(); DataRow row; foreach (Materia materia in materias) { row = table.NewRow(); row["ID"] = materia.ID; row["descMateria"] = materia.Descripcion; row["hsSemanales"] = materia.HsSemanales; row["hsTotales"] = materia.HsTotales; row["descPlan"] = planData.GetOne(materia.IdPlan).Descripcion; table.Rows.Add(row); } return(table); }
private void reporte() { if (!IsPostBack) { DateTime fecha = DateTime.Now; LocalReport localReport = ReportViewer1.LocalReport; localReport.ReportPath = "ReportePlan.rdlc"; ReportParameter[] parametros = new ReportParameter[1]; parametros[0] = new ReportParameter("Fecha", (fecha).ToString()); ReportViewer1.LocalReport.SetParameters(parametros); ReportViewer1.DataBind(); PlanAdapter pa = new PlanAdapter(); this.ReportViewer1.LocalReport.DataSources.Clear(); DataTable dt = new DataTable(); dt = pa.ReportePlan(); ReportDataSource rprtDTSource = new ReportDataSource("Dataset2", dt); this.ReportViewer1.LocalReport.DataSources.Add(rprtDTSource); this.ReportViewer1.LocalReport.Refresh(); } }
public PlanLogic() { PlanData = new PlanAdapter(); }
public PlanNegocio() { this.PlanDatos = new PlanAdapter(); }
public PlanLogic() { planDatos = new PlanAdapter(); }
public PlanesLogic() { planData = new PlanAdapter(); }
public void Save(Plan plan) { PlanAdapter pla = new PlanAdapter(); pla.Save(plan); }
public void Delete(int Id) { PlanAdapter plan = new PlanAdapter(); plan.Delete(Id); }
public Plan GetOne(int Id) { PlanAdapter plan = new PlanAdapter(); return(plan.GetOne(Id)); }
public List <Plan> GetAll() { PlanAdapter plan = new PlanAdapter(); return(plan.GetAll()); }
public PlanLogic(PlanAdapter pa) { _DataPlan = pa; }
public PlanLogic() { _DataPlan = new PlanAdapter(); }
public PlanLogic() { planAdapter = new PlanAdapter(); }
public PlanLogic(PlanAdapter planAdapter) { PlanData = planAdapter; }