void betBallTask() { var ball = new H5GameRepository().H5GetAll(2); if (ball.Count != 0) { new H5GameRepository().ballAutoPay(ball.Where(x => x.gameStatus == 1).FirstOrDefault()); } else { H5Games h5g = new H5Games { title = "樂透", gameModel = 2, gameStatus = 1, valid = 1, rake = 20, createDate = DateTime.Now, totallottery = 0, endTime = DateTime.Now.AddMinutes(30) }; new H5GameRepository().GameCreate(h5g); } }
void AKTask() { var ak = new H5GameRepository().H5GetAll(1); if (ak.Count != 0 && (ak.Where(x => x.gameStatus == 1).FirstOrDefault() != null)) { new H5GameRepository().akAutoPay(ak.Where(x => x.gameStatus == 1).FirstOrDefault()); } else { H5Games h5g = new H5Games { title = "A-K選牌", gameModel = 1, gameStatus = 1, valid = 1, rake = 5, createDate = DateTime.Now, endTime = DateTime.Now.AddMinutes(10) }; new H5GameRepository().GameCreate(h5g); } }