예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                SchoolMN    = new ModeloNegocio.School();
                SchoolMN.id = Convert.ToInt32(Request.Params["school_id"]);
                SchoolLN    = new LogicaNegocio.School();
                SchoolLN.getSchool(ref SchoolMN);
                txtCodigo.Text        = SchoolMN.Codigo;
                txtNombreEscuela.Text = SchoolMN.Nombre;
                txtTelefono.Text      = SchoolMN.Telefono;
                txtDireccion.Text     = SchoolMN.Direccion;

                ObjDistritoLN              = new LogicaNegocio.Distrito();
                DtDistritos                = ObjDistritoLN.getAllDistritos(1);
                DdlDistrito.DataSource     = DtDistritos;
                DdlDistrito.DataValueField = "id";
                DdlDistrito.DataTextField  = "nombre";
                DdlDistrito.DataBind();
                ListItem item = DdlDistrito.Items.FindByValue(Convert.ToString(SchoolMN.Distrito_id));
                if (item != null)
                {
                    item.Selected = true;
                }

                referencia.Text = SchoolMN.Referencia;

                ObjUgelLN              = new LogicaNegocio.Ugel();
                DtUgel                 = ObjUgelLN.getAllUgels();
                DdlUgel.DataSource     = DtUgel;
                DdlUgel.DataValueField = "id";
                DdlUgel.DataTextField  = "nombre";
                DdlUgel.DataBind();
                ListItem item1 = DdlUgel.Items.FindByValue(Convert.ToString(SchoolMN.Ugel_id));
                if (item1 != null)
                {
                    item1.Selected = true;
                }

                //director.Text = SchoolMN.Director;
                //SubDirector.Text = SchoolMN.Subdirector;
                NumDocHGE.Text = Convert.ToString(SchoolMN.Num_Doc_hge);
                // NumDocIni.Text = Convert.ToString(SchoolMN.Num_doc_inicial);
                //  NumDocPrim.Text = Convert.ToString(SchoolMN.Num_doc_primaria);
                NumDocSec.Text = Convert.ToString(SchoolMN.Num_doc_secundaria);
                // NumAlumIni.Text = Convert.ToString(SchoolMN.Num_alum_ini);
                //  NumAlumPrim.Text = Convert.ToString(SchoolMN.Num_alum_prim);
                NumAlumSec.Text = Convert.ToString(SchoolMN.Num_alum_sec);
                //  NumAulas.Text = Convert.ToString(SchoolMN.Num_aulas);
                //   NumSeccPrim.Text = Convert.ToString(SchoolMN.Num_secc_prim);
                NumSeccSec.Text = Convert.ToString(SchoolMN.Num_secc_sec);
                latitud.Text    = SchoolMN.Latitud;
                longitud.Text   = SchoolMN.Longitud;
            }
        }
