Beispiel #1
0
        public SalesOrderHeader GetSalesOrderHeader(int saleOrderHeaderID)
        {
            SalesOrderHeader soh = new SalesOrderHeader();

            try
            {
                soh = data.GetSalesOrderHeader(saleOrderHeaderID);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "GetSalesOrderHeader");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(soh);
        }
Beispiel #2
0
        public bool UpdateSalesOrderHeader(SalesOrderHeader salesorderheader)
        {
            bool ret = false;

            try
            {
                ret = data.UpdateSalesOrderHeader(salesorderheader);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "UpdateSalesOrderHeader");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(ret);
        }
Beispiel #3
0
        public int AddSalesOrderHeaderMobile(SalesOrderHeader salesorderheader)
        {
            SqlCompactConnection conn = new SqlCompactConnection();
            int ret = 0;

            try
            {
                ret = conn.AddSalesOrderHeader(salesorderheader);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "AddSalesOrderHeaderMobile");
                throw (ex);
            }
            finally
            {
                conn = null;
            }
            return(ret);
        }
Beispiel #4
0
        public bool UpdateSalesOrderHeaderMobile(SalesOrderHeader salesorderheader)
        {
            SqlCompactConnection conn = new SqlCompactConnection();
            bool ret = false;

            try
            {
                ret = conn.UpdateSalesOrderHeader(salesorderheader);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "UpdateSalesOrderHeaderMobile");
                throw (ex);
            }
            finally
            {
                conn = null;
            }
            return(ret);
        }
        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);
        }
Beispiel #6
0
        public int AddSalesOrderHeader(SalesOrderHeader salesorderheader)
        {
            int ret = 0;

            if (data == null)
            {
                data = new SalesOrderHeaderData();
            }
            try
            {
                ret = data.AddSalesOrderHeader(salesorderheader);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "AddSalesOrderHeader");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(ret);
        }
 public bool Contains(SalesOrderHeader salesorderheader)
 {
     return(this.List.Contains(salesorderheader));
 }
 public void Remove(SalesOrderHeader salesorderheader)
 {
     this.List.Remove(salesorderheader);
 }
 public void Insert(int index, SalesOrderHeader salesorderheader)
 {
     this.List.Insert(index, salesorderheader);
 }
 public int IndexOf(SalesOrderHeader salesorderheader)
 {
     return(this.List.IndexOf(salesorderheader));
 }
 public int Add(SalesOrderHeader salesorderheader)
 {
     return(this.List.Add(salesorderheader));
 }