protected void bindPage(string ProfileID, string ModuleID) { try { DataTable Dt = new DataTable(); if (ModuleID == "0") { Dt = objModulePageAccess.GetModulePageAccessProc(ProfileID); } else { Dt = objModulePageAccess.GetModulePageAccessProcModule(ProfileID, ModuleID); } EntGridView.DataSource = Dt; EntGridView.DataBind(); l = Dt.Rows.Count; } catch (Exception ex) { if (this.global_success.Visible) { this.global_success.Visible = false; } this.global_error.Visible = true; this.global_error_msg.Text = Mains.Constant.GENERAL_ERR; } }
protected void bindgrid() { try { DataTable Dt = new DataTable(); Dt = objSubscriber.GetSubscriber(" where SubscriberEmail='" + txtSubEmail.Text.Trim() + "'"); if (Dt.Rows.Count > 0) { l = Dt.Rows.Count; EntGridView.DataSource = Dt; EntGridView.DataBind(); EntGridView.Visible = true; no_data.Visible = false; } else { EntGridView.Visible = false; no_data.Visible = true; upCrudGrid.Update(); } } catch (Exception ex) { if (this.global_success.Visible) { this.global_success.Visible = false; } this.global_error.Visible = true; this.global_error_msg.Text = Mains.Constant.GENERAL_ERR; } }
protected void bindgrid(string InterestCode) { try { DataTable Dt = new DataTable(); Dt = objInterest.GetInterest(" where InterestCode='" + InterestCode + "'"); if (Dt.Rows.Count > 0) { l = Dt.Rows.Count; EntGridView.DataSource = Dt; EntGridView.DataBind(); EntGridView.Visible = true; no_data.Visible = false; } else { EntGridView.Visible = false; no_data.Visible = true; UpdAdd.Update(); } } catch (Exception ex) { if (this.global_success.Visible) { this.global_success.Visible = false; } this.global_error.Visible = true; this.global_error_msg.Text = Mains.Constant.GENERAL_ERR; } }
protected void EntGridView_PageIndexChanging(object sender, GridViewPageEventArgs e) { try { EntGridView.PageIndex = e.NewPageIndex; bindPage(ddlProfile.SelectedValue, ddlModule.SelectedValue); EntGridView.DataBind(); } catch (Exception ex) { EntGridView.Controls.Add(new LiteralControl("An error occured; please try again, " + ex)); } }
protected void EntGridView_PageIndexChanging(object sender, GridViewPageEventArgs e) { try { bindgrid(Session[RunningCache.InterestID].ToString()); EntGridView.PageIndex = e.NewPageIndex; EntGridView.DataBind(); } catch (Exception ex) { EntGridView.Controls.Add(new LiteralControl("An error occured; please try again, " + ex)); } }
protected void EntGridView_PageIndexChanging(object sender, GridViewPageEventArgs e) { try { bindgrid(); EntGridView.PageIndex = e.NewPageIndex; EntGridView.DataBind(); upCrudGrid.Update(); } catch (Exception ex) { EntGridView.Controls.Add(new LiteralControl("An error occured; please try again, " + ex)); } }
protected void bindgrid() { try { DataTable Dt = new DataTable(); Dt = objFocalPoints.FocalPointsData(Session[RunningCache.UserID].ToString()); EntGridView.DataSource = Dt; EntGridView.DataBind(); EntGridView.Visible = true; no_data.Visible = false; } catch (Exception ex) { } }
protected void bindgrid() { try { DataTable Dt = new DataTable(); if (string.IsNullOrEmpty(Strsearch) == false) { Dt = objFocalPoints.GetFocalPoints(Strsearch); Strsearch = ""; if (Dt == null || Dt.Rows.Count == 0) { no_data.Visible = true; NoDatalbl.Text = "No data found"; d.Columns.Clear(); d.Rows.Clear(); EntGridView.DataSource = d; EntGridView.DataBind(); return; } } else { Dt = objFocalPoints.GetFocalPoints(" order by SectorInterestName, AreaInterestName, UserOrganization, UserFullName"); } l = Dt.Rows.Count; EntGridView.DataSource = Dt; EntGridView.DataBind(); EntGridView.Visible = true; no_data.Visible = false; upCrudGrid.Update(); } catch (Exception ex) { if (this.global_success.Visible) { this.global_success.Visible = false; } this.global_error.Visible = true; this.global_error_msg.Text = Mains.Constant.GENERAL_ERR; } }
protected void bindgrid() { try { this.global_error.Visible = false; DataTable Dt = new DataTable(); if (string.IsNullOrEmpty(Strsearch) == false) { Dt = objUsers.GetUsers(Strsearch); Strsearch = ""; if (Dt.Rows.Count == 0) { no_data.Visible = true; NoDatalbl.Text = "No data found"; d.Columns.Clear(); d.Rows.Clear(); EntGridView.DataSource = d; EntGridView.DataBind(); } } else { Dt = objUsers.GetUsers(" where UserActif=1 order by UserFullName"); } l = Dt.Rows.Count; EntGridView.DataSource = Dt; EntGridView.DataBind(); EntGridView.Visible = true; no_data.Visible = false; upCrudGrid.Update(); } catch (Exception ex) { if (this.global_success.Visible) { this.global_success.Visible = false; } this.global_error.Visible = true; this.global_error_msg.Text = Mains.Constant.GENERAL_ERR; } }