protected void Page_Load(object sender, EventArgs e) { // if (!IsPostBack) { //Configurar Entradas //txtCodigo.Attributes["placeholder"] = "Ingrese Código"; //txtNombreEscuela.Attributes["placeholder"] = "Ingrese Nombres y Número de la Escuela"; //txtDireccion.Attributes["placeholder"] = "Ingrese Dirección"; //referencia.Attributes["placeholder"] = "Ingrese Referencia"; ObjDocenteLN = new LogicaNegocio.Docente(); ObjSchoolLN = new LogicaNegocio.School(); lblEscuelaACargo.DataSource = ObjSchoolLN.getAllSchool(); lblEscuelaACargo.DataValueField = "id"; lblEscuelaACargo.DataTextField = "nombre"; lblEscuelaACargo.DataBind(); //lblDocenteCaCargo.DataSource = ObjDocenteLN.getAllDocente(); //lblDocenteCaCargo.DataValueField = "id"; //lblDocenteCaCargo.DataTextField = "FullName"; //lblDocenteCaCargo.DataBind(); } //ScriptManager.RegisterStartupScript(this, GetType(), "YourChangeEventJS(ddl)", "alert(ddl.selectedIndex);", true); }
protected void Page_Load(object sender, EventArgs e) { LogicaNegocio.Docente users = new LogicaNegocio.Docente(); List<ModeloNegocio.Docente> listUsuario = new List<ModeloNegocio.Docente>(); //-------------Inicio Paginador UscPaginador.caragaPaginador(100, Convert.ToInt32(Request.Params["pagina"]), users.countRowsDocentes()); int NumRegistrosEmpezar = UscPaginador.RegistrosAEmpezar; //---------------Fin Paginador listUsuario = users.getAllDocente(100, UscPaginador.RegistrosAEmpezar); foreach (ModeloNegocio.Docente Docentes in listUsuario) { NumRegistrosEmpezar++; FilasListaDocente.Text += "<tr id='" + Docentes.School_id + "'>"; FilasListaDocente.Text += "<th scope=row>" + NumRegistrosEmpezar + "</th>"; FilasListaDocente.Text += "<td>" + Docentes.Codigo + "</td>"; FilasListaDocente.Text += "<td>" + Docentes.FullName + "</td>"; FilasListaDocente.Text += "<td>" + Docentes.FechaCreado + "</td>"; FilasListaDocente.Text += "<td>"; FilasListaDocente.Text += "<a href='" + "Admin-EditDocente.aspx?docente_id=" + Docentes.School_id + "&id=2'><span class='glyphicon glyphicon-pencil' aria-hidden='true' data-toggle='tooltip' data-placement='bottom' title='Editar Docente'></span></a>"; // FilasListaDocente.Text += "<a href='" + "#" + "'><span class='glyphicon glyphicon-user' aria-hidden='true' data-toggle='tooltip' data-placement='bottom' title='Ver datos de Asesor'></span></a>"; FilasListaDocente.Text += "<a href='" + "#" + "' onClick=\"javascript:showMyModalSetTitle('Eliminar', 'Está seguro que desea eliminar a <b>" + Docentes.FullName + "</b> ','" + Docentes.School_id + "')\"'><span class='glyphicon glyphicon-remove' aria-hidden='true' data-toggle='tooltip' data-placement='bottom' title='Eliminar Docente'></span></a>"; FilasListaDocente.Text += "<a href='" + "Admin-PasswordUser.aspx?id=2&user_id=" + Docentes.School_id + "&password=docente'><span class='glyphicon glyphicon-lock' aria-hidden='true' data-toggle='tooltip' data-placement='bottom' title='Cambiar/Editar Pasword'></span></a>"; FilasListaDocente.Text += "</td></tr>"; } }
protected void Page_Load(object sender, EventArgs e) { LogicaNegocio.Docente users = new LogicaNegocio.Docente(); List <ModeloNegocio.Docente> listUsuario = new List <ModeloNegocio.Docente>(); //-------------Inicio Paginador UscPaginador.caragaPaginador(100, Convert.ToInt32(Request.Params["pagina"]), users.countRowsDocentes()); int NumRegistrosEmpezar = UscPaginador.RegistrosAEmpezar; //---------------Fin Paginador listUsuario = users.getAllDocente(100, UscPaginador.RegistrosAEmpezar); foreach (ModeloNegocio.Docente Docentes in listUsuario) { NumRegistrosEmpezar++; FilasListaDocente.Text += "<tr id='" + Docentes.School_id + "'>"; FilasListaDocente.Text += "<th scope=row>" + NumRegistrosEmpezar + "</th>"; FilasListaDocente.Text += "<td>" + Docentes.Codigo + "</td>"; FilasListaDocente.Text += "<td>" + Docentes.FullName + "</td>"; FilasListaDocente.Text += "<td>" + Docentes.FechaCreado + "</td>"; FilasListaDocente.Text += "<td>"; FilasListaDocente.Text += "<a href='" + "Admin-EditDocente.aspx?docente_id=" + Docentes.School_id + "&id=2'><span class='glyphicon glyphicon-pencil' aria-hidden='true' data-toggle='tooltip' data-placement='bottom' title='Editar Docente'></span></a>"; // FilasListaDocente.Text += "<a href='" + "#" + "'><span class='glyphicon glyphicon-user' aria-hidden='true' data-toggle='tooltip' data-placement='bottom' title='Ver datos de Asesor'></span></a>"; FilasListaDocente.Text += "<a href='" + "#" + "' onClick=\"javascript:showMyModalSetTitle('Eliminar', 'Está seguro que desea eliminar a <b>" + Docentes.FullName + "</b> ','" + Docentes.School_id + "')\"'><span class='glyphicon glyphicon-remove' aria-hidden='true' data-toggle='tooltip' data-placement='bottom' title='Eliminar Docente'></span></a>"; FilasListaDocente.Text += "<a href='" + "Admin-PasswordUser.aspx?id=2&user_id=" + Docentes.School_id + "&password=docente'><span class='glyphicon glyphicon-lock' aria-hidden='true' data-toggle='tooltip' data-placement='bottom' title='Cambiar/Editar Pasword'></span></a>"; FilasListaDocente.Text += "</td></tr>"; } }
protected void Page_Load(object sender, EventArgs e) { LogicaNegocio.Docente profesor = new LogicaNegocio.Docente(); int cantidadDoc; cantidadDoc = profesor.countRowsDocentes(); lblNumDocentes.Text = Convert.ToString(cantidadDoc); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { var dateAsString = DateTime.Now.ToString("yyyy-MM-dd"); var timeAsString = DateTime.Now.ToString("hh:mm:ss"); txtFecha.Text = dateAsString.ToString(); //Configurar Entradas //txtCodigo.Attributes["placeholder"] = "Ingrese Código"; //txtNombreEscuela.Attributes["placeholder"] = "Ingrese Nombres y Número de la Escuela"; //txtDireccion.Attributes["placeholder"] = "Ingrese Dirección"; //referencia.Attributes["placeholder"] = "Ingrese Referencia"; ObjAsesorLN = new LogicaNegocio.Asesor(); ddlAsesor.DataSource = ObjAsesorLN.getAllAsesors(); ddlAsesor.DataValueField = "id"; ddlAsesor.DataTextField = "FullName"; ddlAsesor.DataBind(); ObjDocenteLN = new LogicaNegocio.Docente(); ddlDocente.DataSource = ObjDocenteLN.getAllDocente(); ddlDocente.DataValueField = "id"; ddlDocente.DataTextField = "FullName"; ddlDocente.DataBind(); ObjSchoolLN = new LogicaNegocio.School(); ddlSchool.DataSource = ObjSchoolLN.getAllSchool(); ddlSchool.DataValueField = "id"; ddlSchool.DataTextField = "Nombre"; ddlSchool.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { } LogicaNegocio.AconpanaClase aconpanaClase = new LogicaNegocio.AconpanaClase(); List <ModeloNegocio.AconpanaClase> listAconpanaClase = new List <ModeloNegocio.AconpanaClase>(); int NumRegistrosEmpezar; if (Request.Params["docente_id"] != null) { int docente_id = Convert.ToInt32(Request.Params["docente_id"]); NumRegistrosEmpezar = 0; listAconpanaClase = aconpanaClase.getAllAconpanaClasePorDocente(docente_id, 200, NumRegistrosEmpezar); } else { //-------------Inicio Paginador UscPaginador.caragaPaginador(100, Convert.ToInt32(Request.Params["pagina"]), aconpanaClase.countRowsAconpanaClase()); //---------------Fin Paginador NumRegistrosEmpezar = UscPaginador.RegistrosAEmpezar; listAconpanaClase = aconpanaClase.getAllAconpanaClase(100, UscPaginador.RegistrosAEmpezar); } foreach (ModeloNegocio.AconpanaClase Aconpana in listAconpanaClase) { ModeloNegocio.Asesor asesorMN = new ModeloNegocio.Asesor(); LogicaNegocio.Asesor asesorLN = new LogicaNegocio.Asesor(); ModeloNegocio.Docente docenteMN = new ModeloNegocio.Docente(); LogicaNegocio.Docente docenteLN = new LogicaNegocio.Docente(); asesorMN = asesorLN.getAsesorId(Aconpana.Asesor_id); docenteMN = docenteLN.getDocenteId(Aconpana.Docente_id); NumRegistrosEmpezar++; FilasLista.Text += "<tr id='" + Aconpana.Id + "'>"; FilasLista.Text += "<th scope=row>" + NumRegistrosEmpezar + "</th>"; FilasLista.Text += "<td>" + Aconpana.Id + "</td>"; FilasLista.Text += "<td>" + asesorMN.FullName + "</td>"; FilasLista.Text += "<td>" + docenteMN.FullName + "</td>"; FilasLista.Text += "<td>" + Aconpana.Fecha.ToString("dd-MM-yyyy") + "</td>"; FilasLista.Text += "<td>"; // FilasLista.Text += "<a href='" + "Admin-Segui.aspx?asesor_id=" + Aconpana.Id + "'><span class='glyphicon glyphicon-pencil' aria-hidden='true' data-toggle='tooltip' data-placement='bottom' title='Editar seguimiento a clase'></span></a>"; FilasLista.Text += "<a href='" + "Admin-SeguiViewClase.aspx?aconpana_id=" + Aconpana.Id + "&id=2'><span class='glyphicon glyphicon-zoom-in' aria-hidden='true' data-toggle='tooltip' data-placement='bottom' title='Ver seguimiento a clase'></span></a>"; FilasLista.Text += "<a href='" + "#" + "' onClick=\"javascript:showMyModalSetTitle('Eliminar', 'Está seguro que desea eliminar <b>" + Aconpana.Id_Tema_Nombre_sesion + "</b> ','" + Aconpana.Id + "')\"'><span class='glyphicon glyphicon-remove' aria-hidden='true' data-toggle='tooltip' data-placement='bottom' title='Eliminar seguimiento a clase'></span></a>"; FilasLista.Text += "</td></tr>"; } }
protected void btnSearch_Click(object sender, EventArgs e) { LogicaNegocio.Docente LNDocente = new LogicaNegocio.Docente(); ModeloNegocio.Docente MNDocente = new ModeloNegocio.Docente(); MNDocente=LNDocente.getDocenteCode(txtCodDocente.Text); string strRedirect; strRedirect = "Admin-SeguiClase.aspx?docente_id=" + MNDocente.id; Response.Redirect(strRedirect, true); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { AsesorMN = new ModeloNegocio.Asesor(); AsesorLN = new LogicaNegocio.Asesor(); if (Request.Params["asesor_id"] == "") { AsesorMN.id = Convert.ToInt32(30); } else { AsesorMN.id = Convert.ToInt32(Request.Params["asesor_id"]); } AsesorLN.getAsesor(ref AsesorMN); txtCodigo.Text = AsesorMN.Codigo; txtNombre.Text = AsesorMN.FullName; txtTelefono.Text = AsesorMN.Telefono; LogicaNegocio.School ObjSchoolLN = new LogicaNegocio.School(); lblEscuelaACargo.DataSource = ObjSchoolLN.getAllSchool(); lblEscuelaACargo.DataValueField = "id"; lblEscuelaACargo.DataTextField = "Nombre"; lblEscuelaACargo.DataBind(); int c = 0; foreach (ModeloNegocio.School listSchool in AsesorMN.Schools) { lblEscuelaACargo.Items.Insert(c, new ListItem(listSchool.Nombre, Convert.ToString(listSchool.id))); lblEscuelaACargo.Items[c].Selected = true; c = c + 1; } txtDocenteACargo.Text = Convert.ToString(c); LogicaNegocio.Docente ObjDocenteLN = new LogicaNegocio.Docente(); //lblDocenteCaCargo.DataSource = ObjDocenteLN.getAllDocente(); //lblDocenteCaCargo.DataValueField = "id"; //lblDocenteCaCargo.DataTextField = "FullName"; //lblDocenteCaCargo.DataBind(); c = 0; //foreach (ModeloNegocio.User listTeacher in AsesorMN.Teachers) //{ // lblDocenteCaCargo.Items.Insert(c, new ListItem(listTeacher.FullName, Convert.ToString(listTeacher.id))); // lblDocenteCaCargo.Items[c].Selected = true; // c = c + 1; //} //txtDocenteACargo.Text = Convert.ToString(c); ListItem item = ddlGrupo.Items.FindByText(AsesorMN.Grupo); if (item != null) { item.Selected = true; } } }
protected void btnReport_Click(object sender, EventArgs e) { LogicaNegocio.Docente docente = new LogicaNegocio.Docente(); // List<ModeloNegocio.Asesor> listUsuario = new List<ModeloNegocio.Asesor>(); // NOW ASSIGN DATA TO A DATAGRID. DataGrid dg = new DataGrid(); dg.DataSource = docente.getReportAllDocente(); dg.DataBind(); // THE EXCEL FILE. string sFileName = "Docente-" + System.DateTime.Now.Date + "-.xls"; sFileName = sFileName.Replace("/", ""); // SEND OUTPUT TO THE CLIENT MACHINE USING "RESPONSE OBJECT". Encoding encoding = Encoding.UTF8; Response.ClearContent(); Response.Buffer = true; //Response.Charset = encoding.EncodingName; //Response.ContentEncoding = System.Text.Encoding.UTF8; Response.Charset = encoding.EncodingName; Response.ContentEncoding = System.Text.Encoding.GetEncoding("Windows-1252"); Response.AddHeader("content-disposition", "attachment; filename=" + sFileName); Response.ContentType = "application/vnd.ms-excel"; //Response.ContentType = "application/application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; //Response.AppendHeader("content-disposition", "attachment; filename=myfile.xlsx"); EnableViewState = false; System.IO.StringWriter objSW = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter objHTW = new System.Web.UI.HtmlTextWriter(objSW); dg.HeaderStyle.Font.Bold = true; // SET EXCEL HEADERS AS BOLD. dg.HeaderStyle.ForeColor = Color.White; dg.HeaderStyle.BackColor = Color.Blue; dg.RenderControl(objHTW); // STYLE THE SHEET AND WRITE DATA TO IT. Response.Write("<style> TABLE { border:solid 1px #999; } " + "TD { border:solid 1px #000000; text-align:center } </style>"); Response.Write(objSW.ToString()); // ADD A ROW AT THE END OF THE SHEET SHOWING A RUNNING TOTAL OF PRICE. //Response.Write("<table><tr><td><b>Total: </b></td><td></td><td><b>" + //dTotalPrice.ToString("N2") + "</b></td></tr></table>"); Response.End(); }
protected void btnSearch_Click(object sender, EventArgs e) { LogicaNegocio.Docente LNDocente = new LogicaNegocio.Docente(); ModeloNegocio.Docente MNDocente = new ModeloNegocio.Docente(); MNDocente = LNDocente.getDocenteCode(txtCodDocente.Text); string strRedirect; strRedirect = "Admin-SeguiClase.aspx?docente_id=" + MNDocente.id; Response.Redirect(strRedirect, true); }
protected void Page_Load(object sender, EventArgs e) { DataTable NumSchoolForUgel, NumTeachersForSchool, NumStudentsForSchool; double NumColegios, NumTeacherSchool, PorcTeaher, NumColUgel, PorcUgel, NumStudentsSchool, PorcStudents, TotalTeachers, TotalStudents; LogicaNegocio.School colegios = new LogicaNegocio.School(); LogicaNegocio.Docente docentes = new LogicaNegocio.Docente(); LogicaNegocio.UserSchool userSchool = new LogicaNegocio.UserSchool(); NumColegios = colegios.countRowsSchool(); TotalTeachers = docentes.countRowsDocentes(); TotalStudents = docentes.countRowsStudents(); lblNumColegios.Text = Convert.ToString(NumColegios); lblCountTeachers.Text = Convert.ToString(TotalTeachers); lblCountStudents.Text = Convert.ToString(TotalStudents); NumSchoolForUgel = colegios.countSchoolForUgel(); foreach (DataRow fila in NumSchoolForUgel.Rows) { NumColUgel = Convert.ToInt32(fila["Num_Cole"]); PorcUgel = (NumColUgel / NumColegios) * 100; lblNumSchoolForUgel.Text += "<tr>"; lblNumSchoolForUgel.Text += "<td>" + fila["NombUgel"].ToString() + "</td>"; lblNumSchoolForUgel.Text += "<td>" + fila["Num_Cole"].ToString() + "</td>"; lblNumSchoolForUgel.Text += "<td>" + String.Format("{0:0.00}", PorcUgel) + "</td>"; lblNumSchoolForUgel.Text += "</tr>"; } NumTeachersForSchool = userSchool.countTeacherForSchool(); foreach (DataRow fila0 in NumTeachersForSchool.Rows) { NumTeacherSchool = Convert.ToInt32(fila0["Num_teacher"]); PorcTeaher = (NumTeacherSchool / TotalTeachers) * 100; lblNumTeacherForSchool.Text += "<tr>"; lblNumTeacherForSchool.Text += "<td>" + fila0["codigo"].ToString() + "</td>"; lblNumTeacherForSchool.Text += "<td>" + fila0["nombre"].ToString() + "</td>"; lblNumTeacherForSchool.Text += "<td>" + fila0["Num_teacher"].ToString() + "</td>"; lblNumTeacherForSchool.Text += "<td>" + String.Format("{0:0.00}", PorcTeaher) + "</td>"; lblNumTeacherForSchool.Text += "</tr>"; } NumStudentsForSchool = colegios.countStudentsForSchool(); foreach (DataRow fila00 in NumStudentsForSchool.Rows) { NumStudentsSchool = Convert.ToInt32(fila00["num_alum_sec"]); PorcStudents = (NumStudentsSchool / TotalStudents) * 100; lblNumStudentsForSchool.Text += "<tr>"; lblNumStudentsForSchool.Text += "<td>" + fila00["codigo"].ToString() + "</td>"; lblNumStudentsForSchool.Text += "<td>" + fila00["nombre"].ToString() + "</td>"; lblNumStudentsForSchool.Text += "<td>" + fila00["num_alum_sec"].ToString() + "</td>"; lblNumStudentsForSchool.Text += "<td>" + String.Format("{0:0.00}", PorcStudents) + "</td>"; lblNumStudentsForSchool.Text += "</tr>"; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { visitaMN = new ModeloNegocio.VisitaIE(); visitaLN = new LogicaNegocio.VisitaIE(); visitaMN.Id = Convert.ToInt32(Request.Params["visita_id"]); visitaMN = visitaLN.getVisitaId(visitaMN.Id); txtFecha.Text = visitaMN.Fecha.ToString("yyyy-MM-dd"); asesorLN = new LogicaNegocio.Asesor(); asesorMN = new ModeloNegocio.Asesor(); asesorMN = asesorLN.getAsesorId(visitaMN.Asesor_id); txtAsesor.Text = asesorMN.FullName; directorLN = new LogicaNegocio.Director(); directorMN = new ModeloNegocio.Director(); directorMN = directorLN.getDirectorId(visitaMN.Director_id); txtDirector.Text = directorMN.FullName; docenteLN = new LogicaNegocio.Docente(); docenteMN = new ModeloNegocio.Docente(); docenteMN = docenteLN.getDocenteId(visitaMN.Docente_id); txtDocente.Text = docenteMN.FullName; schoolLN = new LogicaNegocio.School(); schoolMN = new ModeloNegocio.School(); //schoolMN = schoolLN.getDocenteId(visitaMN.Docente_id); schoolMN = schoolLN.getSchool(visitaMN.School_id); txtSchool.Text = schoolMN.Nombre.ToString(); txtMotivoVisita.Text = visitaMN.MotivoVisita; txtObservacion.Text = visitaMN.Observacion; TxtPendientes.Text = visitaMN.Pendientes; } }
protected void cmdGuardar_Click(object sender, EventArgs e) { ModeloNegocio.Docente ObjDocenteMN; LogicaNegocio.Docente ObjDocenteLN; ObjDocenteMN = new ModeloNegocio.Docente(); ObjDocenteLN = new LogicaNegocio.Docente(); int idDocente = Convert.ToInt32(Request.Params["director_id"]); ObjDocenteMN.id = idDocente; ObjDocenteMN.Codigo = txtCodigo.Text; ObjDocenteMN.FullName = txtNombreApellido.Text; ObjDocenteMN.Email = txtCorreo.Text; ObjDocenteMN.Type = 8; ObjDocenteMN.Telefono = txtTelefono.Text; ObjDocenteMN.TypeContract = ""; //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); string strRedirect; strRedirect = "Admin-ListDirector.aspx?id=4"; Response.Redirect(strRedirect, true); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { visitaMN = new ModeloNegocio.VisitaIE(); visitaLN = new LogicaNegocio.VisitaIE(); visitaMN.Id = Convert.ToInt32(Request.Params["visita_id"]); visitaMN = visitaLN.getVisitaId(visitaMN.Id); txtFecha.Text = visitaMN.Fecha.ToString("yyyy-MM-dd"); asesorLN = new LogicaNegocio.Asesor(); asesorMN = new ModeloNegocio.Asesor(); asesorMN = asesorLN.getAsesorId(visitaMN.Asesor_id); txtAsesor.Text = asesorMN.FullName; directorLN = new LogicaNegocio.Director(); directorMN = new ModeloNegocio.Director(); directorMN=directorLN.getDirectorId(visitaMN.Director_id); txtDirector.Text = directorMN.FullName; docenteLN = new LogicaNegocio.Docente(); docenteMN = new ModeloNegocio.Docente(); docenteMN = docenteLN.getDocenteId(visitaMN.Docente_id); txtDocente.Text = docenteMN.FullName; schoolLN = new LogicaNegocio.School(); schoolMN = new ModeloNegocio.School(); //schoolMN = schoolLN.getDocenteId(visitaMN.Docente_id); schoolMN = schoolLN.getSchool(visitaMN.School_id); txtSchool.Text = schoolMN.Nombre.ToString(); txtMotivoVisita.Text = visitaMN.MotivoVisita; txtObservacion.Text = visitaMN.Observacion; TxtPendientes.Text = visitaMN.Pendientes; } }
protected void Page_Load(object sender, EventArgs e) { DataTable NumSchoolForAsesor; int idAsesor, TotalTeachers; double NumColegios, NumColAsesor, PorcColegios, NumTeachers, PorcTeachers; LogicaNegocio.UserSchool userSchools = new LogicaNegocio.UserSchool(); LogicaNegocio.School colegios = new LogicaNegocio.School(); LogicaNegocio.Docente docentes = new LogicaNegocio.Docente(); TotalTeachers = docentes.countRowsDocentes(); NumColegios = colegios.countRowsSchool(); lblNumColegios.Text = Convert.ToString(NumColegios); NumSchoolForAsesor = colegios.countSchoolForAsesor(); foreach (DataRow fila1 in NumSchoolForAsesor.Rows) { NumColAsesor = Convert.ToInt32(fila1["NUMERO_ESCUELAS"]); PorcColegios = (NumColAsesor / NumColegios) * 100; lblNumSchoolForAsesor.Text += "<tr>"; lblNumSchoolForAsesor.Text += "<td>" + fila1["ASESOR"].ToString() + "</td>"; lblNumSchoolForAsesor.Text += "<td>" + fila1["NUMERO_ESCUELAS"].ToString() + "</td>"; lblNumSchoolForAsesor.Text += "<td>" + String.Format("{0:0.00}", PorcColegios) + "</td>"; lblNumSchoolForAsesor.Text += "</tr>"; } lblCountTeachers.Text = Convert.ToString(TotalTeachers); foreach (DataRow fila1 in NumSchoolForAsesor.Rows) { idAsesor = Convert.ToInt32(fila1["id"]); NumTeachers = userSchools.getCountTeachersForIdAsesor(idAsesor); PorcTeachers = (NumTeachers / TotalTeachers) * 100; lblNumTeacherForAsesor.Text += "<tr>"; lblNumTeacherForAsesor.Text += "<td>" + fila1["ASESOR"].ToString() + "</td>"; lblNumTeacherForAsesor.Text += "<td>" + NumTeachers.ToString() + "</td>"; lblNumTeacherForAsesor.Text += "<td>" + String.Format("{0:0.00}", PorcTeachers) + "</td>"; lblNumTeacherForAsesor.Text += "</tr>"; } }
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["subdirector_id"]); ObjDocenteMN.id = idDocente; ObjDocenteMN.Codigo = txtCodigo.Text; ObjDocenteMN.FullName = txtNombreApellido.Text; ObjDocenteMN.Email = txtCorreo.Text; ObjDocenteMN.Type = 9; ObjDocenteMN.Telefono = txtTelefono.Text; ObjDocenteMN.TypeContract = ""; //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); string strRedirect; strRedirect = "Admin-ListSubDirector.aspx?id=5"; Response.Redirect(strRedirect, true); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { microredMN = new ModeloNegocio.Microred(); microredLN = new LogicaNegocio.Microred(); int microred_id = Convert.ToInt32(Request.Params["microred_id"]); microredMN = microredLN.getMicroredId(microred_id); txtFecha.Text = microredMN.Fecha.ToString("yyyy-MM-dd"); asesorLN = new LogicaNegocio.Asesor(); asesorMN = new ModeloNegocio.Asesor(); asesorMN = asesorLN.getAsesorId(microredMN.User_id); txtAsesor.Text = asesorMN.FullName; microredDocenteMN = new ModeloNegocio.MicroredDocente(); microredDocenteLN = new LogicaNegocio.MicroredDocente(); List<ModeloNegocio.MicroredDocente> listaMicroredDocente =new List<ModeloNegocio.MicroredDocente>(); listaMicroredDocente = microredDocenteLN.getAllMicroredDocenteForIdMicrored(microred_id); foreach (ModeloNegocio.MicroredDocente microredDocente in listaMicroredDocente) { docenteLN = new LogicaNegocio.Docente(); docenteMN = new ModeloNegocio.Docente(); docenteMN = docenteLN.getDocenteId(microredDocente.Docente_id); ddlDocente.Items.Add(new ListItem(docenteMN.FullName,docenteMN.id.ToString() )); } microredSchoolMN = new ModeloNegocio.MicroredSchool(); microredSchoolLN = new LogicaNegocio.MicroredSchool(); List<ModeloNegocio.MicroredSchool> listaMicroredSchool = new List<ModeloNegocio.MicroredSchool>(); listaMicroredSchool = microredSchoolLN.getAllMicroredSchoolForIdMicrored(microred_id); foreach (ModeloNegocio.MicroredSchool microredSchool in listaMicroredSchool) { schoolLN = new LogicaNegocio.School(); schoolMN = new ModeloNegocio.School(); schoolMN = schoolLN.getSchool(microredSchool.School_id); ddlSchool.Items.Add(new ListItem(schoolMN.Nombre, schoolMN.id.ToString())); } txtMircrored.Text = microredMN.MicroredName; txtSesion.Text = microredMN.Lugar_sesion; txtInicio.Text = microredMN.H_inicio.ToString("hh:mm:ss"); txtTermino.Text = microredMN.H_termino.ToString("hh:mm:ss"); txtParticipante.Text = Convert.ToString(microredMN.Num_participantes); txtEducacion.Text = microredMN.Educ_financiera; txtEnfoque.Text = microredMN.Enfoques_edu; txtProgramacion.Text = microredMN.Programacion_ped; txtHabilidades.Text = microredMN.Habilidad_ped; txtTrabajo.Text = microredMN.Trabajo_grupal; txtParticipativo.Text = microredMN.Participativo; txtExpositivo.Text = microredMN.Expositivo; txtDinamicas.Text = microredMN.Dinamicas_ludicas; txtRecursos.Text = microredMN.Recursos_informaticos; txtAudiovisuales.Text = microredMN.Recursos_audiovisuales; txtMateriales.Text = microredMN.Materiales_didaticos; txtObservacion.Text = microredMN.Observacion; } }
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); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { AsesorMN = new ModeloNegocio.Asesor(); AsesorLN = new LogicaNegocio.Asesor(); if (Request.Params["asesor_id"] == "") { AsesorMN.id = Convert.ToInt32(30); } else { AsesorMN.id = Convert.ToInt32(Request.Params["asesor_id"]); } AsesorLN.getAsesor(ref AsesorMN); txtCodigo.Text = AsesorMN.Codigo; txtNombre.Text = AsesorMN.FullName; txtTelefono.Text = AsesorMN.Telefono; LogicaNegocio.School ObjSchoolLN = new LogicaNegocio.School(); lblEscuelaACargo.DataSource = ObjSchoolLN.getAllSchool(); lblEscuelaACargo.DataValueField = "id"; lblEscuelaACargo.DataTextField = "Nombre"; lblEscuelaACargo.DataBind(); int c=0; foreach(ModeloNegocio.School listSchool in AsesorMN.Schools) { lblEscuelaACargo.Items.Insert(c, new ListItem(listSchool.Nombre, Convert.ToString(listSchool.id))); lblEscuelaACargo.Items[c].Selected = true; c = c + 1; } txtDocenteACargo.Text = Convert.ToString(c); LogicaNegocio.Docente ObjDocenteLN = new LogicaNegocio.Docente(); //lblDocenteCaCargo.DataSource = ObjDocenteLN.getAllDocente(); //lblDocenteCaCargo.DataValueField = "id"; //lblDocenteCaCargo.DataTextField = "FullName"; //lblDocenteCaCargo.DataBind(); c = 0; //foreach (ModeloNegocio.User listTeacher in AsesorMN.Teachers) //{ // lblDocenteCaCargo.Items.Insert(c, new ListItem(listTeacher.FullName, Convert.ToString(listTeacher.id))); // lblDocenteCaCargo.Items[c].Selected = true; // c = c + 1; //} //txtDocenteACargo.Text = Convert.ToString(c); ListItem item = ddlGrupo.Items.FindByText(AsesorMN.Grupo); if (item != null) { item.Selected = true; } } }
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); } }
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) { DocenteMN = new ModeloNegocio.Docente(); DocenteLN = new LogicaNegocio.Docente(); DocenteMN.id = Convert.ToInt32(Request.Params["docente_id"]); DocenteLN.getDocente(ref DocenteMN); txtCodigo.Text = DocenteMN.Codigo; txtNombreApellido.Text = DocenteMN.FullName; txtCorreo.Text = DocenteMN.Email; txtTelefono.Text = DocenteMN.Telefono; txtCorreo.Text = DocenteMN.Email; ObjSchoolLN = new LogicaNegocio.School(); ddlEscuela.DataSource = ObjSchoolLN.getAllSchoolNoSelect(); ddlEscuela.DataValueField = "id"; ddlEscuela.DataTextField = "nombre"; ddlEscuela.DataBind(); ListItem item = ddlEscuela.Items.FindByValue(Convert.ToString(DocenteMN.School_id)); if (item != null) { item.Selected = true; } List<String> secciones = new List<string>(); List<String> cursos = new List<string>(); List<String> turnos = new List<string>(); secciones.Add("1ro. de Secundaria"); secciones.Add("2do. de Secundaria"); secciones.Add("3ro. de Secundaria"); secciones.Add("4to. de Secundaria"); secciones.Add("5to. de Secundaria"); //lblGradosaCargo.DataSource = secciones; //lblGradosaCargo.DataBind(); ListItem item1; foreach (ModeloNegocio.TeacherGrade listTeachGrad in DocenteMN.TeacherGrade) { //item1 = lblGradosaCargo.Items.FindByText(listTeachGrad.Grade); //if (item1 != null) //{ // item1.Selected = true; //} if (listTeachGrad.Grade == chk1.Text) { chk1.Checked = true; if (listTeachGrad.Seccion == chk1A.Text) { chk1A.Checked = true; txt1A.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk1B.Text) { chk1B.Checked = true; txt1B.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk1C.Text) { chk1C.Checked = true; txt1C.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk1D.Text) { chk1D.Checked = true; txt1D.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk1E.Text) { chk1E.Checked = true; txt1E.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk1F.Text) { chk1F.Checked = true; txt1F.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk1G.Text) { chk1G.Checked = true; txt1G.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk1H.Text) { chk1H.Checked = true; txt1H.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk1I.Text) { chk1I.Checked = true; txt1I.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk1J.Text) { chk1J.Checked = true; txt1J.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk1K.Text) { chk1K.Checked = true; txt1K.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk1L.Text) { chk1L.Checked = true; txt1L.Text = listTeachGrad.Num_alumnos.ToString(); } } if (listTeachGrad.Grade == chk2.Text) { chk2.Checked = true; if (listTeachGrad.Seccion == chk2A.Text) { chk2A.Checked = true; txt2A.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk2B.Text) { chk2B.Checked = true; txt2B.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk2C.Text) { chk2C.Checked = true; txt2C.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk2D.Text) { chk2D.Checked = true; txt2D.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk2E.Text) { chk2E.Checked = true; txt2E.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk2F.Text) { chk2F.Checked = true; txt2F.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk2G.Text) { chk2G.Checked = true; txt2G.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk2H.Text) { chk2H.Checked = true; txt2H.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk2I.Text) { chk2I.Checked = true; txt2I.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk2J.Text) { chk2J.Checked = true; txt2J.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk2K.Text) { chk2K.Checked = true; txt2K.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk2L.Text) { chk2L.Checked = true; txt2L.Text = listTeachGrad.Num_alumnos.ToString(); } } if (listTeachGrad.Grade == chk3.Text) { chk3.Checked = true; if (listTeachGrad.Seccion == chk3A.Text) { chk3A.Checked = true; txt3A.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk3B.Text) { chk3B.Checked = true; txt3B.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk3C.Text) { chk3C.Checked = true; txt3C.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk3D.Text) { chk3D.Checked = true; txt3D.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk3E.Text) { chk3E.Checked = true; txt3E.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk3F.Text) { chk3F.Checked = true; txt3F.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk3G.Text) { chk3G.Checked = true; txt3G.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk3H.Text) { chk3H.Checked = true; txt3H.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk3I.Text) { chk3I.Checked = true; txt3I.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk3J.Text) { chk3J.Checked = true; txt3J.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk3K.Text) { chk3K.Checked = true; txt3K.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk3L.Text) { chk3L.Checked = true; txt3L.Text = listTeachGrad.Num_alumnos.ToString(); } } if (listTeachGrad.Grade == chk4.Text) { chk4.Checked = true; if (listTeachGrad.Seccion == chk4A.Text) { chk4A.Checked = true; txt4A.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk4B.Text) { chk4B.Checked = true; txt4B.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk4C.Text) { chk4C.Checked = true; txt4C.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk4D.Text) { chk4D.Checked = true; txt4D.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk4E.Text) { chk4E.Checked = true; txt4E.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk4F.Text) { chk4F.Checked = true; txt4F.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk4G.Text) { chk4G.Checked = true; txt4G.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk4H.Text) { chk4H.Checked = true; txt4H.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk4I.Text) { chk4I.Checked = true; txt4I.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk4J.Text) { chk4J.Checked = true; txt4J.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk4K.Text) { chk4K.Checked = true; txt4K.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk4L.Text) { chk4L.Checked = true; txt4L.Text = listTeachGrad.Num_alumnos.ToString(); } } if (listTeachGrad.Grade == chk5.Text) { chk5.Checked = true; if (listTeachGrad.Seccion == chk5A.Text) { chk5A.Checked = true; txt5A.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk5B.Text) { chk5B.Checked = true; txt5B.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk5C.Text) { chk5C.Checked = true; txt5C.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk5D.Text) { chk5D.Checked = true; txt5D.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk5E.Text) { chk5E.Checked = true; txt5E.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk5F.Text) { chk5F.Checked = true; txt5F.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk5G.Text) { chk5G.Checked = true; txt5G.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk5H.Text) { chk5H.Checked = true; txt5H.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk5I.Text) { chk5I.Checked = true; txt5I.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk5J.Text) { chk5J.Checked = true; txt5J.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk5K.Text) { chk5K.Checked = true; txt5K.Text = listTeachGrad.Num_alumnos.ToString(); } if (listTeachGrad.Seccion == chk5L.Text) { chk5L.Checked = true; txt5L.Text = listTeachGrad.Num_alumnos.ToString(); } } } ListItem item2 = ddlContrato.Items.FindByText(Convert.ToString(DocenteMN.TypeContract)); if (item2 != null) { item2.Selected = true; } cursos.Add("Historia, Geografía y Economía (HGE)"); cursos.Add("Educación para el Trabajo (EPT)"); cursos.Add("Matemáticas"); cursos.Add("Otros"); lblCursos.DataSource = cursos; lblCursos.DataBind(); ListItem item3; foreach (ModeloNegocio.TeacherCourse listTeachCours in DocenteMN.TeacherCourses) { item3 = lblCursos.Items.FindByText(listTeachCours.Course); if (item3 != null) { item3.Selected = true; } } turnos.Add("Mañana"); turnos.Add("Tarde"); lblTurnos.DataSource = turnos; lblTurnos.DataBind(); ListItem item4; foreach (ModeloNegocio.TeacherTurn listTeachTurns in DocenteMN.TeacherTurns) { item4 = lblTurnos.Items.FindByText(listTeachTurns.Turn); if (item4 != null) { item4.Selected = true; } } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { } LogicaNegocio.AconpanaClase aconpanaClase = new LogicaNegocio.AconpanaClase(); List<ModeloNegocio.AconpanaClase> listAconpanaClase = new List<ModeloNegocio.AconpanaClase>(); int NumRegistrosEmpezar; if (Request.Params["docente_id"]!= null) { int docente_id = Convert.ToInt32(Request.Params["docente_id"]); NumRegistrosEmpezar = 0; listAconpanaClase = aconpanaClase.getAllAconpanaClasePorDocente(docente_id, 200, NumRegistrosEmpezar); } else { //-------------Inicio Paginador UscPaginador.caragaPaginador(100, Convert.ToInt32(Request.Params["pagina"]), aconpanaClase.countRowsAconpanaClase()); //---------------Fin Paginador NumRegistrosEmpezar = UscPaginador.RegistrosAEmpezar; listAconpanaClase = aconpanaClase.getAllAconpanaClase(100, UscPaginador.RegistrosAEmpezar); } foreach (ModeloNegocio.AconpanaClase Aconpana in listAconpanaClase) { ModeloNegocio.Asesor asesorMN = new ModeloNegocio.Asesor(); LogicaNegocio.Asesor asesorLN = new LogicaNegocio.Asesor(); ModeloNegocio.Docente docenteMN = new ModeloNegocio.Docente(); LogicaNegocio.Docente docenteLN = new LogicaNegocio.Docente(); asesorMN = asesorLN.getAsesorId(Aconpana.Asesor_id); docenteMN = docenteLN.getDocenteId(Aconpana.Docente_id); NumRegistrosEmpezar++; FilasLista.Text += "<tr id='" + Aconpana.Id + "'>"; FilasLista.Text += "<th scope=row>" + NumRegistrosEmpezar + "</th>"; FilasLista.Text += "<td>" + Aconpana.Id + "</td>"; FilasLista.Text += "<td>" + asesorMN.FullName + "</td>"; FilasLista.Text += "<td>" + docenteMN.FullName + "</td>"; FilasLista.Text += "<td>" + Aconpana.Fecha.ToString("dd-MM-yyyy") + "</td>"; FilasLista.Text += "<td>"; // FilasLista.Text += "<a href='" + "Admin-Segui.aspx?asesor_id=" + Aconpana.Id + "'><span class='glyphicon glyphicon-pencil' aria-hidden='true' data-toggle='tooltip' data-placement='bottom' title='Editar seguimiento a clase'></span></a>"; FilasLista.Text += "<a href='" + "Admin-SeguiViewClase.aspx?aconpana_id=" + Aconpana.Id + "&id=2'><span class='glyphicon glyphicon-zoom-in' aria-hidden='true' data-toggle='tooltip' data-placement='bottom' title='Ver seguimiento a clase'></span></a>"; FilasLista.Text += "<a href='" + "#" + "' onClick=\"javascript:showMyModalSetTitle('Eliminar', 'Está seguro que desea eliminar <b>" + Aconpana.Id_Tema_Nombre_sesion + "</b> ','" + Aconpana.Id + "')\"'><span class='glyphicon glyphicon-remove' aria-hidden='true' data-toggle='tooltip' data-placement='bottom' title='Eliminar seguimiento a clase'></span></a>"; FilasLista.Text += "</td></tr>"; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { aconpanaClaseMN = new ModeloNegocio.AconpanaClase(); aconpanaClaseLN = new LogicaNegocio.AconpanaClase(); int aconpana_id = Convert.ToInt32(Request.Params["aconpana_id"]); aconpanaClaseMN = aconpanaClaseLN.getAconpanaClaseId(aconpana_id); txtFecha.Text = aconpanaClaseMN.Fecha.ToString("yyyy-MM-dd"); asesorLN = new LogicaNegocio.Asesor(); asesorMN = new ModeloNegocio.Asesor(); asesorMN = asesorLN.getAsesorId(aconpanaClaseMN.Asesor_id); txtAsesor.Text = asesorMN.FullName; docenteLN = new LogicaNegocio.Docente(); docenteMN = new ModeloNegocio.Docente(); docenteMN = docenteLN.getDocenteId(aconpanaClaseMN.Docente_id); txtDocente.Text = docenteMN.FullName; schoolLN = new LogicaNegocio.School(); schoolMN = new ModeloNegocio.School(); //schoolMN = schoolLN.getDocenteId(visitaMN.Docente_id); schoolMN = schoolLN.getSchool(aconpanaClaseMN.School_id); txtSchool.Text = schoolMN.Nombre.ToString(); teacherGradeLN = new LogicaNegocio.TeacherGrade(); teacherGradeMN = new ModeloNegocio.TeacherGrade(); teacherGradeMN = teacherGradeLN.getTeacherGradeId(Convert.ToInt32(aconpanaClaseMN.Id_Grado_seccion)); if (teacherGradeMN.Grade == null) teacherGradeMN.Grade = ""; if (teacherGradeMN.Seccion == null) teacherGradeMN.Seccion = ""; txtGradoSeccion.Text = "Grado: " + teacherGradeMN.Grade.ToString() + " Seccion: " + teacherGradeMN.Seccion.ToString(); temaLN = new LogicaNegocio.Tema(); temaMN = new ModeloNegocio.Tema(); temaMN = temaLN.getTemaId(Convert.ToInt32(aconpanaClaseMN.Id_Tema_Nombre_sesion)); txtNombSesion.Text = temaMN.Name; sesionLN = new LogicaNegocio.Sesion(); sesionMN = new ModeloNegocio.Sesion(); sesionMN = sesionLN.getSesionId(Convert.ToInt32(aconpanaClaseMN.Id_sesion)); txtNumSesion.Text = sesionMN.NumSesion; txtEstidianteAsistentes.Text = aconpanaClaseMN.Num_estudiante.ToString(); if(aconpanaClaseMN.Sesion_planificado == 0) { txtSesionPlanificado.Text = "No"; txtMotivo.Text = aconpanaClaseMN.Motivo; } else if(aconpanaClaseMN.Sesion_planificado == 1) { txtSesionPlanificado.Text = "Si"; } if (aconpanaClaseMN.Desarrollo_innovacion == 0) { txtInnovacion.Text = "No"; } else if (aconpanaClaseMN.Desarrollo_innovacion == 1) { txtInnovacion.Text = "Si"; } txtRecursosInformáticos.Text = aconpanaClaseMN.Recursos_informaticos; txtRecursosAudiovisuales.Text = aconpanaClaseMN.Recursos_audiovisuales; txtMaterialesDidactico.Text = aconpanaClaseMN.Materiales_didacticos; txtDinamicasUsadas.Text = aconpanaClaseMN.Dinamicas_utilizadas; TxtOtros.Text = aconpanaClaseMN.Otros; if (aconpanaClaseMN.Asesor_intervino == 0) { txtIntervino.Text = "No"; } else if (aconpanaClaseMN.Desarrollo_innovacion == 1) { txtIntervino.Text = "Si"; } txtComoIntervinoSesion.Text = aconpanaClaseMN.Como_intervino; if (aconpanaClaseMN.Intervencion_colaboradores == 0) { txtOtrosColaboradores.Text = "No"; } else if (aconpanaClaseMN.Intervencion_colaboradores == 1) { txtOtrosColaboradores.Text = "Si"; } txtQuien.Text = aconpanaClaseMN.Colaborador; txtComoIntervino.Text = aconpanaClaseMN.Como_intervino; if (aconpanaClaseMN.Participa_juego == 0) { txtParticipaJuego.Text = "No"; } else if (aconpanaClaseMN.Participa_juego == 1) { txtParticipaJuego.Text = "Si"; } txtEtapa.Text = aconpanaClaseMN.Etapa; txtRazon.Text = aconpanaClaseMN.Razon; txtIncidencia.Text = aconpanaClaseMN.Incidencia; //txtMotivoVisita.Text = visitaMN.MotivoVisita; //txtObservacion.Text = visitaMN.Observacion; //TxtPendientes.Text = visitaMN.Pendientes; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { aconpanaClaseMN = new ModeloNegocio.AconpanaClase(); aconpanaClaseLN = new LogicaNegocio.AconpanaClase(); int aconpana_id = Convert.ToInt32(Request.Params["aconpana_id"]); aconpanaClaseMN = aconpanaClaseLN.getAconpanaClaseId(aconpana_id); txtFecha.Text = aconpanaClaseMN.Fecha.ToString("yyyy-MM-dd"); asesorLN = new LogicaNegocio.Asesor(); asesorMN = new ModeloNegocio.Asesor(); asesorMN = asesorLN.getAsesorId(aconpanaClaseMN.Asesor_id); txtAsesor.Text = asesorMN.FullName; docenteLN = new LogicaNegocio.Docente(); docenteMN = new ModeloNegocio.Docente(); docenteMN = docenteLN.getDocenteId(aconpanaClaseMN.Docente_id); txtDocente.Text = docenteMN.FullName; schoolLN = new LogicaNegocio.School(); schoolMN = new ModeloNegocio.School(); //schoolMN = schoolLN.getDocenteId(visitaMN.Docente_id); schoolMN = schoolLN.getSchool(aconpanaClaseMN.School_id); txtSchool.Text = schoolMN.Nombre.ToString(); teacherGradeLN = new LogicaNegocio.TeacherGrade(); teacherGradeMN = new ModeloNegocio.TeacherGrade(); teacherGradeMN = teacherGradeLN.getTeacherGradeId(Convert.ToInt32(aconpanaClaseMN.Id_Grado_seccion)); if (teacherGradeMN.Grade == null) { teacherGradeMN.Grade = ""; } if (teacherGradeMN.Seccion == null) { teacherGradeMN.Seccion = ""; } txtGradoSeccion.Text = "Grado: " + teacherGradeMN.Grade.ToString() + " Seccion: " + teacherGradeMN.Seccion.ToString(); temaLN = new LogicaNegocio.Tema(); temaMN = new ModeloNegocio.Tema(); temaMN = temaLN.getTemaId(Convert.ToInt32(aconpanaClaseMN.Id_Tema_Nombre_sesion)); txtNombSesion.Text = temaMN.Name; sesionLN = new LogicaNegocio.Sesion(); sesionMN = new ModeloNegocio.Sesion(); sesionMN = sesionLN.getSesionId(Convert.ToInt32(aconpanaClaseMN.Id_sesion)); txtNumSesion.Text = sesionMN.NumSesion; txtEstidianteAsistentes.Text = aconpanaClaseMN.Num_estudiante.ToString(); if (aconpanaClaseMN.Sesion_planificado == 0) { txtSesionPlanificado.Text = "No"; txtMotivo.Text = aconpanaClaseMN.Motivo; } else if (aconpanaClaseMN.Sesion_planificado == 1) { txtSesionPlanificado.Text = "Si"; } if (aconpanaClaseMN.Desarrollo_innovacion == 0) { txtInnovacion.Text = "No"; } else if (aconpanaClaseMN.Desarrollo_innovacion == 1) { txtInnovacion.Text = "Si"; } txtRecursosInformáticos.Text = aconpanaClaseMN.Recursos_informaticos; txtRecursosAudiovisuales.Text = aconpanaClaseMN.Recursos_audiovisuales; txtMaterialesDidactico.Text = aconpanaClaseMN.Materiales_didacticos; txtDinamicasUsadas.Text = aconpanaClaseMN.Dinamicas_utilizadas; TxtOtros.Text = aconpanaClaseMN.Otros; if (aconpanaClaseMN.Asesor_intervino == 0) { txtIntervino.Text = "No"; } else if (aconpanaClaseMN.Desarrollo_innovacion == 1) { txtIntervino.Text = "Si"; } txtComoIntervinoSesion.Text = aconpanaClaseMN.Como_intervino; if (aconpanaClaseMN.Intervencion_colaboradores == 0) { txtOtrosColaboradores.Text = "No"; } else if (aconpanaClaseMN.Intervencion_colaboradores == 1) { txtOtrosColaboradores.Text = "Si"; } txtQuien.Text = aconpanaClaseMN.Colaborador; txtComoIntervino.Text = aconpanaClaseMN.Como_intervino; if (aconpanaClaseMN.Participa_juego == 0) { txtParticipaJuego.Text = "No"; } else if (aconpanaClaseMN.Participa_juego == 1) { txtParticipaJuego.Text = "Si"; } txtEtapa.Text = aconpanaClaseMN.Etapa; txtRazon.Text = aconpanaClaseMN.Razon; txtIncidencia.Text = aconpanaClaseMN.Incidencia; //txtMotivoVisita.Text = visitaMN.MotivoVisita; //txtObservacion.Text = visitaMN.Observacion; //TxtPendientes.Text = visitaMN.Pendientes; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { microredMN = new ModeloNegocio.Microred(); microredLN = new LogicaNegocio.Microred(); int microred_id = Convert.ToInt32(Request.Params["microred_id"]); microredMN = microredLN.getMicroredId(microred_id); txtFecha.Text = microredMN.Fecha.ToString("yyyy-MM-dd"); asesorLN = new LogicaNegocio.Asesor(); asesorMN = new ModeloNegocio.Asesor(); asesorMN = asesorLN.getAsesorId(microredMN.User_id); txtAsesor.Text = asesorMN.FullName; microredDocenteMN = new ModeloNegocio.MicroredDocente(); microredDocenteLN = new LogicaNegocio.MicroredDocente(); List <ModeloNegocio.MicroredDocente> listaMicroredDocente = new List <ModeloNegocio.MicroredDocente>(); listaMicroredDocente = microredDocenteLN.getAllMicroredDocenteForIdMicrored(microred_id); foreach (ModeloNegocio.MicroredDocente microredDocente in listaMicroredDocente) { docenteLN = new LogicaNegocio.Docente(); docenteMN = new ModeloNegocio.Docente(); docenteMN = docenteLN.getDocenteId(microredDocente.Docente_id); ddlDocente.Items.Add(new ListItem(docenteMN.FullName, docenteMN.id.ToString())); } microredSchoolMN = new ModeloNegocio.MicroredSchool(); microredSchoolLN = new LogicaNegocio.MicroredSchool(); List <ModeloNegocio.MicroredSchool> listaMicroredSchool = new List <ModeloNegocio.MicroredSchool>(); listaMicroredSchool = microredSchoolLN.getAllMicroredSchoolForIdMicrored(microred_id); foreach (ModeloNegocio.MicroredSchool microredSchool in listaMicroredSchool) { schoolLN = new LogicaNegocio.School(); schoolMN = new ModeloNegocio.School(); schoolMN = schoolLN.getSchool(microredSchool.School_id); ddlSchool.Items.Add(new ListItem(schoolMN.Nombre, schoolMN.id.ToString())); } txtMircrored.Text = microredMN.MicroredName; txtSesion.Text = microredMN.Lugar_sesion; txtInicio.Text = microredMN.H_inicio.ToString("hh:mm:ss"); txtTermino.Text = microredMN.H_termino.ToString("hh:mm:ss"); txtParticipante.Text = Convert.ToString(microredMN.Num_participantes); txtEducacion.Text = microredMN.Educ_financiera; txtEnfoque.Text = microredMN.Enfoques_edu; txtProgramacion.Text = microredMN.Programacion_ped; txtHabilidades.Text = microredMN.Habilidad_ped; txtTrabajo.Text = microredMN.Trabajo_grupal; txtParticipativo.Text = microredMN.Participativo; txtExpositivo.Text = microredMN.Expositivo; txtDinamicas.Text = microredMN.Dinamicas_ludicas; txtRecursos.Text = microredMN.Recursos_informaticos; txtAudiovisuales.Text = microredMN.Recursos_audiovisuales; txtMateriales.Text = microredMN.Materiales_didaticos; txtObservacion.Text = microredMN.Observacion; } }