Exemplo n.º 1
0
        public void FillGrid()
        {
            try
            {
                DataTable dt_ = new DataTable();
                dt_ = tbl_mjvManager.GetBPVList();

                GVScrhBPV.DataSource = dt_;
                GVScrhBPV.DataBind();

                ViewState["MBPV"] = dt_;
            }
            catch (Exception ex)
            {
                //throw;
                ScriptManager.RegisterStartupScript(this, this.GetType(), "isActive", "Alert();", true);
                lblalert.Text = ex.Message;
            }
        }
Exemplo n.º 2
0
 protected void TBSrhBPV_TextChanged(object sender, EventArgs e)
 {
     try
     {
         FillGrid();
         DataTable _dt = (DataTable)ViewState["MBPV"];
         DataView  dv  = new DataView(_dt, "mjv_sono LIKE '%" + TBSrhBPV.Text.Trim().ToUpper() + "%'", "[mjv_sono] ASC", DataViewRowState.CurrentRows);
         DataTable dt_ = new DataTable();
         dt_ = dv.ToTable();
         GVScrhBPV.DataSource = dt_;
         GVScrhBPV.DataBind();
         ViewState["MBPV"] = dt_;
     }
     catch (Exception ex)
     {
         //   throw;
         ScriptManager.RegisterStartupScript(this, this.GetType(), "isActive", "Alert();", true);
         lblalert.Text = ex.Message;
     }
 }