Пример #1
0
 protected void BindAddressDetails()
 {
     try
     {
         dataset = addressBL.GetAddressDetails(Session["SAID"].ToString(), 11, "");
         if (dataset.Tables.Count > 0 && dataset.Tables[0].Rows.Count > 0)
         {
             gvAddress.DataSource  = dataset;
             searchaddress.Visible = true;
         }
         else
         {
             gvAddress.DataSource  = null;
             searchaddress.Visible = false;
         }
         gvAddress.PageSize = Convert.ToInt32(DropPage1.SelectedValue);
         gvAddress.DataBind();
     }
     catch
     {
         lblTitle.Text      = "Warning!";
         lblTitle.ForeColor = System.Drawing.Color.Red;
         message.ForeColor  = System.Drawing.Color.Red;
         message.Text       = "Sorry, Something went wrong, please contact administrator";
         ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "openModal();", true);
     }
 }