예제 #1
0
        public List <Discount> GetFullDiscountInfo()
        {
            DiscountDB disDB = new DiscountDB();
            DataTable  table = disDB.GetFullPetReservationDiscountInfo();

            return(GetDiscountInfo(table));
        }
예제 #2
0
        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", ""));
 }
예제 #4
0
 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;
 }
예제 #5
0
        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);
        }
예제 #6
0
        public e removeDiscount(int resNumber)
        {
            e          errCode = e.success;
            DiscountDB serDB   = new DiscountDB();

            if (!serDB.DeleteResDis(resNumber))
            {
                errCode = e.insertFail;
            }

            return(errCode);
        }
예제 #7
0
        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);
            }
        }