protected void GetGridData()
 {
     try
     {
         string  srno    = ObjDec.Decrypt(Request.QueryString["srnum"].ToString());
         DataSet dataset = new DataSet();
         dataset = invoiceBL.GetInvoice(srno);
         if (dataset.Tables.Count > 0 && dataset.Tables[0].Rows.Count > 0)
         {
             gvSRInvoiceList.DataSource = dataset;
             gvSRInvoiceList.DataBind();
             invoicenum          = dataset.Tables[0].Rows[0]["InvoiceNum"].ToString();
             invamount           = dataset.Tables[0].Rows[0]["TotalAmount"].ToString();
             search.Visible      = true;
             InvoiceList.Visible = true;
         }
         else
         {
             search.Visible      = false;
             InvoiceList.Visible = false;
         }
         gvSRInvoiceList.PageSize = Convert.ToInt32(DropPage.SelectedValue);
         gvSRInvoiceList.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);
     }
 }
Beispiel #2
0
        public ServerResponse Get(string id)
        {
            var res = new ServerResponse();

            using (InvoiceBL InvoiceBL = new InvoiceBL())
            {
                try
                {
                    res.Data = InvoiceBL.GetInvoice(id);
                }
                catch (Exception ex)
                {
                    res.Success = false;
                }
            }
            return(res);
        }
Beispiel #3
0
        public Invoice GetInvoice(Guid id)
        {
            var invoiceBL = new InvoiceBL();

            return(invoiceBL.GetInvoice(id));
        }