コード例 #1
0
        public static int CreateGame(string name, int pegi, string description
                                     , double pricen, double priceo, double pricep, string img, string availability)
        {
            db = new Database();
            GameModel data = new GameModel
            {
                Name          = name,
                Pegi          = pegi,
                Description   = description,
                PriceNew      = pricen,
                PriceOld      = priceo,
                PricePurchase = pricep,
                CoverImage    = img,
                Availability  = availability,
            };
            LogUnit log;

            log.id      = 1;
            log.message = DateTime.Now.Date.ToString() + " new game added: " + data.Name;
            LogGateway.LoadDocument(@"C:\vis\WebApplication\DataLibrary\test.xml");
            LogGateway.Insert(ref log);
            return(GameGateway.Insert(db, data));
        }
コード例 #2
0
ファイル: Facade.cs プロジェクト: busterkaas/MVOGames
 public GameGateway GetGameGateway()
 {
     return gameGW != null ? gameGW : gameGW = new GameGateway();
 }
コード例 #3
0
 public static Collection <GameModel> GetAllResults()
 {
     db = new Database();
     return(GameGateway.LoadAll(db));
 }
コード例 #4
0
ファイル: GameService.cs プロジェクト: renteadan/map
 public GameService() : base(new GameGateway(), new GameValidator())
 {
     _gateway = new GameGateway();
 }