private void limpiar() { torden = (System.Data.DataTable)(Session["Orden"]); torden.Clear(); table = (System.Data.DataTable)(Session["Tabla"]); table.Clear(); TBorden.Text = ""; TBcargo.Text = ""; TBnombre.Text = ""; TBobj.Text = ""; TBlugar.Text = ""; Linfo.Text = ""; TAdes.Value = ""; GVagreinte.DataBind(); GVorden.DataBind(); foreach (GridViewRow row in GVasistente.Rows) { System.Web.UI.WebControls.CheckBox check = row.FindControl("CBasitio") as System.Web.UI.WebControls.CheckBox; check.Checked = false; } if (CBanteproyecto.Checked || CBpropuesta.Checked || CBcaso.Checked) { CBcaso.Checked = false; CBanteproyecto.Checked = false; CBpropuesta.Checked = false; } Tcasop.Visible = false; DDLreu.SelectedIndex = 0; }
protected void AgregarInt_Click(object sender, EventArgs e) { String user = Session["id"].ToString(); if (TBcodint.Text.Equals(user)) { borrar(); Linfo.Text = "El usuario no se puede agregar porque es "; } else if (Validar.Value.Equals("0")) { table = (System.Data.DataTable)(Session["Tabla"]); row = table.NewRow(); row["CODIGO"] = TBcodint.Text; row["INTEGRANTES"] = Rnombre.Text; table.Rows.Add(row); GVagreinte.DataSource = table; GVagreinte.DataBind(); } else { borrar(); Linfo.Text = "El estudiante no se puede agregar porque ya tiene una propuesta asignada!!"; } }
protected void AgregarIntegrante(object sender, EventArgs e) { String user = Session["id"].ToString(); if (TBcodint.Text.Equals(user)) { Linfo.ForeColor = System.Drawing.Color.Red; Linfo.Text = "No puede agregarse a usted mismo como integrante de esta propuesta, puesto que ya esta ligado a esta. "; TBcodint.Text = ""; Bintegrante.Visible = true; TBcodint.Enabled = true; RespInte.Visible = false; Bnueva.Visible = false; } else { table = (System.Data.DataTable)(Session["Tabla"]); row = table.NewRow(); row["CODIGO"] = TBcodint.Text; row["INTEGRANTES"] = Rnombre.Text; table.Rows.Add(row); GVagreinte.DataSource = table; GVagreinte.DataBind(); } }
/*Metodos que agregan el orden del dia*/ protected void Agregar_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(TBnombre.Text) == true || string.IsNullOrEmpty(TBcargo.Text) == true) { Linfo.ForeColor = System.Drawing.Color.Red; Linfo.Text = "Ingrese el nombre y cargo del invitado!!"; } else { table = (System.Data.DataTable)(Session["Tabla"]); row = table.NewRow(); row["NOMBRE"] = TBnombre.Text; row["CARGO"] = TBcargo.Text; table.Rows.Add(row); GVagreinte.DataSource = table; GVagreinte.DataBind(); } TBnombre.Text = ""; TBcargo.Text = ""; }