Exemplo n.º 1
0
 protected void GetGridData()
 {
     try
     {
         string  said    = Session["SAID"].ToString();
         DataSet dataset = new DataSet();
         dataset = invoiceBL.GetInvoiceByClient(said);
         if (dataset.Tables.Count > 0 && dataset.Tables[0].Rows.Count > 0)
         {
             gvInvoiceList.DataSource = dataset;
             gvInvoiceList.DataBind();
             search.Visible      = true;
             InvoiceList.Visible = true;
         }
         else
         {
             search.Visible      = false;
             InvoiceList.Visible = false;
         }
         gvInvoiceList.PageSize = Convert.ToInt32(DropPage.SelectedValue);
         gvInvoiceList.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);
     }
 }