示例#1
0
        /// <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);
        }
示例#2
0
        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);
        }
示例#3
0
        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();
            }
        }
示例#4
0
 public PlanLogic()
 {
     PlanData = new PlanAdapter();
 }
示例#5
0
 public PlanNegocio()
 {
     this.PlanDatos = new PlanAdapter();
 }
示例#6
0
 public PlanLogic()
 {
     planDatos = new PlanAdapter();
 }
示例#7
0
 public PlanesLogic()
 {
     planData = new PlanAdapter();
 }
示例#8
0
        public void Save(Plan plan)
        {
            PlanAdapter pla = new PlanAdapter();

            pla.Save(plan);
        }
示例#9
0
        public void Delete(int Id)
        {
            PlanAdapter plan = new PlanAdapter();

            plan.Delete(Id);
        }
示例#10
0
        public Plan GetOne(int Id)
        {
            PlanAdapter plan = new PlanAdapter();

            return(plan.GetOne(Id));
        }
示例#11
0
        public List <Plan> GetAll()
        {
            PlanAdapter plan = new PlanAdapter();

            return(plan.GetAll());
        }
示例#12
0
 public PlanLogic(PlanAdapter pa)
 {
     _DataPlan = pa;
 }
示例#13
0
 public PlanLogic()
 {
     _DataPlan = new PlanAdapter();
 }
示例#14
0
 public PlanLogic()
 {
     planAdapter = new PlanAdapter();
 }
示例#15
0
 public PlanLogic(PlanAdapter planAdapter)
 {
     PlanData = planAdapter;
 }