示例#1
0
 private bool Update()
 {
     return(DBOrderOffer.Update(
                this.itemGuid,
                this.orderGuid,
                this.offerGuid,
                this.taxClassGuid,
                this.offerPrice,
                this.addedToCart,
                this.quantity));
 }
示例#2
0
        private bool Create()
        {
            Guid newID = Guid.NewGuid();

            this.itemGuid = newID;

            int rowsAffected = DBOrderOffer.Add(
                this.itemGuid,
                this.orderGuid,
                this.offerGuid,
                this.taxClassGuid,
                this.offerPrice,
                this.addedToCart,
                this.quantity);

            return(rowsAffected > 0);
        }
示例#3
0
        private void GetOrderOffer(Guid itemGuid)
        {
            using (IDataReader reader = DBOrderOffer.Get(itemGuid))
            {
                if (reader.Read())
                {
                    this.itemGuid  = new Guid(reader["ItemGuid"].ToString());
                    this.orderGuid = new Guid(reader["OrderGuid"].ToString());
                    this.offerGuid = new Guid(reader["OfferGuid"].ToString());

                    this.taxClassGuid = new Guid(reader["TaxClassGuid"].ToString());
                    this.offerPrice   = Convert.ToDecimal(reader["OfferPrice"]);
                    this.addedToCart  = Convert.ToDateTime(reader["AddedToCart"]);
                    this.quantity     = Convert.ToInt32(reader["Quantity"]);
                }
            }
        }
示例#4
0
        public static List <OrderOffer> GetByOrder(Guid orderGuid)
        {
            IDataReader reader = DBOrderOffer.GetByOrder(orderGuid);

            return(LoadListFromReader(reader));
        }
示例#5
0
        //public static bool Delete(Guid itemGuid)
        //{
        //    return DBOrderOffer.DeleteOrderOffers(itemGuid);
        //}

        public static bool DeleteByOrder(Guid orderGuid)
        {
            return(DBOrderOffer.DeleteByOrder(orderGuid));
        }