private void GridDataBind() { try { TrustBL objTrustBl = new TrustBL(); ApplicationResult objResult = new ApplicationResult(); objResult = objTrustBl.Trust_SelectAll(); if (objResult != null) { if (objResult.resultDT.Rows.Count > 0) { gvTrust.DataSource = objResult.resultDT; gvTrust.DataBind(); PanelGrid_VisibilityMode(1); } else { PanelGrid_VisibilityMode(2); } } } catch (Exception ex) { logger.Error("Error", ex); ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp", "<script>alert('Oops! There is some technical issue. Please Contact to your administrator.');</script>"); } }
public void bindTrust() { try { #region Bind Trust TrustBL objTrustBL = new TrustBL(); TrustBO objTrustBO = new TrustBO(); Controls objControls = new Controls(); ApplicationResult objResultTrust = new ApplicationResult(); objResultTrust = objTrustBL.Trust_SelectAll(); if (objResultTrust != null) { if (objResultTrust.resultDT.Rows.Count > 0) { objControls.BindDropDown_ListBox(objResultTrust.resultDT, ddlTrustID, "TrustNameEng", "TrustMID"); } ddlTrustID.Items.Insert(0, new ListItem("-Select-", "-1")); } #endregion } catch (Exception ex) { logger.Error("Error", ex); ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp", "<script>alert('Oops! There is some technical issue. Please Contact to your administrator.');</script>"); } }
public void BindTrust() { var objTrustBl = new TrustBL(); var objResult = objTrustBl.Trust_SelectAll(); if (objResult == null) { return; } if (objResult.resultDT.Rows.Count <= 0) { return; } _objControl.BindDropDown_ListBox(objResult.resultDT, ddlTrust, "TrustNameEng", "TrustMID"); ddlTrust.Items.Insert(0, new ListItem("--Select--", "")); }
public void RestrictNewTrust() { try { TrustBL objTrustBl = new TrustBL(); ApplicationResult objResult = new ApplicationResult(); objResult = objTrustBl.Trust_SelectAll(); if (objResult.resultDT.Rows.Count > 0) { //lnkAddNewTrust.Visible = false; } else { //lnkAddNewTrust.Visible = true; } } catch (Exception ex) { logger.Error("Error", ex); ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp", "<script>alert('Oops! There is some technical issue. Please Contact to your administrator.');</script>"); } }