Exemplo n.º 1
0
        public DataSet GetInvoicesBalance()
        {
            DataSet ds = new DataSet();
            SalesInvoiceHeaderData sihd = new SalesInvoiceHeaderData();

            try
            {
                ds = sihd.GetInovoicesBalanceDataSet();
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                sihd = null;
            }
            return(ds);
        }
Exemplo n.º 2
0
        public DataSet GetSalesInvoiceHeadersDataSet(string where, string orderBy)
        {
            SalesInvoiceHeaderData data = new SalesInvoiceHeaderData();
            DataSet ds = new DataSet();

            try
            {
                ds = data.GetAllSalesInvoiceHeadersDynamicDataSet(where, orderBy);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "GetSalesInvoiceHeadersDataSet");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(ds);
        }
Exemplo n.º 3
0
        public SalesInvoiceHeaderCollection GetSalesInvoiceHeadersCollection(string where, string orderBy)
        {
            SalesInvoiceHeaderData       data = new SalesInvoiceHeaderData();
            SalesInvoiceHeaderCollection col  = new SalesInvoiceHeaderCollection();

            try
            {
                col = data.GetAllSalesInvoiceHeadersDynamicCollection(where, orderBy);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "GetSalesInvoiceHeadersCollection");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(col);
        }
Exemplo n.º 4
0
        public SalesInvoiceHeader GetSalesInvoiceHeaders(int invoiceID)
        {
            SalesInvoiceHeaderData data = new SalesInvoiceHeaderData();
            SalesInvoiceHeader     sih  = new SalesInvoiceHeader();

            try
            {
                sih = data.GetSalesInvoiceHeader(invoiceID);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "GetSalesInvoiceHeaders");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(sih);
        }
Exemplo n.º 5
0
        public bool UpdateSalesInvoiceHeader(SalesInvoiceHeader salesinvoiceheader)
        {
            SalesInvoiceHeaderData data = new SalesInvoiceHeaderData();
            bool ret = false;

            try
            {
                ret = data.UpdateSalesInvoiceHeader(salesinvoiceheader);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "UpdateSalesInvoiceHeader");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(ret);
        }
Exemplo n.º 6
0
        public bool RemoveSalesInvoiceHeader(int invoiceID)
        {
            SalesInvoiceHeaderData data = new SalesInvoiceHeaderData();
            bool ret = false;

            try
            {
                ret = data.DeleteSalesInvoiceHeader(invoiceID);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "RemoveSalesInvoiceHeader");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(ret);
        }
Exemplo n.º 7
0
        public bool InvoiceExist(int SalesOrderId)
        {
            bool ret = false;
            SalesInvoiceHeaderData data = new SalesInvoiceHeaderData();

            try
            {
                ret = data.InvoiceExist(SalesOrderId);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(ret);
        }
Exemplo n.º 8
0
        public int AddSalesInvoiceHeader(SalesInvoiceHeader salesinvoiceheader)
        {
            SalesInvoiceHeaderData data = new SalesInvoiceHeaderData();
            int id = 0;

            try
            {
                if (!InvoiceExist(salesinvoiceheader.SaleOrderID))
                {
                    id = data.AddSalesInvoiceHeader(salesinvoiceheader);
                }
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "AddSalesInvoiceHeader");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(id);
        }