0% found this document useful (0 votes)
10 views17 pages

Registro de Notas en Sistema Web

This document is a C# code file for a web application that allows professors to register grades for courses. It includes functions for loading and displaying student grades in a grid, adding/updating/saving grades, and clearing form controls. Professors can select a student to view or edit their grades, and a validation check is performed when updating grades to ensure the new grade is higher than the original grade if the student was failed.

Uploaded by

Erick Srv
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views17 pages

Registro de Notas en Sistema Web

This document is a C# code file for a web application that allows professors to register grades for courses. It includes functions for loading and displaying student grades in a grid, adding/updating/saving grades, and clearing form controls. Professors can select a student to view or edit their grades, and a validation check is performed when updating grades to ensure the new grade is higher than the original grade if the student was failed.

Uploaded by

Erick Srv
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

//mantenimiento de notas using System; using [Link]; using [Link]; using [Link]; using [Link]; using System.

Web; using [Link]; using [Link]; using [Link]; using [Link]; using [Link]; using [Link]; using LIBENTIDAD; using LIBNEGOCIO; namespace [Link] { public partial class Registro_notas : [Link] { Clsentidad objen = new Clsentidad(); protected void Page_Load(object sender, EventArgs e) { if (![Link]) { [Link] = Session["curso"].ToString(); [Link] = false; [Link] = false; [Link] = false; [Link] = false; [Link] = false; [Link] = false; [Link] = [Link]; Session["lista"] = [Link](objen); [Link] = Session["lista"]; [Link](); } } void listarnotas() { [Link] = [Link]; [Link] = [Link]; [Link] = [Link](objen); [Link](); } protected void Txtseccion_TextChanged(object sender, EventArgs e) { [Link] = [Link]; DataTable tb = [Link](objen);

[Link] = tb; [Link] = "apealumno"; [Link] = "idalumno"; [Link](); if ([Link] != null) { listarnotas(); } } protected void ListBox1_SelectedIndexChanged(object sender, EventArgs e) { lblcod_alu.Text = [Link]; } protected void btnnuevo_Click(object sender, EventArgs e) { limpiarcontroles(); [Link] = true; [Link] = true; [Link] = true; [Link] = true; [Link] = true; [Link] = true; } void limpiarcontroles() { [Link] = ""; [Link] = ""; [Link] = ""; [Link] = ""; } protected void { double par double fin string obs Btnupdate_Click(object sender, EventArgs e) = 0; = 0; = "";

for (int i=0; i < [Link]; i++) { if ([Link][i].Cells[1].[Link](lblcod_alu.Text)) { par = [Link]([Link][i].Cells[4].Text); fin = [Link]([Link][i].Cells[5].Text); obs = [Link][i].Cells[7].Text; } } if ([Link]("DESAPROBADO")) {

if ((par < fin) && par > 5) { try { [Link] = [Link]([Link]); [Link] = lblcod_alu.Text; [Link] = [Link]; int a = [Link](objen); if (a == 1) { [Link]("<script language='javascript'>[Link]('Se ha Actualizado Correctamente.')</script>"); listarnotas(); limpiarcontroles(); } else { [Link]("<script language='javascript'>[Link]('No se pudo Actualizar los Datos.')</script>"); listarnotas(); limpiarcontroles(); } } catch (Exception ex) { [Link]("<script language='javascript'>[Link]('Error: Hay algn dato no valido.')</script>"); } } else if ((fin < par) && fin > 5) { try { [Link] = [Link]([Link]); [Link] = lblcod_alu.Text; [Link] = [Link]; int a = Clsnegocio.actualizarnotas2BL(objen); if (a == 1) { [Link]("<script language='javascript'>[Link]('Se ha Actualizado Correctamente.')</script>"); listarnotas(); limpiarcontroles(); } else {

[Link]("<script language='javascript'>[Link]('No se pudo Actualizar los Datos.')</script>"); listarnotas(); limpiarcontroles(); } } catch (Exception ex) { [Link]("<script language='javascript'>[Link]('Error: Hay algn dato no valido.')</script>"); } } } else { [Link]("<script language='javascript'>[Link]('Lo siento, No hay necesidad de Actulizar.')</script>"); [Link] = ""; } } protected void btnguardar_Click(object sender, EventArgs e) { int count = 0; for (int i = 0; i < [Link]; i++) { if ([Link][i].Cells[1].[Link](lblcod_alu.Text)) { count += 1; } } if(count == 0) { try { [Link] = lblcod_alu.Text; [Link] = [Link]; [Link] = ([Link]([Link]) + [Link]([Link])) / 2; [Link] = [Link]([Link]); [Link] = [Link]([Link]); int a = [Link](objen); if (a == 1) {

[Link]("<script language='javascript'>[Link]('Se ha Guardado Correctamente.')</script>"); listarnotas(); limpiarcontroles(); } } catch (Exception ex) { [Link]("<script language='javascript'>[Link]('Error: Hay algn dato no valido.')</script>"); } } else { [Link]("<script language='javascript'>[Link]('No se pudo Guardar los Datos.')</script>"); listarnotas(); limpiarcontroles(); } } protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) { GridViewRow row = [Link]; lblcod_alu.Text = [Link][1].Text; [Link] [Link] [Link] [Link] } protected void LinkButton1_Click(object sender, EventArgs e) { [Link]("~/Profesores/Elegir_curso.aspx"); } protected void CheckBox1_CheckedChanged(object sender, EventArgs e) { if ([Link]) { [Link] = true; } else { [Link] = false; } } = = = = false; false; false; false;

protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e) { [Link] = [Link]; [Link] = Session["lista"]; [Link](); } } }

