コード例 #1
0
        //GET: AccountDetail
        public ActionResult Index()
        {
            var user_name = HttpContext.User.Identity.Name;
            var viewmodel = Account.get_account_detail(user_name);
            var _order    = Account.Get_order(viewmodel.Cust_id);
            var _Coupon   = Account.Coupon(viewmodel.Cust_id);

            TempData["ID"]     = viewmodel.Cust_id;
            viewmodel.Discount = _Coupon.Discount;
            ViewBag.Order      = _order;
            return(View(viewmodel));
        }
コード例 #2
0
        public void IndexTest()
        {
            var user_name = "*****@*****.**";
            var viewmodel = Account.get_account_detail(user_name);
            var _order    = Account.Get_order(viewmodel.Cust_id);
            var _Coupon   = Account.Coupon(viewmodel.Cust_id);

            Assert.IsNotNull(_order);
            Assert.IsNotNull(_Coupon);
        }