Exemplo n.º 1
0
        public void getDirector(ref ModeloNegocio.Director ObjDirector)
        {
            AccesoDatos.User   user    = new AccesoDatos.User();
            ModeloNegocio.User ObjUser = new ModeloNegocio.User();
            ObjUser = user.getUser(ObjDirector.id);
            ObjDirector.FullName         = ObjUser.FullName;
            ObjDirector.Codigo           = ObjUser.Codigo;
            ObjDirector.Email            = ObjUser.Email;
            ObjDirector.Telefono         = ObjUser.Telefono;
            ObjDirector.FechaCreado      = ObjUser.FechaCreado;
            ObjDirector.FechaActualizado = ObjUser.FechaActualizado;
            ObjDirector.typeUser         = ObjUser.typeUser;
            //ObjDirector.TypeContract = ObjUser.TypeContract;

            LogicaNegocio.UserSchool    asesorSchool = new LogicaNegocio.UserSchool();
            List <ModeloNegocio.School> lista        = new List <ModeloNegocio.School>();

            lista = asesorSchool.getAllSchoolForUser(ObjDirector.id);
            foreach (ModeloNegocio.School School_list in lista)
            {
                ObjDirector.School_id = School_list.id;
            }

            List <ModeloNegocio.TeacherGrade> lista1 = new List <ModeloNegocio.TeacherGrade>();

            LogicaNegocio.TeacherGrade teacherGrade = new LogicaNegocio.TeacherGrade();
            lista1 = teacherGrade.getAllTeacherGradeForUser(ObjDirector.id);
            ObjDirector.TeacherGrade = lista1;

            List <ModeloNegocio.TeacherCourse> lista2 = new List <ModeloNegocio.TeacherCourse>();

            LogicaNegocio.TeacherCourse teacherCourse = new LogicaNegocio.TeacherCourse();
            lista2 = teacherCourse.getAllTeacherCourseForUser(ObjDirector.id);
            ObjDirector.TeacherCourses = lista2;

            List <ModeloNegocio.TeacherTurn> lista3 = new List <ModeloNegocio.TeacherTurn>();

            LogicaNegocio.TeacherTurn teacherTurn = new LogicaNegocio.TeacherTurn();
            lista3 = teacherTurn.getAllTeacherTurnForUser(ObjDirector.id);
            ObjDirector.TeacherTurns = lista3;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            DataTable NumGradesForTeachers;
            int totalGrades;
            //int c = 0;
            LogicaNegocio.TeacherGrade teacherGrade = new LogicaNegocio.TeacherGrade();
            NumGradesForTeachers = teacherGrade.getCountGradesForTeachers();

            foreach (DataRow fila0 in NumGradesForTeachers.Rows)
            {
                //c = c + 1;
                totalGrades = teacherGrade.getCountGradesForIdTeacher(Convert.ToInt32(fila0["id"]));
                lblNumGradesForTeacher.Text += "<tr>";
                lblNumGradesForTeacher.Text += "<td>" + fila0["name"].ToString() + "</td>";
                lblNumGradesForTeacher.Text += "<td>" + totalGrades + "</td>";
                lblNumGradesForTeacher.Text += "<td>" + fila0["Num_grades"].ToString() + "</td>";
                lblNumGradesForTeacher.Text += "</tr>";
                //if (c == 5)
                //{
                //    break;
                //}
            }
        }
Exemplo n.º 3
0
        public void getDocente(ref ModeloNegocio.Docente ObjDocente)
        {
            AccesoDatos.User user = new AccesoDatos.User();
            ModeloNegocio.User ObjUser = new ModeloNegocio.User();
            ObjUser = user.getUser(ObjDocente.id);
            ObjDocente.FullName = ObjUser.FullName;
            ObjDocente.Codigo = ObjUser.Codigo;
            ObjDocente.Email = ObjUser.Email;
            ObjDocente.Telefono = ObjUser.Telefono;
            ObjDocente.FechaCreado = ObjUser.FechaCreado;
            ObjDocente.FechaActualizado = ObjUser.FechaActualizado;
            ObjDocente.typeUser = ObjUser.typeUser;
            ObjDocente.TypeContract = ObjUser.TypeContract;

            LogicaNegocio.UserSchool asesorSchool = new LogicaNegocio.UserSchool();
            List<ModeloNegocio.School> lista = new List<ModeloNegocio.School>();
            lista = asesorSchool.getAllSchoolForUser(ObjDocente.id);
            foreach (ModeloNegocio.School School_list in lista)
            {
                ObjDocente.School_id = School_list.id;
            }

            List<ModeloNegocio.TeacherGrade> lista1 = new List<ModeloNegocio.TeacherGrade>();
            LogicaNegocio.TeacherGrade teacherGrade = new LogicaNegocio.TeacherGrade();
            lista1 = teacherGrade.getAllTeacherGradeForUser(ObjDocente.id);
            ObjDocente.TeacherGrade = lista1;

            List<ModeloNegocio.TeacherCourse> lista2 = new List<ModeloNegocio.TeacherCourse>();
            LogicaNegocio.TeacherCourse teacherCourse = new LogicaNegocio.TeacherCourse();
            lista2 = teacherCourse.getAllTeacherCourseForUser(ObjDocente.id);
            ObjDocente.TeacherCourses = lista2;

            List<ModeloNegocio.TeacherTurn> lista3 = new List<ModeloNegocio.TeacherTurn>();
            LogicaNegocio.TeacherTurn teacherTurn = new LogicaNegocio.TeacherTurn();
            lista3 = teacherTurn.getAllTeacherTurnForUser(ObjDocente.id);
            ObjDocente.TeacherTurns = lista3;
        }
Exemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DataTable NumGradesForTeachers;
            int       totalGrades;

            //int c = 0;
            LogicaNegocio.TeacherGrade teacherGrade = new LogicaNegocio.TeacherGrade();
            NumGradesForTeachers = teacherGrade.getCountGradesForTeachers();

            foreach (DataRow fila0 in NumGradesForTeachers.Rows)
            {
                //c = c + 1;
                totalGrades = teacherGrade.getCountGradesForIdTeacher(Convert.ToInt32(fila0["id"]));
                lblNumGradesForTeacher.Text += "<tr>";
                lblNumGradesForTeacher.Text += "<td>" + fila0["name"].ToString() + "</td>";
                lblNumGradesForTeacher.Text += "<td>" + totalGrades + "</td>";
                lblNumGradesForTeacher.Text += "<td>" + fila0["Num_grades"].ToString() + "</td>";
                lblNumGradesForTeacher.Text += "</tr>";
                //if (c == 5)
                //{
                //    break;
                //}
            }
        }
Exemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Page.Response.ContentType = "application/json;";
            Page.Response.Charset     = "utf-8";
            Page.Response.Cache.SetCacheability(HttpCacheability.NoCache);


            if (Request.Params["tipo"] == "deleteAsesor")
            {
                int iduser = Convert.ToInt32(Request.Params["iduser"]);
                LogicaNegocio.Asesor      Asesor      = new LogicaNegocio.Asesor();
                LogicaNegocio.UserSchool  userSchool  = new LogicaNegocio.UserSchool();
                LogicaNegocio.UserTeacher userTeacher = new LogicaNegocio.UserTeacher();
                //Response.Write("{success:1}");
                if (Asesor.deleteAsesor(iduser))
                {
                    ModeloNegocio.Asesor AsesorMN = new ModeloNegocio.Asesor();
                    foreach (ModeloNegocio.School listSchool in AsesorMN.Schools)
                    {
                        userSchool.updateSelectSchoolForIduser(listSchool.id, 0);
                    }
                    // userSchool.updateSelectSchoolForIduser(iduser);
                    userSchool.deleteSchoolsForUserId(iduser);
                    userTeacher.deleteTeachersForUserId(iduser);
                    Response.Write("{success:1}");
                }
            }

            if (Request.Params["tipo"] == "deleteDocente")
            {
                int iduser = Convert.ToInt32(Request.Params["iduser"]);
                LogicaNegocio.Docente Docente = new LogicaNegocio.Docente();
                //Response.Write("{success:1}");
                if (Docente.deleteDocente(iduser))
                {
                    Response.Write("{success:1}");
                }
            }

            if (Request.Params["tipo"] == "deleteSchool")
            {
                int idSchool = Convert.ToInt32(Request.Params["idSchool"]);
                LogicaNegocio.School School = new LogicaNegocio.School();
                //Response.Write("{success:1}");
                if (School.deleteSchool(idSchool))
                {
                    Response.Write("{success:1}");
                }
            }


            if (Request.Params["tipo"] == "deleteMicrored")
            {
                int idMicrored = Convert.ToInt32(Request.Params["idmicrored"]);
                LogicaNegocio.Microred microred = new LogicaNegocio.Microred();
                //Response.Write("{success:1}");
                if (microred.deleteMicrored(idMicrored))
                {
                    Response.Write("{success:1}");
                }
            }


            if (Request.Params["tipo"] == "deleteAconpanaClase")
            {
                int idMicrored = Convert.ToInt32(Request.Params["idAconpanaClase"]);
                LogicaNegocio.AconpanaClase aconpanaClase = new LogicaNegocio.AconpanaClase();
                //Response.Write("{success:1}");
                if (aconpanaClase.deleteMicrored(idMicrored))
                {
                    Response.Write("{success:1}");
                }
            }

            if (Request.Params["tipo"] == "deleteVisitasIE")
            {
                int idVisita = Convert.ToInt32(Request.Params["idVisita"]);
                LogicaNegocio.VisitaIE visita = new LogicaNegocio.VisitaIE();
                //Response.Write("{success:1}");
                if (visita.deleteVisitaIE(idVisita))
                {
                    Response.Write("{success:1}");
                }
            }


            if (Request.Params["tipo"] == "allSchoolAsesor")
            {
                int idMicrored = Convert.ToInt32(Request.Params["idAconpanaClase"]);
                LogicaNegocio.UserSchool shool = new LogicaNegocio.UserSchool();
                //Response.Write("{success:1}");
                int idAsesor = Convert.ToInt32(Request.Params["idAsesor"]);



                List <ModeloNegocio.Docente> listUsuario = new List <ModeloNegocio.Docente>();



                //listUsuario = shool.getAllDocenteSchool(idSchool);
                //foreach (ModeloNegocio.Docente Docentes in listUsuario)
                //{
                //    Response.Write("{success:1}");
                //}

                var json = new JavaScriptSerializer().Serialize(shool.getAllSchoolForUser(idAsesor));
                Response.Write(json);
                //if (aconpanaClase.deleteMicrored(idMicrored))
                //{

                //    Response.Write("{success:1}");
                //}
            }

            if (Request.Params["tipo"] == "allDocenteSchool")
            {
                int idMicrored             = Convert.ToInt32(Request.Params["idAconpanaClase"]);
                LogicaNegocio.School shool = new LogicaNegocio.School();
                //Response.Write("{success:1}");
                int idSchool = Convert.ToInt32(Request.Params["idSchool"]);



                List <ModeloNegocio.Docente> listUsuario = new List <ModeloNegocio.Docente>();



                //listUsuario = shool.getAllDocenteSchool(idSchool);
                //foreach (ModeloNegocio.Docente Docentes in listUsuario)
                //{
                //    Response.Write("{success:1}");
                //}

                var json = new JavaScriptSerializer().Serialize(shool.getAllDocenteSchool(idSchool));
                Response.Write(json);
                //if (aconpanaClase.deleteMicrored(idMicrored))
                //{

                //    Response.Write("{success:1}");
                //}
            }

            if (Request.Params["tipo"] == "allGradeSectionForTeacher")
            {
                int idDocente = Convert.ToInt32(Request.Params["idDocente"]);
                List <ModeloNegocio.TeacherGrade> lista1       = new List <ModeloNegocio.TeacherGrade>();
                LogicaNegocio.TeacherGrade        teacherGrade = new LogicaNegocio.TeacherGrade();
                lista1 = teacherGrade.getAllTeacherGradeForUser(idDocente);
                var json = new JavaScriptSerializer().Serialize(lista1);
                Response.Write(json);
            }

            if (Request.Params["tipo"] == "allDirectorSchool")
            {
                int idMicrored             = Convert.ToInt32(Request.Params["idAconpanaClase"]);
                LogicaNegocio.School shool = new LogicaNegocio.School();

                int idSchool = Convert.ToInt32(Request.Params["idSchool"]);

                var json = new JavaScriptSerializer().Serialize(shool.getDirectorSchool(idSchool));
                Response.Write(json);
            }

            //Franco allTemForGrade
            if (Request.Params["tipo"] == "allTemForGrade")
            {
                LogicaNegocio.Tema tema = new LogicaNegocio.Tema();
                //Response.Write("{success:1}");
                string grade = Convert.ToString(Request.Params["grade"]);

                List <ModeloNegocio.Tema> listTemas = new List <ModeloNegocio.Tema>();
                var json = new JavaScriptSerializer().Serialize(tema.getAllTemaForGrade(grade));
                Response.Write(json);
            }

            if (Request.Params["tipo"] == "allNumSesionForTem")
            {
                LogicaNegocio.Sesion sesion = new LogicaNegocio.Sesion();
                //Response.Write("{success:1}");
                int tema_id = Convert.ToInt32(Request.Params["tema_id"]);
                var json    = new JavaScriptSerializer().Serialize(sesion.getAllSesionsForTem(tema_id));
                Response.Write(json);
            }
        }
