protected void acbCompany_SearchClick(object sender, EventArgs e) { try { switch (mvCompany.GetActiveView().ID) { case "vwCompany": objCompanyMasterDal = new CompanyMasterDal(); DataSet dsCompany = objCompanyMasterDal.GetCompany(acbCompany.SearchTextBox.Text); radgrdCompany.DataSource = dsCompany; radgrdCompany.DataBind(); ViewState[vsCompany] = dsCompany; break; case "vwContact": BindContactGrid(Convert.ToInt32(Session["COMPANY_ID"]), acbCompany.SearchTextBox.Text); break; } } catch (Exception ex) { bool rethrow = ExceptionPolicy.HandleException(ex, DALHelper.DAL_EXP_POLICYNAME); if (rethrow) { throw ex; } } }
/// <summary> /// Bind Company grid /// </summary> private void BindGrid() { objCompanyMasterDal = new CompanyMasterDal(); DataSet dsCompany = objCompanyMasterDal.GetCompany(""); radgrdCompany.DataSource = dsCompany; radgrdCompany.DataBind(); ViewState[vsCompany] = dsCompany; }