Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

using using using using using using using using using using

System; System.Data; System.Configuration; System.Collections; System.Web; System.Web.Security; System.Web.UI; System.Web.UI.WebControls; System.Web.UI.WebControls.WebParts; System.Web.UI.HtmlControls;

publicpartialclassListaMatricula : System.Web.UI.Page { Matricula objMatricula = newMatricula(); protectedvoid LlenarData() { grvMatricula.DataSource = objMatricula.BuscarLista(hdfAlumno.Value); grvMatricula.DataBind(); } protectedvoid Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { txtAlumno.Focus(); } } protectedvoid grvMatricula_PageIndexChanging(object sender, GridViewPageEventArgs e) { } protectedvoid grvMatricula_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName.Equals("Delete")) { GridViewRow row = (GridViewRow)((Control)e.CommandSource).NamingContainer; string vidMatricula = ((DataControlFieldCell)row.Cells[0]).Text.ToString(); if (objMatricula.Eliminar(vidMatricula)) { lblMensaje.Text = "[REGISTRO ELIMINADO CORRECTAMENTE]"; LlenarData(); } } } protectedvoid grvMatricula_RowDeleting(object sender, GridViewDeleteEventArgs e) { }

protectedvoid grvMatricula_RowEditing(object sender, GridViewEditEventArgs e) { string vidMatricula = grvMatricula.Rows[e.NewEditIndex].Cells[0].Text; Response.Redirect("frmMatricula.aspx?Accion=M&IdMatricula=" + vidMatricula); } protectedvoid btnNuevo_Click(object sender, EventArgs e) { Response.Redirect("frmMatricula.aspx?Accion=N"); } protectedvoid btnBuscar_Click(object sender, EventArgs e) { LlenarData(); } protectedvoid txtRazon_TextChanged(object sender, EventArgs e) { hdfAlumno.Value = asmAlumno.SelectedValue; btnBuscar.Focus(); } protectedvoid hdfAlumno_ValueChanged(object sender, EventArgs e) { } }

You might also like