예제 #2
0
        public bool updateSchool(ModeloNegocio.School ObjSchool)
        {
            AccesoDatos.School school;


            school = new AccesoDatos.School();
            school.updateSchool(ObjSchool);


            return(true);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            DataTable NumVisitasForAsesor, NumVisitasForSchool;
            double    NumVisitas, NumVisitAse, PorcAse;
            int       school_id;
            string    nameSchool;

            LogicaNegocio.VisitaIE visitas = new LogicaNegocio.VisitaIE();
            NumVisitas          = visitas.countRowsVisitas();
            lblNumVisitas.Text  = Convert.ToString(NumVisitas);
            NumVisitasForAsesor = visitas.getCountVisitsForAgent();
            lblQAsesor.Text     = Convert.ToString(NumVisitasForAsesor.Rows.Count);
            foreach (DataRow fila in NumVisitasForAsesor.Rows)
            {
                ModeloNegocio.Asesor asesorMN = new ModeloNegocio.Asesor();
                LogicaNegocio.Asesor asesorLN = new LogicaNegocio.Asesor();

                asesorMN    = asesorLN.getAsesorId(Convert.ToInt32(fila["asesor_id"]));
                NumVisitAse = Convert.ToInt32(fila["Cantidad"]);
                PorcAse     = (NumVisitAse / NumVisitas) * 100;
                lblNumVisitsForAsesor.Text += "<tr>";
                lblNumVisitsForAsesor.Text += "<td>" + asesorMN.FullName + "</td>";
                lblNumVisitsForAsesor.Text += "<td>" + fila["Cantidad"].ToString() + "</td>";
                lblNumVisitsForAsesor.Text += "<td>" + String.Format("{0:0.00}", PorcAse) + "</td>";
                lblNumVisitsForAsesor.Text += "</tr>";
            }

            NumVisitasForSchool  = visitas.getCountVisitsForSchool();
            lblQSchoolVisit.Text = Convert.ToString(NumVisitasForSchool.Rows.Count);
            foreach (DataRow fila1 in NumVisitasForSchool.Rows)
            {
                ModeloNegocio.School schoolMN = new ModeloNegocio.School();
                LogicaNegocio.School schoolLN = new LogicaNegocio.School();

                school_id = Convert.ToInt32(fila1["school_id"]);
                if (school_id == 0)
                {
                    nameSchool = "Indeterminado";
                }
                else
                {
                    schoolMN   = schoolLN.getSchool(school_id);
                    nameSchool = schoolMN.Nombre;
                }

                NumVisitAse = Convert.ToInt32(fila1["Cantidad"]);
                PorcAse     = (NumVisitAse / NumVisitas) * 100;
                lblNumVisitForSchool.Text += "<tr>";
                lblNumVisitForSchool.Text += "<td>" + nameSchool + "</td>";
                lblNumVisitForSchool.Text += "<td>" + fila1["Cantidad"].ToString() + "</td>";
                lblNumVisitForSchool.Text += "<td>" + String.Format("{0:0.00}", PorcAse) + "</td>";
                lblNumVisitForSchool.Text += "</tr>";
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            DataTable NumVisitasForAsesor, NumVisitasForSchool;
            double NumVisitas, NumVisitAse, PorcAse;
            int school_id;
            string nameSchool;
            LogicaNegocio.VisitaIE visitas = new LogicaNegocio.VisitaIE();
            NumVisitas = visitas.countRowsVisitas();
            lblNumVisitas.Text = Convert.ToString(NumVisitas);
            NumVisitasForAsesor = visitas.getCountVisitsForAgent();
            lblQAsesor.Text = Convert.ToString(NumVisitasForAsesor.Rows.Count);
            foreach (DataRow fila in NumVisitasForAsesor.Rows)
            {
                ModeloNegocio.Asesor asesorMN = new ModeloNegocio.Asesor();
                LogicaNegocio.Asesor asesorLN = new LogicaNegocio.Asesor();

                asesorMN = asesorLN.getAsesorId(Convert.ToInt32(fila["asesor_id"]));
                NumVisitAse = Convert.ToInt32(fila["Cantidad"]);
                PorcAse = (NumVisitAse / NumVisitas) * 100;
                lblNumVisitsForAsesor.Text += "<tr>";
                lblNumVisitsForAsesor.Text += "<td>" + asesorMN.FullName + "</td>";
                lblNumVisitsForAsesor.Text += "<td>" + fila["Cantidad"].ToString() + "</td>";
                lblNumVisitsForAsesor.Text += "<td>" + String.Format("{0:0.00}", PorcAse) + "</td>";
                lblNumVisitsForAsesor.Text += "</tr>";
            }

            NumVisitasForSchool = visitas.getCountVisitsForSchool();
            lblQSchoolVisit.Text = Convert.ToString(NumVisitasForSchool.Rows.Count);
            foreach (DataRow fila1 in NumVisitasForSchool.Rows)
            {
                ModeloNegocio.School schoolMN = new ModeloNegocio.School();
                LogicaNegocio.School schoolLN = new LogicaNegocio.School();

                school_id = Convert.ToInt32(fila1["school_id"]);
                if (school_id == 0)
                {
                    nameSchool = "Indeterminado";
                }
                else
                {
                    schoolMN = schoolLN.getSchool(school_id);
                    nameSchool = schoolMN.Nombre;
                }

                NumVisitAse = Convert.ToInt32(fila1["Cantidad"]);
                PorcAse = (NumVisitAse / NumVisitas) * 100;
                lblNumVisitForSchool.Text += "<tr>";
                lblNumVisitForSchool.Text += "<td>" + nameSchool + "</td>";
                lblNumVisitForSchool.Text += "<td>" + fila1["Cantidad"].ToString() + "</td>";
                lblNumVisitForSchool.Text += "<td>" + String.Format("{0:0.00}", PorcAse) + "</td>";
                lblNumVisitForSchool.Text += "</tr>";
            }
        }
예제 #5
0
 public List<ModeloNegocio.School> getAllSchoolForUser(int iduser)
 {
     //LogicaNegocioa.UsuarioLN objListaUsuario = new LogicaNegocio.UsuarioLN();
     List<ModeloNegocio.School> lista = new List<ModeloNegocio.School>();
     AccesoDatos.UserSchool userSchool = new AccesoDatos.UserSchool();
     Schools = userSchool.getAllSchoolForIdUser(iduser);
     foreach (DataRow fila in Schools.Rows)
     {
         ModeloNegocio.School school = new ModeloNegocio.School();
         school.id = int.Parse(fila["school_id"].ToString());
         school.Nombre = fila["nombre"].ToString();
         lista.Add(school);
     }
     return lista;
 }
예제 #6
0
        public List <ModeloNegocio.School> getAllSchoolForUser(int iduser)
        {
            //LogicaNegocioa.UsuarioLN objListaUsuario = new LogicaNegocio.UsuarioLN();
            List <ModeloNegocio.School> lista = new List <ModeloNegocio.School>();

            AccesoDatos.UserSchool userSchool = new AccesoDatos.UserSchool();
            Schools = userSchool.getAllSchoolForIdUser(iduser);
            foreach (DataRow fila in Schools.Rows)
            {
                ModeloNegocio.School school = new ModeloNegocio.School();
                school.id     = int.Parse(fila["school_id"].ToString());
                school.Nombre = fila["nombre"].ToString();
                lista.Add(school);
            }
            return(lista);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                visitaMN    = new ModeloNegocio.VisitaIE();
                visitaLN    = new LogicaNegocio.VisitaIE();
                visitaMN.Id = Convert.ToInt32(Request.Params["visita_id"]);
                visitaMN    = visitaLN.getVisitaId(visitaMN.Id);



                txtFecha.Text = visitaMN.Fecha.ToString("yyyy-MM-dd");

                asesorLN       = new LogicaNegocio.Asesor();
                asesorMN       = new ModeloNegocio.Asesor();
                asesorMN       = asesorLN.getAsesorId(visitaMN.Asesor_id);
                txtAsesor.Text = asesorMN.FullName;


                directorLN       = new LogicaNegocio.Director();
                directorMN       = new ModeloNegocio.Director();
                directorMN       = directorLN.getDirectorId(visitaMN.Director_id);
                txtDirector.Text = directorMN.FullName;


                docenteLN       = new LogicaNegocio.Docente();
                docenteMN       = new ModeloNegocio.Docente();
                docenteMN       = docenteLN.getDocenteId(visitaMN.Docente_id);
                txtDocente.Text = docenteMN.FullName;


                schoolLN = new LogicaNegocio.School();
                schoolMN = new ModeloNegocio.School();

                //schoolMN = schoolLN.getDocenteId(visitaMN.Docente_id);
                schoolMN = schoolLN.getSchool(visitaMN.School_id);

                txtSchool.Text       = schoolMN.Nombre.ToString();
                txtMotivoVisita.Text = visitaMN.MotivoVisita;

                txtObservacion.Text = visitaMN.Observacion;
                TxtPendientes.Text  = visitaMN.Pendientes;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {

                visitaMN = new ModeloNegocio.VisitaIE();
                visitaLN = new LogicaNegocio.VisitaIE();
                visitaMN.Id = Convert.ToInt32(Request.Params["visita_id"]);
                visitaMN = visitaLN.getVisitaId(visitaMN.Id);

                txtFecha.Text = visitaMN.Fecha.ToString("yyyy-MM-dd");

                asesorLN = new LogicaNegocio.Asesor();
                asesorMN = new ModeloNegocio.Asesor();
                asesorMN = asesorLN.getAsesorId(visitaMN.Asesor_id);
                txtAsesor.Text = asesorMN.FullName;

                directorLN = new LogicaNegocio.Director();
                directorMN = new ModeloNegocio.Director();
                directorMN=directorLN.getDirectorId(visitaMN.Director_id);
                txtDirector.Text = directorMN.FullName;

                docenteLN = new LogicaNegocio.Docente();
                docenteMN = new ModeloNegocio.Docente();
                docenteMN = docenteLN.getDocenteId(visitaMN.Docente_id);
                txtDocente.Text = docenteMN.FullName;

                schoolLN = new LogicaNegocio.School();
                schoolMN = new ModeloNegocio.School();

                //schoolMN = schoolLN.getDocenteId(visitaMN.Docente_id);
                schoolMN = schoolLN.getSchool(visitaMN.School_id);

                txtSchool.Text = schoolMN.Nombre.ToString();
                txtMotivoVisita.Text = visitaMN.MotivoVisita;

                txtObservacion.Text = visitaMN.Observacion;
                TxtPendientes.Text = visitaMN.Pendientes;

            }
        }
        protected void CmdGuardar_Click(object sender, EventArgs e)
        {
            SchoolMN = new ModeloNegocio.School();
            SchoolLN = new LogicaNegocio.School();

            SchoolMN.id = Convert.ToInt32(Request.Params["school_id"]);
            SchoolMN.Codigo =txtCodigo.Text;
            SchoolMN.Nombre = txtNombreEscuela.Text;
            SchoolMN.Telefono = txtTelefono.Text;
            SchoolMN.Direccion = txtDireccion.Text;
            SchoolMN.Distrito_id = Convert.ToInt32(DdlDistrito.Text);
            SchoolMN.Ugel_id = Convert.ToInt32(DdlUgel.Text);
            SchoolMN.Referencia = referencia.Text;
            SchoolMN.Latitud = latitud.Text;
            SchoolMN.Longitud = longitud.Text;
            SchoolMN.Director = "";
            SchoolMN.Subdirector = "";
            if (NumDocHGE.Text == "")
            {
                SchoolMN.Num_Doc_hge = 0;
            }
            else
            {
                SchoolMN.Num_Doc_hge = Convert.ToInt32(NumDocHGE.Text);
            }

                SchoolMN.Num_doc_inicial = 0;

                SchoolMN.Num_doc_primaria = 0;

            if (NumDocSec.Text == "")
            {
                SchoolMN.Num_doc_secundaria = 0;
            }
            else
            {
                SchoolMN.Num_doc_secundaria = Convert.ToInt32(NumDocSec.Text);
            }

                SchoolMN.Num_alum_ini = 0;

                SchoolMN.Num_alum_prim = 0;

            if (NumAlumSec.Text == "")
            {
                SchoolMN.Num_alum_sec = 0;
            }
            else
            {
                SchoolMN.Num_alum_sec = Convert.ToInt32(NumAlumSec.Text);
            }

                SchoolMN.Num_aulas = 0;

                SchoolMN.Num_secc_prim = 0;

            if (NumSeccSec.Text == "")
            {
                SchoolMN.Num_secc_sec = 0;
            }
            else
            {
                SchoolMN.Num_secc_sec = Convert.ToInt32(NumSeccSec.Text);
            }

            SchoolLN.updateSchool(SchoolMN);
            string strRedirect;
            strRedirect = "Admin-ListEscuela.aspx?id=3";
            Response.Redirect(strRedirect, true);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                SchoolMN = new ModeloNegocio.School();
                SchoolMN.id = Convert.ToInt32(Request.Params["school_id"]);
                SchoolLN = new LogicaNegocio.School();
                SchoolLN.getSchool(ref SchoolMN);
                txtCodigo.Text = SchoolMN.Codigo;
                txtNombreEscuela.Text = SchoolMN.Nombre;
                txtTelefono.Text = SchoolMN.Telefono;
                txtDireccion.Text = SchoolMN.Direccion;

                ObjDistritoLN = new LogicaNegocio.Distrito();
                DtDistritos = ObjDistritoLN.getAllDistritos(1);
                DdlDistrito.DataSource = DtDistritos;
                DdlDistrito.DataValueField = "id";
                DdlDistrito.DataTextField = "nombre";
                DdlDistrito.DataBind();
                ListItem item = DdlDistrito.Items.FindByValue(Convert.ToString(SchoolMN.Distrito_id));
                if (item != null)
                {
                    item.Selected = true;
                }

                referencia.Text = SchoolMN.Referencia;

                ObjUgelLN = new LogicaNegocio.Ugel();
                DtUgel = ObjUgelLN.getAllUgels();
                DdlUgel.DataSource = DtUgel;
                DdlUgel.DataValueField = "id";
                DdlUgel.DataTextField = "nombre";
                DdlUgel.DataBind();
                ListItem item1 = DdlUgel.Items.FindByValue(Convert.ToString(SchoolMN.Ugel_id));
                if (item1 != null)
                {
                    item1.Selected = true;
                }

                //director.Text = SchoolMN.Director;
                //SubDirector.Text = SchoolMN.Subdirector;
                NumDocHGE.Text = Convert.ToString(SchoolMN.Num_Doc_hge);
               // NumDocIni.Text = Convert.ToString(SchoolMN.Num_doc_inicial);
              //  NumDocPrim.Text = Convert.ToString(SchoolMN.Num_doc_primaria);
                NumDocSec.Text = Convert.ToString(SchoolMN.Num_doc_secundaria);
               // NumAlumIni.Text = Convert.ToString(SchoolMN.Num_alum_ini);
              //  NumAlumPrim.Text = Convert.ToString(SchoolMN.Num_alum_prim);
                NumAlumSec.Text = Convert.ToString(SchoolMN.Num_alum_sec);
              //  NumAulas.Text = Convert.ToString(SchoolMN.Num_aulas);
             //   NumSeccPrim.Text = Convert.ToString(SchoolMN.Num_secc_prim);
                NumSeccSec.Text = Convert.ToString(SchoolMN.Num_secc_sec);
                latitud.Text = SchoolMN.Latitud;
                longitud.Text = SchoolMN.Longitud;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {

                microredMN = new ModeloNegocio.Microred();
                microredLN = new LogicaNegocio.Microred();

                int microred_id = Convert.ToInt32(Request.Params["microred_id"]);
                microredMN = microredLN.getMicroredId(microred_id);

                txtFecha.Text = microredMN.Fecha.ToString("yyyy-MM-dd");

                asesorLN = new LogicaNegocio.Asesor();
                asesorMN = new ModeloNegocio.Asesor();
                asesorMN = asesorLN.getAsesorId(microredMN.User_id);
                txtAsesor.Text = asesorMN.FullName;

                microredDocenteMN = new ModeloNegocio.MicroredDocente();
                microredDocenteLN = new LogicaNegocio.MicroredDocente();
                List<ModeloNegocio.MicroredDocente> listaMicroredDocente =new  List<ModeloNegocio.MicroredDocente>();

                listaMicroredDocente = microredDocenteLN.getAllMicroredDocenteForIdMicrored(microred_id);
                foreach (ModeloNegocio.MicroredDocente microredDocente in listaMicroredDocente)
                {

                    docenteLN = new LogicaNegocio.Docente();
                    docenteMN = new ModeloNegocio.Docente();
                    docenteMN = docenteLN.getDocenteId(microredDocente.Docente_id);

                    ddlDocente.Items.Add(new ListItem(docenteMN.FullName,docenteMN.id.ToString() ));

                }

                microredSchoolMN = new ModeloNegocio.MicroredSchool();
                microredSchoolLN = new LogicaNegocio.MicroredSchool();
                List<ModeloNegocio.MicroredSchool> listaMicroredSchool = new List<ModeloNegocio.MicroredSchool>();

                listaMicroredSchool = microredSchoolLN.getAllMicroredSchoolForIdMicrored(microred_id);
                foreach (ModeloNegocio.MicroredSchool microredSchool in listaMicroredSchool)
                {

                    schoolLN = new LogicaNegocio.School();
                    schoolMN = new ModeloNegocio.School();
                    schoolMN = schoolLN.getSchool(microredSchool.School_id);

                    ddlSchool.Items.Add(new ListItem(schoolMN.Nombre, schoolMN.id.ToString()));

                }

                txtMircrored.Text = microredMN.MicroredName;
                txtSesion.Text = microredMN.Lugar_sesion;
                txtInicio.Text = microredMN.H_inicio.ToString("hh:mm:ss");
                txtTermino.Text = microredMN.H_termino.ToString("hh:mm:ss");
                txtParticipante.Text = Convert.ToString(microredMN.Num_participantes);
                txtEducacion.Text = microredMN.Educ_financiera;
                txtEnfoque.Text = microredMN.Enfoques_edu;
                txtProgramacion.Text = microredMN.Programacion_ped;
                txtHabilidades.Text = microredMN.Habilidad_ped;
                txtTrabajo.Text = microredMN.Trabajo_grupal;
                txtParticipativo.Text = microredMN.Participativo;
                txtExpositivo.Text = microredMN.Expositivo;
                txtDinamicas.Text = microredMN.Dinamicas_ludicas;
                txtRecursos.Text = microredMN.Recursos_informaticos;
                txtAudiovisuales.Text = microredMN.Recursos_audiovisuales;
                txtMateriales.Text = microredMN.Materiales_didaticos;
                txtObservacion.Text = microredMN.Observacion;

            }
        }
예제 #12
0
 public void getSchool(ref ModeloNegocio.School ObjSchool)
 {
     AccesoDatos.School school = new AccesoDatos.School();
     school.getSchool(ref ObjSchool);
 }
예제 #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                aconpanaClaseMN = new ModeloNegocio.AconpanaClase();
                aconpanaClaseLN = new LogicaNegocio.AconpanaClase();
                int aconpana_id = Convert.ToInt32(Request.Params["aconpana_id"]);

                aconpanaClaseMN = aconpanaClaseLN.getAconpanaClaseId(aconpana_id);

                txtFecha.Text = aconpanaClaseMN.Fecha.ToString("yyyy-MM-dd");

                asesorLN       = new LogicaNegocio.Asesor();
                asesorMN       = new ModeloNegocio.Asesor();
                asesorMN       = asesorLN.getAsesorId(aconpanaClaseMN.Asesor_id);
                txtAsesor.Text = asesorMN.FullName;


                docenteLN       = new LogicaNegocio.Docente();
                docenteMN       = new ModeloNegocio.Docente();
                docenteMN       = docenteLN.getDocenteId(aconpanaClaseMN.Docente_id);
                txtDocente.Text = docenteMN.FullName;


                schoolLN = new LogicaNegocio.School();
                schoolMN = new ModeloNegocio.School();

                //schoolMN = schoolLN.getDocenteId(visitaMN.Docente_id);
                schoolMN = schoolLN.getSchool(aconpanaClaseMN.School_id);

                txtSchool.Text = schoolMN.Nombre.ToString();


                teacherGradeLN = new LogicaNegocio.TeacherGrade();
                teacherGradeMN = new ModeloNegocio.TeacherGrade();

                teacherGradeMN = teacherGradeLN.getTeacherGradeId(Convert.ToInt32(aconpanaClaseMN.Id_Grado_seccion));
                if (teacherGradeMN.Grade == null)
                {
                    teacherGradeMN.Grade = "";
                }
                if (teacherGradeMN.Seccion == null)
                {
                    teacherGradeMN.Seccion = "";
                }


                txtGradoSeccion.Text = "Grado: " + teacherGradeMN.Grade.ToString() + " Seccion: " + teacherGradeMN.Seccion.ToString();



                temaLN = new LogicaNegocio.Tema();
                temaMN = new ModeloNegocio.Tema();

                temaMN = temaLN.getTemaId(Convert.ToInt32(aconpanaClaseMN.Id_Tema_Nombre_sesion));

                txtNombSesion.Text = temaMN.Name;



                sesionLN = new LogicaNegocio.Sesion();
                sesionMN = new ModeloNegocio.Sesion();

                sesionMN = sesionLN.getSesionId(Convert.ToInt32(aconpanaClaseMN.Id_sesion));

                txtNumSesion.Text = sesionMN.NumSesion;


                txtEstidianteAsistentes.Text = aconpanaClaseMN.Num_estudiante.ToString();

                if (aconpanaClaseMN.Sesion_planificado == 0)
                {
                    txtSesionPlanificado.Text = "No";
                    txtMotivo.Text            = aconpanaClaseMN.Motivo;
                }
                else if (aconpanaClaseMN.Sesion_planificado == 1)
                {
                    txtSesionPlanificado.Text = "Si";
                }

                if (aconpanaClaseMN.Desarrollo_innovacion == 0)
                {
                    txtInnovacion.Text = "No";
                }
                else if (aconpanaClaseMN.Desarrollo_innovacion == 1)
                {
                    txtInnovacion.Text = "Si";
                }



                txtRecursosInformáticos.Text = aconpanaClaseMN.Recursos_informaticos;

                txtRecursosAudiovisuales.Text = aconpanaClaseMN.Recursos_audiovisuales;

                txtMaterialesDidactico.Text = aconpanaClaseMN.Materiales_didacticos;

                txtDinamicasUsadas.Text = aconpanaClaseMN.Dinamicas_utilizadas;

                TxtOtros.Text = aconpanaClaseMN.Otros;

                if (aconpanaClaseMN.Asesor_intervino == 0)
                {
                    txtIntervino.Text = "No";
                }
                else if (aconpanaClaseMN.Desarrollo_innovacion == 1)
                {
                    txtIntervino.Text = "Si";
                }

                txtComoIntervinoSesion.Text = aconpanaClaseMN.Como_intervino;

                if (aconpanaClaseMN.Intervencion_colaboradores == 0)
                {
                    txtOtrosColaboradores.Text = "No";
                }
                else if (aconpanaClaseMN.Intervencion_colaboradores == 1)
                {
                    txtOtrosColaboradores.Text = "Si";
                }

                txtQuien.Text = aconpanaClaseMN.Colaborador;

                txtComoIntervino.Text = aconpanaClaseMN.Como_intervino;


                if (aconpanaClaseMN.Participa_juego == 0)
                {
                    txtParticipaJuego.Text = "No";
                }
                else if (aconpanaClaseMN.Participa_juego == 1)
                {
                    txtParticipaJuego.Text = "Si";
                }


                txtEtapa.Text      = aconpanaClaseMN.Etapa;
                txtRazon.Text      = aconpanaClaseMN.Razon;
                txtIncidencia.Text = aconpanaClaseMN.Incidencia;

                //txtMotivoVisita.Text = visitaMN.MotivoVisita;

                //txtObservacion.Text = visitaMN.Observacion;
                //TxtPendientes.Text = visitaMN.Pendientes;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                microredMN = new ModeloNegocio.Microred();
                microredLN = new LogicaNegocio.Microred();

                int microred_id = Convert.ToInt32(Request.Params["microred_id"]);
                microredMN = microredLN.getMicroredId(microred_id);



                txtFecha.Text = microredMN.Fecha.ToString("yyyy-MM-dd");

                asesorLN       = new LogicaNegocio.Asesor();
                asesorMN       = new ModeloNegocio.Asesor();
                asesorMN       = asesorLN.getAsesorId(microredMN.User_id);
                txtAsesor.Text = asesorMN.FullName;


                microredDocenteMN = new ModeloNegocio.MicroredDocente();
                microredDocenteLN = new LogicaNegocio.MicroredDocente();
                List <ModeloNegocio.MicroredDocente> listaMicroredDocente = new  List <ModeloNegocio.MicroredDocente>();

                listaMicroredDocente = microredDocenteLN.getAllMicroredDocenteForIdMicrored(microred_id);
                foreach (ModeloNegocio.MicroredDocente microredDocente in listaMicroredDocente)
                {
                    docenteLN = new LogicaNegocio.Docente();
                    docenteMN = new ModeloNegocio.Docente();
                    docenteMN = docenteLN.getDocenteId(microredDocente.Docente_id);

                    ddlDocente.Items.Add(new ListItem(docenteMN.FullName, docenteMN.id.ToString()));
                }



                microredSchoolMN = new ModeloNegocio.MicroredSchool();
                microredSchoolLN = new LogicaNegocio.MicroredSchool();
                List <ModeloNegocio.MicroredSchool> listaMicroredSchool = new List <ModeloNegocio.MicroredSchool>();

                listaMicroredSchool = microredSchoolLN.getAllMicroredSchoolForIdMicrored(microred_id);
                foreach (ModeloNegocio.MicroredSchool microredSchool in listaMicroredSchool)
                {
                    schoolLN = new LogicaNegocio.School();
                    schoolMN = new ModeloNegocio.School();
                    schoolMN = schoolLN.getSchool(microredSchool.School_id);

                    ddlSchool.Items.Add(new ListItem(schoolMN.Nombre, schoolMN.id.ToString()));
                }

                txtMircrored.Text     = microredMN.MicroredName;
                txtSesion.Text        = microredMN.Lugar_sesion;
                txtInicio.Text        = microredMN.H_inicio.ToString("hh:mm:ss");
                txtTermino.Text       = microredMN.H_termino.ToString("hh:mm:ss");
                txtParticipante.Text  = Convert.ToString(microredMN.Num_participantes);
                txtEducacion.Text     = microredMN.Educ_financiera;
                txtEnfoque.Text       = microredMN.Enfoques_edu;
                txtProgramacion.Text  = microredMN.Programacion_ped;
                txtHabilidades.Text   = microredMN.Habilidad_ped;
                txtTrabajo.Text       = microredMN.Trabajo_grupal;
                txtParticipativo.Text = microredMN.Participativo;
                txtExpositivo.Text    = microredMN.Expositivo;
                txtDinamicas.Text     = microredMN.Dinamicas_ludicas;
                txtRecursos.Text      = microredMN.Recursos_informaticos;
                txtAudiovisuales.Text = microredMN.Recursos_audiovisuales;
                txtMateriales.Text    = microredMN.Materiales_didaticos;
                txtObservacion.Text   = microredMN.Observacion;
            }
        }
