protected void grvgestores_RowDeleting(object sender, GridViewDeleteEventArgs e) { negociogestores neg = new negociogestores(); string s_matricula = ((Label)grvgestores.Rows[e.RowIndex].FindControl("lbl_it_matricula")).Text; Gestores ges = new Gestores(); ges.SetMatriculaGS(s_matricula); neg.EliminarGestores(s_matricula); DataTable tablaGestores = neg.getTabla(); grvgestores.DataSource = tablaGestores; grvgestores.DataBind(); }
protected void grvgestores_RowUpdating(object sender, GridViewUpdateEventArgs e) { String s_matricula = ((Label)grvgestores.Rows[e.RowIndex].FindControl("lbl_eit_matricula")).Text; String s_dni = ((Label)grvgestores.Rows[e.RowIndex].FindControl("lbl_eit_dni")).Text; String s_nombre = ((TextBox)grvgestores.Rows[e.RowIndex].FindControl("txt_eit_nombre")).Text; String s_apellido = ((TextBox)grvgestores.Rows[e.RowIndex].FindControl("txt_eit_apellido")).Text; //string s_nacimiento = Convert.ToString((Label)grvgestores.Rows[e.RowIndex].FindControl("lbl_eit_apellido")); DateTime s_nacimiento = Convert.ToDateTime(((Label)grvgestores.Rows[e.RowIndex].FindControl("lbl_eit_nacimiento")).Text); //string s_nacimiento = ((Label)grvgestores.Rows[e.RowIndex].FindControl("lbl_eit_nacimiento")).Text; String s_mail = ((Label)grvgestores.Rows[e.RowIndex].FindControl("lbl_eit_mail")).Text; String s_perfil = ((TextBox)grvgestores.Rows[e.RowIndex].FindControl("txt_eit_perfil")).Text; string s_contrasena = ((Label)grvgestores.Rows[e.RowIndex].FindControl("lbl_eit_dni")).Text; int s_nivel = Convert.ToInt32(((Label)grvgestores.Rows[e.RowIndex].FindControl("lbl_eit_dni")).Text); Boolean s_estado = true; //negociogestores neg = negociogestores(); Gestores ges = new Gestores(); ges.SetMatriculaGS(s_matricula); ges.SetDniGS(s_dni); ges.SetNombreGS(s_nombre); ges.SetApellidoGS(s_apellido); ges.SetAnioGS(s_nacimiento); //ges.GetAnioGS(); // ges.SetAnioGS(Convert.ToDateTime(s_nacimiento)); ges.SetMailGS(s_mail); ges.SetNombPerfilGS(s_perfil); ges.SetContrasenaGS(s_contrasena); ges.SetNivelGS(s_nivel); ges.SetEstadoGS(s_estado); negociogestores nego = new negociogestores(); nego.AgregarGestores(ges); grvgestores.EditIndex = -1; DataTable tablaGestores = neg.getTabla(); grvgestores.DataSource = tablaGestores; grvgestores.DataBind(); }