示例#1
0
        public bool setPrice(int Skittles_cost_d, int cottoncandy_cost_d, int creamegg_cost_d, int jawbreaker_cost_d, int redvinelicornes_cost_d, int sugardaddy_cost_d)
        {
            priceBusiness lePrice = new priceBusiness() {
                Skittle_price = Skittles_cost_d,
                cottoncandy_price = creamegg_cost_d,
                creamegg_price = creamegg_cost_d,
                jawbreaker_price = jawbreaker_cost_d,
                redvinelicornes_price = redvinelicornes_cost_d,
                sugardaddy_price = sugardaddy_cost_d
            };

            return monControlleur.setPrice(lePrice);
        }
        /***************************
         * Price Convert
         * *************************/
        public static priceBusiness toPriceBusiness(Price lePrice)
        {
            priceBusiness lePriceBusiness = new priceBusiness()
            {

                Skittle_price = lePrice.Skittles_cost,
                cottoncandy_price = lePrice.cottoncandy_cost,
                creamegg_price = lePrice.creamegg_cost,
                jawbreaker_price = lePrice.jawbreaker_cost,
                redvinelicornes_price = lePrice.redvinelicornes_cost,
                sugardaddy_price = lePrice.sugardaddy_cost
            };
            return lePriceBusiness;
        }
        public static Price toPrice(priceBusiness lePrice)
        {
            Price lePriceData = new Price()
            {
                Skittles_cost = lePrice.Skittle_price,
                cottoncandy_cost = lePrice.cottoncandy_price,
                creamegg_cost = lePrice.creamegg_price,
                jawbreaker_cost = lePrice.jawbreaker_price,
                redvinelicornes_cost = lePrice.redvinelicornes_price,
                sugardaddy_cost = lePrice.sugardaddy_price
            };

            return lePriceData;
        }
 public bool setPrice(priceBusiness unPrice)
 {
     return monData.setPrice(convertBusiness.toPrice(unPrice));
 }