예제 #15
0
        protected void CmdGuardar_Click(object sender, EventArgs e)
        {
            SchoolMN = new ModeloNegocio.School();
            SchoolLN = new LogicaNegocio.School();

            SchoolMN.id          = Convert.ToInt32(Request.Params["school_id"]);
            SchoolMN.Codigo      = txtCodigo.Text;
            SchoolMN.Nombre      = txtNombreEscuela.Text;
            SchoolMN.Telefono    = txtTelefono.Text;
            SchoolMN.Direccion   = txtDireccion.Text;
            SchoolMN.Distrito_id = Convert.ToInt32(DdlDistrito.Text);
            SchoolMN.Ugel_id     = Convert.ToInt32(DdlUgel.Text);
            SchoolMN.Referencia  = referencia.Text;
            SchoolMN.Latitud     = latitud.Text;
            SchoolMN.Longitud    = longitud.Text;
            SchoolMN.Director    = "";
            SchoolMN.Subdirector = "";
            if (NumDocHGE.Text == "")
            {
                SchoolMN.Num_Doc_hge = 0;
            }
            else
            {
                SchoolMN.Num_Doc_hge = Convert.ToInt32(NumDocHGE.Text);
            }

            SchoolMN.Num_doc_inicial = 0;


            SchoolMN.Num_doc_primaria = 0;

            if (NumDocSec.Text == "")
            {
                SchoolMN.Num_doc_secundaria = 0;
            }
            else
            {
                SchoolMN.Num_doc_secundaria = Convert.ToInt32(NumDocSec.Text);
            }

            SchoolMN.Num_alum_ini = 0;


            SchoolMN.Num_alum_prim = 0;

            if (NumAlumSec.Text == "")
            {
                SchoolMN.Num_alum_sec = 0;
            }
            else
            {
                SchoolMN.Num_alum_sec = Convert.ToInt32(NumAlumSec.Text);
            }

            SchoolMN.Num_aulas = 0;


            SchoolMN.Num_secc_prim = 0;

            if (NumSeccSec.Text == "")
            {
                SchoolMN.Num_secc_sec = 0;
            }
            else
            {
                SchoolMN.Num_secc_sec = Convert.ToInt32(NumSeccSec.Text);
            }

            SchoolLN.updateSchool(SchoolMN);
            string strRedirect;

            strRedirect = "Admin-ListEscuela.aspx?id=3";
            Response.Redirect(strRedirect, true);
        }
