Пример #1
0
        public ActionResult BuyService()
        {
            var market = _iLimitTimeBuyService.GetMarketService(CurrentSellerManager.ShopId);

            ViewBag.Market = market;
            string endDate = null;
            bool   expired = false;

            ViewBag.LastBuyPrice = -1;
            if (market != null)
            {
                var endtime = MarketApplication.GetServiceEndTime(market.Id);

                if (market != null && endtime < DateTime.Now)
                {
                    endDate = string.Format("<font class=\"red\">{0} 年 {1} 月 {2} 日</font> (您的限时购服务已经过期)", endtime.Year, endtime.Month, endtime.Day);
                    expired = true;
                }
                else if (market != null && endtime > DateTime.Now)
                {
                    endDate = string.Format("{0} 年 {1} 月 {2} 日", endtime.Year, endtime.Month, endtime.Day);
                }

                ViewBag.LastBuyPrice = MarketApplication.GetLastBuyPrice(market.Id);
            }
            else
            {
                expired = true;
                ViewBag.LastBuyPrice = 0;
            }
            ViewBag.IsExpired = expired;
            ViewBag.EndDate   = endDate;
            ViewBag.Price     = _iLimitTimeBuyService.GetServiceSetting().Price;
            return(View());
        }
Пример #2
0
        public ActionResult Management()
        {
            var settings = _iLimitTimeBuyService.GetServiceSetting();

            if (settings == null)
            {
                return(View("Nosetting"));
            }

            bool expired = false;
            ActiveMarketServiceInfo market = _iLimitTimeBuyService.GetMarketService(CurrentSellerManager.ShopId);

            if (market == null || market != null && ((Himall.Model.ActiveMarketServiceInfo)market).MarketServiceRecordInfo.Max(a => a.EndTime) < DateTime.Now.Date)
            {
                expired = true;
            }
            ViewBag.IsExpired = expired;
            return(View());
        }
        public ActionResult ServiceSetting()
        {
            LimitTimeBuySettingModel model = _iLimitTimeBuyService.GetServiceSetting();

            return(View(model));
        }