//intranet alumno using System; using [Link]; using [Link]; using [Link]; using [Link]; using [Link]; using [Link]; using LIBENTIDAD; using LIBNEGOCIO; namespace [Link] { public partial class Intra_Alum : [Link] { Clsentidad objen = new Clsentidad(); protected void Page_Load(object sender, EventArgs e) { if (![Link]) { [Link] = Session["usuario"].ToString(); DataTable dt = [Link](objen); DataTable dt2 = [Link](objen); [Link] [Link] [Link] [Link] [Link] = = = = = [Link][0][0].ToString(); [Link][0][1].ToString(); [Link][0][2].ToString(); [Link][0][3].ToString(); [Link][0][4].ToString();

[Link](""); for (int i = 0; i < [Link];i++ ) { [Link]([Link][i][0].ToString()); } [Link] = "~/Imagenes/" + Session["usuario"].ToString() + ".jpg"; } } protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { [Link] = Session["usuario"].ToString(); [Link] = [Link]; DataTable dt = [Link](objen); [Link] = dt; [Link](); } } }

//observar lista de postulantes using System; using [Link]; using [Link]; using [Link]; using [Link]; using [Link]; using LIBNEGOCIO; using LIBENTIDAD; namespace [Link] { public partial class Postulantes : [Link] { Clsentidad objen = new Clsentidad(); protected void Page_Load(object sender, EventArgs e) { if (![Link]) { listar(); } } void listar() { Session["post"] = [Link](); [Link] = Session["post"]; [Link](); for (int i = 0; i < [Link]; i++) { HyperLink hp = [Link][i].FindControl("HyperLink1") as HyperLink; string id = [Link][i].Cells[0].Text; [Link] = "~/Documentos/" + id + ".docx"; } } protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e) { if (![Link](" ")) { [Link] = [Link]; [Link] = Session["post2"]; [Link](); } else if ([Link](" ")) { [Link] = [Link]; [Link] = Session["post"]; [Link](); } else { [Link] = [Link];

[Link] = Session["post"]; [Link](); } } protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { if ([Link](" ")) { listar(); } else { try { [Link] = [Link]; Session["post2"] = [Link](objen); [Link] = Session["post2"]; [Link](); for (int i = 0; i < [Link]; i++) { HyperLink hp = [Link][i].FindControl("HyperLink1") as HyperLink; string id = [Link][i].Cells[0].Text; [Link] = "~/Documentos/" + id + ".docx"; } } catch { [Link] = null; [Link](); } } } protected void LinkButton2_Click(object sender, EventArgs e) { string id = ""; for (int i = 0; i < [Link]; i++) { CheckBox cb = [Link][i].FindControl("CheckBox1") as CheckBox; if ([Link]) { id += [Link][i].Cells[0].Text+ ","; } } string cod = [Link]([Link] - 1).ToString(); [Link] = cod;

int a = [Link](objen); if(a != -1) { listar(); } } } }

