private bool Update() { return(DBCouponUsageHistory.Update( this.historyID, this.couponID, this.orderID, this.createdOn)); }
private void GetCouponUsageHistory(int historyId) { using (IDataReader reader = DBCouponUsageHistory.GetOne(historyId)) { if (reader.Read()) { this.historyID = Convert.ToInt32(reader["HistoryID"]); this.couponID = Convert.ToInt32(reader["CouponID"]); this.orderID = Convert.ToInt32(reader["OrderID"]); this.createdOn = Convert.ToDateTime(reader["CreatedOn"]); } } }
private bool Create() { int newID = 0; newID = DBCouponUsageHistory.Create( this.couponID, this.orderID, this.createdOn); this.historyID = newID; return(newID > 0); }
public static IDataReader GetByCoupon(int couponId) { IDataReader reader = DBCouponUsageHistory.GetByCoupon(couponId); return(reader); //LoadListFromReader(reader); }
public static bool DeleteByOrder(int orderId) { return(DBCouponUsageHistory.DeleteByOrder(orderId)); }
public static bool DeleteByCoupon(int couponId) { return(DBCouponUsageHistory.DeleteByCoupon(couponId)); }
public static bool Delete(int historyId) { return(DBCouponUsageHistory.Delete(historyId)); }
public static int GetCountByCoupon(int couponId) { return(DBCouponUsageHistory.GetCountByCoupon(couponId)); }