Ejemplo n.º 1
0
        public ActionResult _ListPointItems(string spaceKey)
        {
            PointSettings pointSettings = pointSettingsManger.Get();

            IEnumerable <PointItem> pointItems = pointService.GetPointItemsOfIncome();

            IEnumerable <PointCategory> pointCategories = pointService.GetPointCategories();

            ViewData["traPoint"]        = pointCategories.FirstOrDefault(n => n.CategoryKey.Equals("TradePoints")).CategoryName;
            ViewData["expPoint"]        = pointCategories.FirstOrDefault(n => n.CategoryKey.Equals("ExperiencePoints")).CategoryName;
            ViewData["prePoint"]        = pointCategories.FirstOrDefault(n => n.CategoryKey.Equals("ReputationPoints")).CategoryName;
            ViewData["pointCategories"] = pointCategories;
            ViewData["pointRule"]       = pointSettings.UserIntegratedPointRuleText;


            return(View("_ListPointItems", pointItems));
        }
Ejemplo n.º 2
0
        public ActionResult SectionSettings()
        {
            IEnumerable <PointCategory> pointCategories = pointService.GetPointCategories();

            ViewData["prePoint"] = pointCategories.FirstOrDefault(n => n.CategoryKey.Equals("ReputationPoints")).CategoryName;

            IBarSettingsManager manager  = DIContainer.Resolve <IBarSettingsManager>();
            BarSettings         settings = manager.Get();

            return(View(settings.AsEditModel()));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 生成动态操作链接
        /// </summary>
        private static MvcHtmlString PointMessage(this HtmlHelper htmlHelper, long userId)
        {
            PointService pointService = new PointService();
            IEnumerable <PointCategory> pointCategories = pointService.GetPointCategories();

            htmlHelper.ViewData["ExperiencePoints"] = pointCategories.FirstOrDefault(n => n.CategoryKey.Equals("ExperiencePoints")).CategoryName;
            htmlHelper.ViewData["ReputationPoints"] = pointCategories.FirstOrDefault(n => n.CategoryKey.Equals("ReputationPoints")).CategoryName;
            htmlHelper.ViewData["TradePoints"]      = pointCategories.FirstOrDefault(n => n.CategoryKey.Equals("TradePoints")).CategoryName;

            PointRecord pointRecord = pointService.GetUserLastestRecord(userId);

            htmlHelper.ViewData["PointRecord"] = pointRecord;
            return(htmlHelper.DisplayForModel("PointMessage"));
        }