//mantenimiento notas cursos libres using System; using [Link]; using [Link]; using [Link]; using [Link]; using [Link]; using LIBENTIDAD; using LIBNEGOCIO; namespace [Link] { public partial class Registro_notas_CL : [Link] { Clsentidad objen = new Clsentidad(); protected void Page_Load(object sender, EventArgs e) { if (![Link]) { [Link] = Session["curso"].ToString(); [Link] = false; [Link] = false; [Link] = false; [Link] = false; [Link] = false; [Link] = false; [Link] = [Link]; [Link] = [Link](objen); [Link] = "apealumno"; [Link] = "idalumno"; [Link](); listarnotas(); } } void listarnotas() { [Link] = [Link]; Session["lista"] = [Link](objen); [Link] = Session["lista"]; [Link](); } protected void ListBox1_SelectedIndexChanged(object sender, EventArgs e) { lblcod_alu.Text = [Link]; } protected void btnnuevo_Click(object sender, EventArgs e) { limpiarcontroles();

[Link] = true; [Link] = true; [Link] = true; [Link] = true; [Link] = true; [Link] = true; } void limpiarcontroles() { [Link] = ""; [Link] = ""; [Link] = ""; [Link] = ""; } protected void { double par double fin string obs Btnupdate_Click(object sender, EventArgs e) = 0; = 0; = "";

for (int i = 0; i < [Link]; i++) { if ([Link][i].Cells[1].[Link](lblcod_alu.Text)) { par = [Link]([Link][i].Cells[4].Text); fin = [Link]([Link][i].Cells[5].Text); obs = [Link][i].Cells[7].Text; } } if ([Link]("DESAPROBADO")) { if ((par < fin) && par > 5) { try { [Link] = [Link]([Link]); [Link] = lblcod_alu.Text; [Link] = [Link]; int a = [Link](objen); if (a == 1) { [Link]("<script language='javascript'>[Link]('Se ha Actualizado Correctamente.')</script>"); listarnotas(); limpiarcontroles(); } else

{ [Link]("<script language='javascript'>[Link]('No se pudo Actualizar los Datos.')</script>"); listarnotas(); limpiarcontroles(); } } catch (Exception ex) { [Link]("<script language='javascript'>[Link]('Error: Hay algn dato no valido.')</script>"); return; } } else if ((fin < par) && fin > 5) { try { [Link] = [Link]([Link]); [Link] = lblcod_alu.Text; [Link] = [Link]; int a = Clsnegocio.actualizarnotascl2BL(objen); if (a == 1) { [Link]("<script language='javascript'>[Link]('Se ha Actualizado Correctamente.')</script>"); listarnotas(); limpiarcontroles(); } else { [Link]("<script language='javascript'>[Link]('No se pudo Actualizar los Datos.')</script>"); listarnotas(); limpiarcontroles(); } } catch (Exception ex) { [Link]("<script language='javascript'>[Link]('Error: Hay algn dato no valido.')</script>"); return; } } } else {

[Link]("<script language='javascript'>[Link]('Lo siento, No hay necesidad de Actulizar.')</script>"); [Link] = ""; } } protected void btnguardar_Click(object sender, EventArgs e) { int count = 0; for (int i = 0; i < [Link]; i++) { if ([Link][i].Cells[1].[Link](lblcod_alu.Text)) { count += 1; } } if (count == 0) { try { [Link] = lblcod_alu.Text; [Link] = [Link]; [Link] = ([Link]([Link]) + [Link]([Link])) / 2; [Link] = [Link]([Link]); [Link] = [Link]([Link]); int a = [Link](objen); if (a == 1) { [Link]("<script language='javascript'>[Link]('Se ha Guardado Correctamente.')</script>"); listarnotas(); limpiarcontroles(); } } catch (Exception ex) { [Link]("<script language='javascript'>[Link]('Error: Hay algn dato no valido.')</script>"); return; } } else { [Link]("<script language='javascript'>[Link]('No se pudo Guardar los Datos.')</script>"); listarnotas();

limpiarcontroles(); } } protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) { GridViewRow row = [Link]; lblcod_alu.Text = [Link][1].Text; [Link] [Link] [Link] [Link] } protected void CheckBox1_CheckedChanged(object sender, EventArgs e) { if ([Link]) { [Link] = true; } else { [Link] = false; } } protected void LinkButton1_Click(object sender, EventArgs e) { [Link]("~/Profesores/Elegir_curso.aspx"); } protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e) { [Link] = [Link]; [Link] = Session["lista"]; [Link](); } } } = = = = false; false; false; false;

You might also like