예제 #16
0
 public ModeloNegocio.School insertSchool(ModeloNegocio.School ObjSchool)
 {
     AccesoDatos.School school = new AccesoDatos.School();
     //school.insertSchool(ObjSchool);
     return(school.insertSchool(ObjSchool));
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {

                aconpanaClaseMN = new ModeloNegocio.AconpanaClase();
                aconpanaClaseLN = new LogicaNegocio.AconpanaClase();
                int aconpana_id = Convert.ToInt32(Request.Params["aconpana_id"]);

                aconpanaClaseMN = aconpanaClaseLN.getAconpanaClaseId(aconpana_id);

                txtFecha.Text = aconpanaClaseMN.Fecha.ToString("yyyy-MM-dd");

                asesorLN = new LogicaNegocio.Asesor();
                asesorMN = new ModeloNegocio.Asesor();
                asesorMN = asesorLN.getAsesorId(aconpanaClaseMN.Asesor_id);
                txtAsesor.Text = asesorMN.FullName;

                docenteLN = new LogicaNegocio.Docente();
                docenteMN = new ModeloNegocio.Docente();
                docenteMN = docenteLN.getDocenteId(aconpanaClaseMN.Docente_id);
                txtDocente.Text = docenteMN.FullName;

                schoolLN = new LogicaNegocio.School();
                schoolMN = new ModeloNegocio.School();

                //schoolMN = schoolLN.getDocenteId(visitaMN.Docente_id);
                schoolMN = schoolLN.getSchool(aconpanaClaseMN.School_id);

                txtSchool.Text = schoolMN.Nombre.ToString();

                teacherGradeLN = new LogicaNegocio.TeacherGrade();
                teacherGradeMN = new ModeloNegocio.TeacherGrade();

                teacherGradeMN = teacherGradeLN.getTeacherGradeId(Convert.ToInt32(aconpanaClaseMN.Id_Grado_seccion));
                if (teacherGradeMN.Grade == null)
                    teacherGradeMN.Grade = "";
                if (teacherGradeMN.Seccion == null)
                    teacherGradeMN.Seccion = "";

                txtGradoSeccion.Text = "Grado: " +  teacherGradeMN.Grade.ToString() + " Seccion: " + teacherGradeMN.Seccion.ToString();

                temaLN = new LogicaNegocio.Tema();
                temaMN = new ModeloNegocio.Tema();

                temaMN = temaLN.getTemaId(Convert.ToInt32(aconpanaClaseMN.Id_Tema_Nombre_sesion));

                txtNombSesion.Text = temaMN.Name;

                sesionLN = new LogicaNegocio.Sesion();
                sesionMN = new ModeloNegocio.Sesion();

                sesionMN = sesionLN.getSesionId(Convert.ToInt32(aconpanaClaseMN.Id_sesion));

                txtNumSesion.Text = sesionMN.NumSesion;

                txtEstidianteAsistentes.Text = aconpanaClaseMN.Num_estudiante.ToString();

                if(aconpanaClaseMN.Sesion_planificado == 0) {
                    txtSesionPlanificado.Text = "No";
                    txtMotivo.Text = aconpanaClaseMN.Motivo;
                } else if(aconpanaClaseMN.Sesion_planificado == 1) {
                     txtSesionPlanificado.Text = "Si";
                }

                if (aconpanaClaseMN.Desarrollo_innovacion == 0)
                {
                    txtInnovacion.Text = "No";
                }
                else if (aconpanaClaseMN.Desarrollo_innovacion == 1)
                {
                    txtInnovacion.Text = "Si";
                }

                txtRecursosInformáticos.Text = aconpanaClaseMN.Recursos_informaticos;

                txtRecursosAudiovisuales.Text = aconpanaClaseMN.Recursos_audiovisuales;

                txtMaterialesDidactico.Text = aconpanaClaseMN.Materiales_didacticos;

                txtDinamicasUsadas.Text = aconpanaClaseMN.Dinamicas_utilizadas;

                TxtOtros.Text = aconpanaClaseMN.Otros;

                if (aconpanaClaseMN.Asesor_intervino == 0)
                {
                    txtIntervino.Text = "No";
                }
                else if (aconpanaClaseMN.Desarrollo_innovacion == 1)
                {
                    txtIntervino.Text = "Si";
                }

                txtComoIntervinoSesion.Text = aconpanaClaseMN.Como_intervino;

                if (aconpanaClaseMN.Intervencion_colaboradores == 0)
                {
                    txtOtrosColaboradores.Text = "No";
                }
                else if (aconpanaClaseMN.Intervencion_colaboradores == 1)
                {
                    txtOtrosColaboradores.Text = "Si";
                }

                txtQuien.Text = aconpanaClaseMN.Colaborador;

                txtComoIntervino.Text = aconpanaClaseMN.Como_intervino;

                if (aconpanaClaseMN.Participa_juego == 0)
                {
                    txtParticipaJuego.Text = "No";
                }
                else if (aconpanaClaseMN.Participa_juego == 1)
                {
                    txtParticipaJuego.Text = "Si";
                }

                txtEtapa.Text = aconpanaClaseMN.Etapa;
                txtRazon.Text = aconpanaClaseMN.Razon;
                txtIncidencia.Text = aconpanaClaseMN.Incidencia;

                //txtMotivoVisita.Text = visitaMN.MotivoVisita;

                //txtObservacion.Text = visitaMN.Observacion;
                //TxtPendientes.Text = visitaMN.Pendientes;

            }
        }