protected void btnGuardar_Click(object sender, EventArgs e) { try { FacadeAspirante fa = new FacadeAspirante(this); if (IsValid) { if (btnGuardar.Text == "GUARDAR") { fa.InsertAlumCom(alu_ID); fa.InsertAlumno(); enc.Insert(1, alu_ID); Response.Redirect("DatosGenerales.aspx"); } else if (btnGuardar.Text == "ACTUALIZAR") { fa.LlamarUpdate(alu_ID); } } } catch (Exception) { throw; } }
protected void btnGuardar_Click(object sender, EventArgs e) { try { FacadeAspirante fa = new FacadeAspirante(this); if (IsValid) { if (btnGuardar.Text == "GUARDAR") { fa.InsertAlumCom(alu_ID); fa.UpdateAlumno(alu_ID); enc.Insert(1, alu_ID); if (IsValid) { Response.Redirect("DatosGenerales.aspx"); } } else if (btnGuardar.Text == "ACTUALIZAR") { fa.LlamarUpdate(alu_ID); Mensaje("TU INFORMACIÓN HA SIDO ACTUALIZADA ", "alert alert-success"); } } } catch (Exception ex) { Mensaje("NO SE HA PODIDO REALIZAR LA OPERACIÓN , INTENTELO MÁS TARDE", "alert alert-danger"); } }
protected void btnAC_Click(object sender, EventArgs e) { if (IsValid) { try { FacadeAspirante fa = new FacadeAspirante(this); int id = (int)Session["alu_ID"]; fa.UpdateEscuela(id); Mensaje("TU INFORMACIÓN HA SIDO ACTUALIZADA ", "alert alert-success"); if (btnGuardar.Text == "GUARDAR") { dao.InsertEsc(llenarAlumCom(), alu_ID); enc.Insert(3, alu_ID); Response.Redirect("InformacionFamiliar.aspx"); } } catch (Exception ex) { Mensaje("NO SE HA PODIDO REALIZAR LA OPERACIÓN , INTENTELO MÁS TARDE", "alert alert-danger"); } } }
protected void btnGuardar_Click(object sender, EventArgs e) { if (validar()) { UControl c = new UControl(); FacadeAspirante fa = new FacadeAspirante(this); if (btnGuardar.Text == "GUARDAR") { Session["alu_ID"] = fa.InsertAlumno();//inserta y al mismo tiempo recupera el id int id = (int)Session["alu_ID"]; fa.InsertAlumCom(id); for (int i = 0; i < 7; i++)//cambia el 3 por el SelectedItem.text del comobox que tengas { fa.InsertDatosFamiliares(llenarDatosFamiliares(i), id); } fa.DeleteDatosFamiliaresR(id); c.RegistrarFormulario(1, id); } else { int id = (int)Session["alu_ID"]; fa.DeleteDatosFamiliares(id); for (int i = 0; i < 7; i++)//cambia el 3 por el SelectedItem.text del comobox que tengas { fa.InsertDatosFamiliares(llenarDatosFamiliares(i), id); } fa.LlamarUpdate(id); } Server.Transfer("formulario_1.aspx", true); } else { //Response.Write("<script>alert('Asegurece de haber seleccionado una opcion de todos las listas desplegables') </script>"); } }
protected void btnGuardar_Click(object sender, EventArgs e) { try { FacadeAspirante fa = new FacadeAspirante(this); if (btnGuardar.Text == "GUARDAR") { for (int i = 0; i < int.Parse(num_Personas.Text); i++) { fa.InsertDatosFamiliares(llenarDatosFamiliares(i), alu_ID); } fa.DeleteDatosFamiliaresR(alu_ID); enc.Insert(4, alu_ID); Response.Redirect("EstudioSocioE.aspx"); } else { fa.DeleteDatosFamiliares(alu_ID); for (int i = 0; i < int.Parse(num_Personas.Text); i++) { fa.InsertDatosFamiliares(llenarDatosFamiliares(i), alu_ID); } Mensaje("TU INFORMACIÓN HA SIDO ACTUALIZADA ", "alert alert-success"); } } catch (Exception) { Mensaje("NO SE HA PODIDO REALIZAR LA OPERACIÓN , INTENTELO MÁS TARDE", "alert alert-danger"); } }
protected void btnGuardar_Click(object sender, EventArgs e) { FacadeAspirante fa = new FacadeAspirante(this); if (btnGuardar.Text == "GUARDAR") { } else { } }
protected void btnAC_Click(object sender, EventArgs e) { if (IsValid) { try { FacadeAspirante fa = new FacadeAspirante(this); int id = (int)Session["alu_ID"]; fa.UpdateEscuela(id); enc.Insert(3, id); if (btnGuardar.Text == "GUARDAR") { Response.Redirect("InformacionFamiliar.aspx"); } } catch (Exception ex) { throw; } } }