示例#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;
        }
示例#2
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;
        }
示例#3
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 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);
        }