public List <Discount> GetFullDiscountInfo() { DiscountDB disDB = new DiscountDB(); DataTable table = disDB.GetFullPetReservationDiscountInfo(); return(GetDiscountInfo(table)); }
public List <Discount> GetFullDiscountInfo() { DiscountDB disDB = new DiscountDB(); dsHvk.HVK_DISCOUNTDataTable table = disDB.GetFullDiscountInfo(); return(GetDiscountInfo(table)); }
public void init() { WebServices.DAL.CleanDB cDB = new WebServices.DAL.CleanDB(); cDB.emptyDB(); configuration.DB_MODE = testing; discountDB = new DiscountDB(testing); li = new LinkedList <Discount>(); discountDB.Add(new Discount(1, 1, "", 10, "02/02/2020", "")); }
private DiscountsManager() { DDB = new DiscountDB(configuration.DB_MODE); discounts = DDB.Get(); DiscountCollector = new System.Timers.Timer(); DiscountCollector.Elapsed += new ElapsedEventHandler(CheckFinishedDiscounts); DiscountCollector.Interval = 60 * 60 * 1000; // interval of one hour DiscountCollector.Enabled = true; }
public static List <Discount> listPetReservationDiscounts(int petReservationNumber) { List <Discount> list = new List <Discount>(); DiscountDB db = new DiscountDB(); foreach (DataRow row in db.listPetReservationDiscountsDB(petReservationNumber).Tables["hvk_pet_res_discount"].Rows) { list.Add(fillFromDataRow(row)); } return(list); }
public e removeDiscount(int resNumber) { e errCode = e.success; DiscountDB serDB = new DiscountDB(); if (!serDB.DeleteResDis(resNumber)) { errCode = e.insertFail; } return(errCode); }
public static int deleteReservationDiscount(int discType, int resNum) { Search look = new Search(); if (!look.validateReservationNumber(resNum)) { return(-19); } else { DiscountDB db = new DiscountDB(); db.deleteReservationDiscountDB(discType, resNum); return(0); } }