private bool Update() { return(DBOrderOffer.Update( this.itemGuid, this.orderGuid, this.offerGuid, this.taxClassGuid, this.offerPrice, this.addedToCart, this.quantity)); }
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); }
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"]); } } }
public static List <OrderOffer> GetByOrder(Guid orderGuid) { IDataReader reader = DBOrderOffer.GetByOrder(orderGuid); return(LoadListFromReader(reader)); }
//public static bool Delete(Guid itemGuid) //{ // return DBOrderOffer.DeleteOrderOffers(itemGuid); //} public static bool DeleteByOrder(Guid orderGuid) { return(DBOrderOffer.DeleteByOrder(orderGuid)); }