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)
        {
            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>";
            }
        }
예제 #3
0
        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)
        {
            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)
        {
            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>";
            }
        }
예제 #6
0
        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 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 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>";
            }
        }