Ejemplo n.º 1
0
        public SalesOrderHeaderCollection GetAllSalesOrderHeaderCollection()
        {
            SalesOrderHeaderCollection col = new SalesOrderHeaderCollection();

            try
            {
                col = data.GetAllSalesOrderHeadersCollection();
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "GetAllSalesOrderHeaderCollection");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(col);
        }
Ejemplo n.º 2
0
        public Customer GetCustomerByOrderID(int OrderID)
        {
            int      cust_id = 0;
            Customer cust    = new Customer();

            string where = "SalesOrderID=" + OrderID.ToString();
            string orderby = "SalesOrderID";
            SalesOrderHeaderCollection col = new SalesOrderHeaderCollection();
            SalesOrderHeader           soh = new SalesOrderHeader();

            col = soh.GetSalesOrderHeaderCollection(where, orderby);
            for (int i = 0; i < col.Count; i++)
            {
                if (col[i].SalesOrderID == OrderID)
                {
                    cust_id = col[i].CustomerID;
                    cust    = cust.GetCustomer(cust_id);
                    break;
                }
            }
            return(cust);
        }
Ejemplo n.º 3
0
        public SalesOrderHeaderCollection GetSalesOrderHeaderCollection(string where, string orderBy)
        {
            SalesOrderHeaderCollection col = new SalesOrderHeaderCollection();

            if (data == null)
            {
                data = new SalesOrderHeaderData();
            }
            try
            {
                col = data.GetAllSalesOrderHeadersDynamicCollection(where, orderBy);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "GetSalesOrderHeaderCollection");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(col);
        }