예제 #1
0
        public ActionResult Index()
        {
            Game gamepo = new Game();

            try
            {
                List <CalculationBO> table     = new List <CalculationBO>();
                List <GameOrderDO>   gameorder = new List <GameOrderDO>();
                gameorder = _GameOrderDataAccess.ViewAllGameOrders();
                foreach (GameOrderDO view in gameorder)
                {
                    CalculationBO businesObject = new CalculationBO();
                    businesObject.GameId      = view.GameId;
                    businesObject.GameOrderId = view.GameOrderId;
                    businesObject.Price       = view.Price;
                    table.Add(businesObject);
                }
                long   value  = calc.Total(table);
                GameDO gamedo = new GameDO();

                gamedo = game.ViewGameByGameId(value);
                gamepo = mapper.MapDoToPo(gamedo);
            }
            catch
            {
            }

            return(View(gamepo));
        }
예제 #2
0
        public CalculationBO MapPotoDo(Calculation from)
        {
            CalculationBO to = new CalculationBO();

            to.GameId      = from.GameId;
            to.GameOrderId = from.GameOrderId;
            to.OrderId     = from.OrderId;
            to.Price       = from.Price;
            return(to);
        }
예제 #3
0
        public Calculation MapBoToPo(CalculationBO from)
        {
            Calculation to = new Calculation();

            to.GameId      = from.GameId;
            to.GameOrderId = from.GameOrderId;
            to.OrderId     = from.OrderId;
            to.Price       = from.Price;
            return(to);
        }