Example #1
0
 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;
 }
Example #2
0
    protected void BagregarOrden_Click(object sender, EventArgs e)
    {
        if (string.IsNullOrEmpty(TBorden.Text) == true)
        {
            Linfo.ForeColor = System.Drawing.Color.Red;
            Linfo.Text      = "Ingrese una actividad";
        }
        else
        {
            torden              = (System.Data.DataTable)(Session["Orden"]);
            rows                = torden.NewRow();
            rows["ORDEN"]       = TBorden.Text;
            rows["DESCRIPCION"] = TAdes.Value;
            torden.Rows.Add(rows);

            GVorden.DataSource = torden;
            GVorden.DataBind();
            GVorden.Visible = true;
        }
        TBorden.Text = "";
        TAdes.Value  = "";
    }