public List <InvoicesBOL> LoadInvoicesData(InvoicesBOL obj) { DataSet dsInvoices = objBll.Select(obj); InvoicesBOL objSO = new InvoicesBOL(); List <InvoicesBOL> lstInvoices = new List <InvoicesBOL>(); if (dsInvoices != null && dsInvoices.Tables[0] != null && dsInvoices.Tables[0].Rows.Count > 0) { foreach (DataRow dr in dsInvoices.Tables[0].Rows) { objSO = new InvoicesBOL(); objSO.InvoiceID = Convert.ToInt32(dr["InvoiceID"]); objSO.InvoiceNumber = Convert.ToString(dr["InvoiceNumber"]); objSO.InvoiceType = Convert.ToInt32(dr["InvoiceType"]); objSO.OrderID = Convert.ToInt32(dr["OrderID"]); objSO.Refference = Convert.ToString(dr["Refference"]); objSO.PayType = Convert.ToInt32(dr["PayType"]); objSO.ChequeNumber = Convert.ToString(dr["ChequeNumber"]); objSO.TotalAmount = Convert.ToDouble(dr["TotalAmount"]); objSO.OrderAmount = Convert.ToDouble(dr["OrderAmount"]); lstInvoices.Add(objSO); } } return(lstInvoices); }
public DataSet Select(InvoicesBOL obj) { try { DataSet ds = objBll.Select(obj); return(ds); } catch { } return(null); }
public bool Delete(InvoicesBOL obj) { if (obj != null) { try { int retVal = objBll.Delete(obj); if (retVal > 0) { return(true); } } catch { return(false); } } return(false); }