Exemplo n.º 1
0
 private void GetGridData()
 {
     try
     {
         DataSet ds = new DataSet();
         ds = invoiceBL.GetInvoiceReport();
         if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
         {
             gvInvoiceReport.DataSource = ds;
             search.Visible             = true;
             InvoiceList.Visible        = true;
         }
         else
         {
             search.Visible      = false;
             InvoiceList.Visible = false;
         }
         gvInvoiceReport.PageSize = Convert.ToInt32(DropPage.SelectedValue);
         gvInvoiceReport.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);
     }
 }