public async Task <bool> BuyReward(Reward reward) { RewardDB rewardManager = new RewardDB(); var result = await rewardManager.BuyReward(reward); return(result); }
public async Task Delete(Guid id) { RewardDB rewardManager = new RewardDB(); await rewardManager.DeleteReward(id); return; }
public async Task <List <Reward> > GetAll(string username) { RewardDB rewardManager = new RewardDB(); var rewards = await rewardManager.GetAllRewards(username); return(rewards); }
public async Task Create(Reward reward) { RewardDB rewardManager = new RewardDB(); await rewardManager.CreateReward(reward); return; }
private void initConfig() { iniFile = new IniFile(Environment.CurrentDirectory + "\\" + Application.ProductName + ".ini"); initC = new InitConfig(); //regE = new RegEdit(); //MessageBox.Show("aaa " + Environment.CurrentDirectory + "\\" + Application.ProductName + ".ini", "LottoryControl StatusServer" + initC.StatusServer.ToLower()); GetConfig(); //MessageBox.Show("bbb", "LottoryControl"); cf = new Config1(); //MessageBox.Show("ccc", "LottoryControl"); conn = new ConnectDB(initC); ratedb = new RateDB(conn); saledb = new SaleDB(conn); sfdb = new StaffDB(conn); thodb = new ThooDB(conn); lotdb = new LottoDB(conn); rwdb = new RewardDB(conn); fldb = new FlockDB(conn); srdb = new SaleRateDB(conn); cudb = new CustomerDB(conn); imgdb = new ImageDB(conn); nldb = new NumberLimitDB(conn); //MessageBox.Show("ddd", "LottoryControl"); rate = new Rate(); sale = new Sale(); staff = new Staff(); tho = new Thoo(); lot = new Lotto(); rw = new Reward(); fl = new FLock(); sr = new SaleRate(); cu = new Customer(); img = new Image1(); nl = new NumberLimit(); r2Down = new Rate(); r2Tod = new Rate(); r2Up = new Rate(); r3Up = new Rate(); r3Tod = new Rate(); r3Down = new Rate(); rUp = new Rate(); rDown = new Rate(); //MessageBox.Show("bbb", "LottoryControl"); rUp = ratedb.selectByPk("up"); rDown = ratedb.selectByPk("down"); r3Up = ratedb.selectByPk("3up"); r3Tod = ratedb.selectByPk("3tod"); r3Down = ratedb.selectByPk("3down"); r2Down = ratedb.selectByPk("2down"); r2Up = ratedb.selectByPk("2up"); lTho = thodb.setData(); setThoColor(); lsr = srdb.selectSRAll(); ls = saledb.selectSAll(); lnl = selectByNumberLimit(); //cboThoo = new ComboBox(); cbosf = new ComboBox(); //cboSale = new ComboBox(); //cboThoo = thodb.getCboThoo(cboThoo); cbosf = sfdb.getCboStaff(cbosf); //cboSale = saledb.getCboSale(cboSale); }