Exemplo n.º 6
0
        protected void cmdGuardar_Click(object sender, EventArgs e)
        {
            ObjDocenteMN = new ModeloNegocio.Docente();
            ObjDocenteLN = new LogicaNegocio.Docente();

            ObjDocenteMN.Codigo       = txtCodigo.Text;
            ObjDocenteMN.FullName     = txtNombreApellido.Text;
            ObjDocenteMN.Email        = txtCorreo.Text;
            ObjDocenteMN.Type         = 4;
            ObjDocenteMN.Telefono     = txtTelefono.Text;
            ObjDocenteMN.TypeContract = Convert.ToString(ddlContrato.SelectedItem);

            ObjDocenteMN.School_id = ObjDocenteLN.insertDocente(ObjDocenteMN);

            ObjUserSchoolMN = new ModeloNegocio.UserSchool();
            ObjUserSchoolLN = new LogicaNegocio.UserSchool();

            ObjUserSchoolMN.UserAsesorId = ObjDocenteMN.School_id;
            ObjUserSchoolMN.UserSchoolId = Convert.ToInt32(ddlEscuela.SelectedValue);

            ObjUserSchoolLN.insertUserSchool(ObjUserSchoolMN);

            //foreach (ListItem item in lblGradosaCargo.Items)
            //{
            //    if (item.Selected == true)
            //    {
            //        ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
            //        ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();

            //        ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
            //        ObjTeacherGradeMN.Grade= item.Text;
            //        ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);

            //    }

            //}


            if (chk1.Checked == true)
            {
                if (chk1A.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk1.Text;
                    ObjTeacherGradeMN.Seccion      = chk1A.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt1A.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }

                if (chk1B.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk1.Text;
                    ObjTeacherGradeMN.Seccion      = chk1B.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt1B.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk1C.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk1.Text;
                    ObjTeacherGradeMN.Seccion      = chk1C.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt1C.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk1D.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk1.Text;
                    ObjTeacherGradeMN.Seccion      = chk1D.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt1D.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk1E.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk1.Text;
                    ObjTeacherGradeMN.Seccion      = chk1E.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt1E.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk1F.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk1.Text;
                    ObjTeacherGradeMN.Seccion      = chk1F.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt1F.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk1G.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk1.Text;
                    ObjTeacherGradeMN.Seccion      = chk1G.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt1G.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk1H.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk1.Text;
                    ObjTeacherGradeMN.Seccion      = chk1H.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt1H.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk1I.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk1.Text;
                    ObjTeacherGradeMN.Seccion      = chk1I.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt1I.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk1J.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk1.Text;
                    ObjTeacherGradeMN.Seccion      = chk1J.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt1J.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }

                if (chk1K.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk1.Text;
                    ObjTeacherGradeMN.Seccion      = chk1K.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt1K.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }

                if (chk1L.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk1.Text;
                    ObjTeacherGradeMN.Seccion      = chk1L.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt1L.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
            }


            if (chk2.Checked == true)
            {
                if (chk2A.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk2.Text;
                    ObjTeacherGradeMN.Seccion      = chk2A.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt2A.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }

                if (chk2B.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk2.Text;
                    ObjTeacherGradeMN.Seccion      = chk2B.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt2B.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk2C.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk2.Text;
                    ObjTeacherGradeMN.Seccion      = chk2C.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt2C.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk2D.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk2.Text;
                    ObjTeacherGradeMN.Seccion      = chk2D.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt2D.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk2E.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk2.Text;
                    ObjTeacherGradeMN.Seccion      = chk2E.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt2E.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk2F.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk2.Text;
                    ObjTeacherGradeMN.Seccion      = chk2F.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt2F.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk2G.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk2.Text;
                    ObjTeacherGradeMN.Seccion      = chk2G.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt2G.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk2H.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk2.Text;
                    ObjTeacherGradeMN.Seccion      = chk2H.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt2H.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk2I.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk2.Text;
                    ObjTeacherGradeMN.Seccion      = chk2I.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt2I.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk2J.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk2.Text;
                    ObjTeacherGradeMN.Seccion      = chk2J.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt2J.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }

                if (chk2K.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk2.Text;
                    ObjTeacherGradeMN.Seccion      = chk2K.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt2K.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }

                if (chk2L.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk2.Text;
                    ObjTeacherGradeMN.Seccion      = chk2L.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt2L.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
            }

            if (chk3.Checked == true)
            {
                if (chk3A.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk3.Text;
                    ObjTeacherGradeMN.Seccion      = chk3A.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt3A.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }

                if (chk3B.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk3.Text;
                    ObjTeacherGradeMN.Seccion      = chk3B.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt3B.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk3C.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk3.Text;
                    ObjTeacherGradeMN.Seccion      = chk3C.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt3C.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk3D.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk3.Text;
                    ObjTeacherGradeMN.Seccion      = chk3D.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt3D.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk3E.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk3.Text;
                    ObjTeacherGradeMN.Seccion      = chk3E.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt3E.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk3F.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk3.Text;
                    ObjTeacherGradeMN.Seccion      = chk3F.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt3F.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk3G.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk3.Text;
                    ObjTeacherGradeMN.Seccion      = chk3G.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt3G.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk3H.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk3.Text;
                    ObjTeacherGradeMN.Seccion      = chk3H.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt3H.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk3I.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk3.Text;
                    ObjTeacherGradeMN.Seccion      = chk3I.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt3I.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk3J.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk3.Text;
                    ObjTeacherGradeMN.Seccion      = chk3J.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt3J.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }

                if (chk3K.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk3.Text;
                    ObjTeacherGradeMN.Seccion      = chk3K.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt3K.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }

                if (chk3L.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk3.Text;
                    ObjTeacherGradeMN.Seccion      = chk3L.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt3L.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
            }


            if (chk4.Checked == true)
            {
                if (chk4A.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk4.Text;
                    ObjTeacherGradeMN.Seccion      = chk4A.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt4A.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }

                if (chk4B.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk4.Text;
                    ObjTeacherGradeMN.Seccion      = chk4B.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt4B.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk4C.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk4.Text;
                    ObjTeacherGradeMN.Seccion      = chk4C.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt4C.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk4D.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk4.Text;
                    ObjTeacherGradeMN.Seccion      = chk4D.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt4D.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk4E.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk4.Text;
                    ObjTeacherGradeMN.Seccion      = chk4E.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt4E.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk4F.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk4.Text;
                    ObjTeacherGradeMN.Seccion      = chk4F.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt4F.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk4G.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk4.Text;
                    ObjTeacherGradeMN.Seccion      = chk4G.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt4G.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk4H.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk4.Text;
                    ObjTeacherGradeMN.Seccion      = chk4H.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt4H.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk4I.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk4.Text;
                    ObjTeacherGradeMN.Seccion      = chk4I.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt4I.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk4J.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk4.Text;
                    ObjTeacherGradeMN.Seccion      = chk4J.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt4J.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }

                if (chk4K.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk4.Text;
                    ObjTeacherGradeMN.Seccion      = chk4K.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt4K.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }

                if (chk4L.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk4.Text;
                    ObjTeacherGradeMN.Seccion      = chk4L.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt4L.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
            }


            if (chk5.Checked == true)
            {
                if (chk5A.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk5.Text;
                    ObjTeacherGradeMN.Seccion      = chk5A.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt5A.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }

                if (chk5B.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk5.Text;
                    ObjTeacherGradeMN.Seccion      = chk5B.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt5B.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk5C.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk5.Text;
                    ObjTeacherGradeMN.Seccion      = chk5C.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt5C.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk5D.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk5.Text;
                    ObjTeacherGradeMN.Seccion      = chk5D.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt5D.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk5E.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk5.Text;
                    ObjTeacherGradeMN.Seccion      = chk5E.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt5E.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk5F.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk5.Text;
                    ObjTeacherGradeMN.Seccion      = chk5F.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt5F.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk5G.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk5.Text;
                    ObjTeacherGradeMN.Seccion      = chk5G.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt5G.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk5H.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk5.Text;
                    ObjTeacherGradeMN.Seccion      = chk5H.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt5H.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk5I.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk5.Text;
                    ObjTeacherGradeMN.Seccion      = chk5I.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt5I.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk5J.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk5.Text;
                    ObjTeacherGradeMN.Seccion      = chk5J.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt5J.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }

                if (chk5K.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk5.Text;
                    ObjTeacherGradeMN.Seccion      = chk5K.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt5K.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }

                if (chk5L.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherGradeMN.Grade        = chk5.Text;
                    ObjTeacherGradeMN.Seccion      = chk5L.Text;
                    ObjTeacherGradeMN.Num_alumnos  = Convert.ToInt32(txt5L.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
            }

            foreach (ListItem item in lblCursos.Items)
            {
                if (item.Selected == true)
                {
                    ObjTeacherCourseMN = new ModeloNegocio.TeacherCourse();
                    ObjTeacherCourseLN = new LogicaNegocio.TeacherCourse();

                    ObjTeacherCourseMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherCourseMN.Course       = item.Text;

                    ObjTeacherCourseLN.insertTeacherCourse(ObjTeacherCourseMN);
                }
            }

            foreach (ListItem item in lblTurnos.Items)
            {
                if (item.Selected == true)
                {
                    ObjTeacherTurnMN = new ModeloNegocio.TeacherTurn();
                    ObjTeacherTurnLN = new LogicaNegocio.TeacherTurn();

                    ObjTeacherTurnMN.UserTeacheId = ObjDocenteMN.School_id;
                    ObjTeacherTurnMN.Turn         = item.Text;

                    ObjTeacherTurnLN.insertTeacherTurn(ObjTeacherTurnMN);
                }
            }

            string strRedirect;

            strRedirect = "Admin-ListDocente.aspx?id=2";
            Response.Redirect(strRedirect, true);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            Page.Response.ContentType = "application/json;";
            Page.Response.Charset = "utf-8";
            Page.Response.Cache.SetCacheability(HttpCacheability.NoCache);

            if (Request.Params["tipo"] == "deleteAsesor")
            {
                int iduser = Convert.ToInt32(Request.Params["iduser"]);
                LogicaNegocio.Asesor Asesor = new LogicaNegocio.Asesor();
                LogicaNegocio.UserSchool userSchool = new LogicaNegocio.UserSchool();
                LogicaNegocio.UserTeacher userTeacher = new LogicaNegocio.UserTeacher();
                //Response.Write("{success:1}");
                if (Asesor.deleteAsesor(iduser))
                {
                    ModeloNegocio.Asesor AsesorMN = new ModeloNegocio.Asesor();
                    foreach (ModeloNegocio.School listSchool in AsesorMN.Schools)
                    {
                        userSchool.updateSelectSchoolForIduser(listSchool.id, 0);
                    }
                   // userSchool.updateSelectSchoolForIduser(iduser);
                    userSchool.deleteSchoolsForUserId(iduser);
                    userTeacher.deleteTeachersForUserId(iduser);
                    Response.Write("{success:1}");
                }
            }

            if (Request.Params["tipo"] == "deleteDocente")
            {
                int iduser = Convert.ToInt32(Request.Params["iduser"]);
                LogicaNegocio.Docente Docente = new LogicaNegocio.Docente();
                //Response.Write("{success:1}");
                if (Docente.deleteDocente(iduser))
                {
                    Response.Write("{success:1}");

                }
            }

            if (Request.Params["tipo"] == "deleteSchool")
            {
                int idSchool = Convert.ToInt32(Request.Params["idSchool"]);
                LogicaNegocio.School School = new LogicaNegocio.School();
                //Response.Write("{success:1}");
                if (School.deleteSchool(idSchool))
                {
                    Response.Write("{success:1}");
                }
            }

            if (Request.Params["tipo"] == "deleteMicrored")
            {
                int idMicrored = Convert.ToInt32(Request.Params["idmicrored"]);
                LogicaNegocio.Microred microred = new LogicaNegocio.Microred();
                //Response.Write("{success:1}");
                if (microred.deleteMicrored(idMicrored))
                {
                    Response.Write("{success:1}");
                }
            }

            if (Request.Params["tipo"] == "deleteAconpanaClase")
            {
                int idMicrored = Convert.ToInt32(Request.Params["idAconpanaClase"]);
                LogicaNegocio.AconpanaClase aconpanaClase = new LogicaNegocio.AconpanaClase();
                //Response.Write("{success:1}");
                if (aconpanaClase.deleteMicrored(idMicrored))
                {
                    Response.Write("{success:1}");
                }
            }

            if (Request.Params["tipo"] == "deleteVisitasIE")
            {
                int idVisita = Convert.ToInt32(Request.Params["idVisita"]);
                LogicaNegocio.VisitaIE visita = new LogicaNegocio.VisitaIE();
                //Response.Write("{success:1}");
                if (visita.deleteVisitaIE(idVisita))
                {
                    Response.Write("{success:1}");
                }
            }

            if (Request.Params["tipo"] == "allSchoolAsesor")
            {
                int idMicrored = Convert.ToInt32(Request.Params["idAconpanaClase"]);
                LogicaNegocio.UserSchool shool = new LogicaNegocio.UserSchool();
                //Response.Write("{success:1}");
                int idAsesor = Convert.ToInt32(Request.Params["idAsesor"]);

                List<ModeloNegocio.Docente> listUsuario = new List<ModeloNegocio.Docente>();

                //listUsuario = shool.getAllDocenteSchool(idSchool);
                //foreach (ModeloNegocio.Docente Docentes in listUsuario)
                //{
                //    Response.Write("{success:1}");
                //}

                var json = new JavaScriptSerializer().Serialize(shool.getAllSchoolForUser(idAsesor));
                Response.Write(json);
                //if (aconpanaClase.deleteMicrored(idMicrored))
                //{

                //    Response.Write("{success:1}");
                //}
            }

            if (Request.Params["tipo"] == "allDocenteSchool")
            {
                int idMicrored = Convert.ToInt32(Request.Params["idAconpanaClase"]);
                LogicaNegocio.School shool = new LogicaNegocio.School();
                //Response.Write("{success:1}");
                int idSchool = Convert.ToInt32(Request.Params["idSchool"]);

                List<ModeloNegocio.Docente> listUsuario = new List<ModeloNegocio.Docente>();

                //listUsuario = shool.getAllDocenteSchool(idSchool);
                //foreach (ModeloNegocio.Docente Docentes in listUsuario)
                //{
                //    Response.Write("{success:1}");
                //}

                var json = new JavaScriptSerializer().Serialize(shool.getAllDocenteSchool(idSchool));
                Response.Write(json);
                //if (aconpanaClase.deleteMicrored(idMicrored))
                //{

                //    Response.Write("{success:1}");
                //}
            }

            if (Request.Params["tipo"] == "allGradeSectionForTeacher")
            {
                int idDocente = Convert.ToInt32(Request.Params["idDocente"]);
                List<ModeloNegocio.TeacherGrade> lista1 = new List<ModeloNegocio.TeacherGrade>();
                LogicaNegocio.TeacherGrade teacherGrade = new LogicaNegocio.TeacherGrade();
                lista1 = teacherGrade.getAllTeacherGradeForUser(idDocente);
                var json = new JavaScriptSerializer().Serialize(lista1);
                Response.Write(json);
            }

            if (Request.Params["tipo"] == "allDirectorSchool")
            {
                int idMicrored = Convert.ToInt32(Request.Params["idAconpanaClase"]);
                LogicaNegocio.School shool = new LogicaNegocio.School();

                int idSchool = Convert.ToInt32(Request.Params["idSchool"]);

                var json = new JavaScriptSerializer().Serialize(shool.getDirectorSchool(idSchool));
                Response.Write(json);

            }

            //Franco allTemForGrade
            if (Request.Params["tipo"] == "allTemForGrade")
            {
                LogicaNegocio.Tema tema = new LogicaNegocio.Tema();
                //Response.Write("{success:1}");
                string grade = Convert.ToString(Request.Params["grade"]);

                List<ModeloNegocio.Tema> listTemas = new List<ModeloNegocio.Tema>();
                var json = new JavaScriptSerializer().Serialize(tema.getAllTemaForGrade(grade));
                Response.Write(json);

            }

            if (Request.Params["tipo"] == "allNumSesionForTem")
            {
                LogicaNegocio.Sesion sesion = new LogicaNegocio.Sesion();
                //Response.Write("{success:1}");
                int tema_id = Convert.ToInt32(Request.Params["tema_id"]);
                var json = new JavaScriptSerializer().Serialize(sesion.getAllSesionsForTem(tema_id));
                Response.Write(json);

            }
        }
Exemplo n.º 8
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 cmdGuardar_Click(object sender, EventArgs e)
        {
            ModeloNegocio.Docente ObjDocenteMN;
            LogicaNegocio.Docente ObjDocenteLN;

            ObjDocenteMN = new ModeloNegocio.Docente();
            ObjDocenteLN = new LogicaNegocio.Docente();

            int idDocente = Convert.ToInt32(Request.Params["docente_id"]);

            ObjDocenteMN.id = idDocente;
            ObjDocenteMN.Codigo = txtCodigo.Text;
            ObjDocenteMN.FullName = txtNombreApellido.Text;
            ObjDocenteMN.Email = txtCorreo.Text;
            ObjDocenteMN.Type = 4;
            ObjDocenteMN.Telefono = txtTelefono.Text;
            ObjDocenteMN.TypeContract = Convert.ToString(ddlContrato.SelectedItem);
            //ObjDocenteMN.School_id = Convert.ToInt32(ddlEscuela.Text);

            ObjDocenteLN.updateDocente(ObjDocenteMN);

            ObjUserSchoolMN = new ModeloNegocio.UserSchool();
            ObjUserSchoolLN = new LogicaNegocio.UserSchool();

            //Eliminamos los datos de Uuser_school
            ObjUserSchoolLN.deleteSchoolsForUserId(idDocente);

            ObjUserSchoolMN.UserAsesorId = idDocente;
            ObjUserSchoolMN.UserSchoolId = Convert.ToInt32(ddlEscuela.SelectedValue);

            ObjUserSchoolLN.insertUserSchool(ObjUserSchoolMN);

            ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
            ObjTeacherGradeLN.deleteTeacherGrade(idDocente) ;

            ObjTeacherCourseLN = new LogicaNegocio.TeacherCourse();
            ObjTeacherCourseLN.deleteTeacherCourse(idDocente);

            ObjTeacherTurnLN = new LogicaNegocio.TeacherTurn();
            ObjTeacherTurnLN.deleteTeacherTurns(idDocente);

            //foreach (ListItem item in lblGradosaCargo.Items)
            //{
            //    if (item.Selected == true)
            //    {
            //        ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
            //        ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();

            //        ObjTeacherGradeMN.UserTeacheId = idDocente;
            //        ObjTeacherGradeMN.Grade= item.Text;

            //        ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);

            //    }

            //}

            if (chk1.Checked == true)
            {

                if (chk1A.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk1.Text;
                    ObjTeacherGradeMN.Seccion = chk1A.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt1A.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }

                if (chk1B.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk1.Text;
                    ObjTeacherGradeMN.Seccion = chk1B.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt1B.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk1C.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk1.Text;
                    ObjTeacherGradeMN.Seccion = chk1C.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt1C.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk1D.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk1.Text;
                    ObjTeacherGradeMN.Seccion = chk1D.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt1D.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk1E.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk1.Text;
                    ObjTeacherGradeMN.Seccion = chk1E.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt1E.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk1F.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk1.Text;
                    ObjTeacherGradeMN.Seccion = chk1F.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt1F.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk1G.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk1.Text;
                    ObjTeacherGradeMN.Seccion = chk1G.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt1G.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk1H.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk1.Text;
                    ObjTeacherGradeMN.Seccion = chk1H.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt1H.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk1I.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk1.Text;
                    ObjTeacherGradeMN.Seccion = chk1I.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt1I.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk1J.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk1.Text;
                    ObjTeacherGradeMN.Seccion = chk1J.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt1J.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }

                if (chk1K.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk1.Text;
                    ObjTeacherGradeMN.Seccion = chk1K.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt1K.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }

                if (chk1L.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk1.Text;
                    ObjTeacherGradeMN.Seccion = chk1L.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt1L.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
            }

            if (chk2.Checked == true)
            {

                if (chk2A.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk2.Text;
                    ObjTeacherGradeMN.Seccion = chk2A.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt2A.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }

                if (chk2B.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk2.Text;
                    ObjTeacherGradeMN.Seccion = chk2B.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt2B.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk2C.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk2.Text;
                    ObjTeacherGradeMN.Seccion = chk2C.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt2C.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk2D.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk2.Text;
                    ObjTeacherGradeMN.Seccion = chk2D.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt2D.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk2E.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk2.Text;
                    ObjTeacherGradeMN.Seccion = chk2E.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt2E.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk2F.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk2.Text;
                    ObjTeacherGradeMN.Seccion = chk2F.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt2F.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk2G.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk2.Text;
                    ObjTeacherGradeMN.Seccion = chk2G.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt2G.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk2H.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk2.Text;
                    ObjTeacherGradeMN.Seccion = chk2H.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt2H.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk2I.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk2.Text;
                    ObjTeacherGradeMN.Seccion = chk2I.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt2I.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk2J.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk2.Text;
                    ObjTeacherGradeMN.Seccion = chk2J.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt2J.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }

                if (chk2K.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk2.Text;
                    ObjTeacherGradeMN.Seccion = chk2K.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt2K.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }

                if (chk2L.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk2.Text;
                    ObjTeacherGradeMN.Seccion = chk2L.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt2L.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
            }

            if (chk3.Checked == true)
            {

                if (chk3A.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk3.Text;
                    ObjTeacherGradeMN.Seccion = chk3A.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt3A.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }

                if (chk3B.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk3.Text;
                    ObjTeacherGradeMN.Seccion = chk3B.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt3B.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk3C.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk3.Text;
                    ObjTeacherGradeMN.Seccion = chk3C.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt3C.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk3D.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk3.Text;
                    ObjTeacherGradeMN.Seccion = chk3D.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt3D.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk3E.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk3.Text;
                    ObjTeacherGradeMN.Seccion = chk3E.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt3E.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk3F.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk3.Text;
                    ObjTeacherGradeMN.Seccion = chk3F.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt3F.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk3G.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk3.Text;
                    ObjTeacherGradeMN.Seccion = chk3G.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt3G.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk3H.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk3.Text;
                    ObjTeacherGradeMN.Seccion = chk3H.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt3H.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk3I.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk3.Text;
                    ObjTeacherGradeMN.Seccion = chk3I.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt3I.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk3J.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk3.Text;
                    ObjTeacherGradeMN.Seccion = chk3J.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt3J.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }

                if (chk3K.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk3.Text;
                    ObjTeacherGradeMN.Seccion = chk3K.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt3K.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }

                if (chk3L.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk3.Text;
                    ObjTeacherGradeMN.Seccion = chk3L.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt3L.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
            }

            if (chk4.Checked == true)
            {

                if (chk4A.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk4.Text;
                    ObjTeacherGradeMN.Seccion = chk4A.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt4A.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }

                if (chk4B.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk4.Text;
                    ObjTeacherGradeMN.Seccion = chk4B.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt4B.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk4C.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk4.Text;
                    ObjTeacherGradeMN.Seccion = chk4C.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt4C.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk4D.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk4.Text;
                    ObjTeacherGradeMN.Seccion = chk4D.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt4D.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk4E.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk4.Text;
                    ObjTeacherGradeMN.Seccion = chk4E.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt4E.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk4F.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk4.Text;
                    ObjTeacherGradeMN.Seccion = chk4F.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt4F.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk4G.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk4.Text;
                    ObjTeacherGradeMN.Seccion = chk4G.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt4G.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk4H.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk4.Text;
                    ObjTeacherGradeMN.Seccion = chk4H.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt4H.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk4I.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk4.Text;
                    ObjTeacherGradeMN.Seccion = chk4I.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt4I.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk4J.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk4.Text;
                    ObjTeacherGradeMN.Seccion = chk4J.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt4J.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }

                if (chk4K.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk4.Text;
                    ObjTeacherGradeMN.Seccion = chk4K.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt4K.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }

                if (chk4L.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk4.Text;
                    ObjTeacherGradeMN.Seccion = chk4L.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt4L.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
            }

            if (chk5.Checked == true)
            {

                if (chk5A.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk5.Text;
                    ObjTeacherGradeMN.Seccion = chk5A.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt5A.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }

                if (chk5B.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk5.Text;
                    ObjTeacherGradeMN.Seccion = chk5B.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt5B.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk5C.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk5.Text;
                    ObjTeacherGradeMN.Seccion = chk5C.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt5C.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk5D.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk5.Text;
                    ObjTeacherGradeMN.Seccion = chk5D.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt5D.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk5E.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk5.Text;
                    ObjTeacherGradeMN.Seccion = chk5E.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt5E.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk5F.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk5.Text;
                    ObjTeacherGradeMN.Seccion = chk5F.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt5F.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk5G.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk5.Text;
                    ObjTeacherGradeMN.Seccion = chk5G.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt5G.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk5H.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk5.Text;
                    ObjTeacherGradeMN.Seccion = chk5H.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt5H.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk5I.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk5.Text;
                    ObjTeacherGradeMN.Seccion = chk5I.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt5I.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
                if (chk5J.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk5.Text;
                    ObjTeacherGradeMN.Seccion = chk5J.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt5J.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }

                if (chk5K.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk5.Text;
                    ObjTeacherGradeMN.Seccion = chk5K.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt5K.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }

                if (chk5L.Checked == true)
                {
                    ObjTeacherGradeMN = new ModeloNegocio.TeacherGrade();
                    ObjTeacherGradeLN = new LogicaNegocio.TeacherGrade();
                    ObjTeacherGradeMN.UserTeacheId = idDocente;
                    ObjTeacherGradeMN.Grade = chk5.Text;
                    ObjTeacherGradeMN.Seccion = chk5L.Text;
                    ObjTeacherGradeMN.Num_alumnos = Convert.ToInt32(txt5L.Text);
                    ObjTeacherGradeLN.insertTeacherGrade(ObjTeacherGradeMN);
                }
            }

            foreach (ListItem item in lblCursos.Items)
            {
                if (item.Selected == true)
                {
                    ObjTeacherCourseMN = new ModeloNegocio.TeacherCourse();
                    ObjTeacherCourseLN = new LogicaNegocio.TeacherCourse();

                    ObjTeacherCourseMN.UserTeacheId = idDocente;
                    ObjTeacherCourseMN.Course = item.Text;

                    ObjTeacherCourseLN.insertTeacherCourse(ObjTeacherCourseMN);

                }

            }

            foreach (ListItem item in lblTurnos.Items)
            {
                if (item.Selected == true)
                {
                    ObjTeacherTurnMN = new ModeloNegocio.TeacherTurn();
                    ObjTeacherTurnLN = new LogicaNegocio.TeacherTurn();

                    ObjTeacherTurnMN.UserTeacheId = idDocente;
                    ObjTeacherTurnMN.Turn = item.Text;

                    ObjTeacherTurnLN.insertTeacherTurn(ObjTeacherTurnMN);

                }

            }

            string strRedirect;
            strRedirect = "Admin-ListDocente.aspx?id=1";
            Response.Redirect(strRedirect, true);
        }
        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;

            }
        }