private bool Update() { return(DBCouponAppliedToItem.Update( this.guid, this.couponID, this.itemID, this.appliedType, this.usePercentage, this.discount, this.giftType, this.giftProducts, this.giftCustomProducts)); }
private bool Create() { this.guid = Guid.NewGuid(); int rowsAffected = DBCouponAppliedToItem.Create( this.guid, this.couponID, this.itemID, this.appliedType, this.usePercentage, this.discount, this.giftType, this.giftProducts, this.giftCustomProducts); return(rowsAffected > 0); }
private void GetCouponAppliedToItem(Guid guid) { using (IDataReader reader = DBCouponAppliedToItem.GetOne(guid)) { if (reader.Read()) { this.guid = new Guid(reader["Guid"].ToString()); this.couponID = Convert.ToInt32(reader["CouponID"]); this.itemID = Convert.ToInt32(reader["ItemID"]); this.appliedType = Convert.ToInt32(reader["AppliedType"]); this.usePercentage = Convert.ToBoolean(reader["UsePercentage"]); this.discount = Convert.ToDecimal(reader["Discount"]); this.giftType = Convert.ToInt32(reader["GiftType"]); this.giftProducts = reader["GiftProducts"].ToString(); this.giftCustomProducts = reader["GiftCustomProducts"].ToString(); } } }
public static List <CouponAppliedToItem> GetByCoupon(int couponId, int appliedType) { IDataReader reader = DBCouponAppliedToItem.GetByCoupon(couponId, appliedType); return(LoadListFromReader(reader)); }
public static bool DeleteByCoupon(int couponId) { return(DBCouponAppliedToItem.DeleteByCoupon(couponId)); }
public static bool Delete(Guid guid) { return(DBCouponAppliedToItem.Delete(guid)); }