Ejemplo n.º 1
0
        public PublicModel(SnsUser user, int cate) : base(user)
        {
            var activityService = ServiceFactory.GetService <IActivityService>();

            ViewRanges = CodeTable.GetCodes(typeof(ViewRange));
            Activities = activityService.GetNewestActivities(user.Id, (ActivityCategory)cate, 0);
        }
Ejemplo n.º 2
0
        public ActionResult Content(int t)
        {
            var tab         = (ContentType)t;
            var user        = GetSnsUser();
            var partialView = string.Format("Contents/{0}", tab);
            var tabs        = CodeTable.GetCodes(typeof(ContentType));
            var model       = new TabPageModel(user, "内容管理", partialView, tabs);

            switch (tab)
            {
            case ContentType.Company:
                model.Data = LoadService <ICompanyService>().GetCompany(CurrentUser.Id);
                break;
            }
            return(View("_TabPage", model));
        }
Ejemplo n.º 3
0
        public new ActionResult Profile(int t)
        {
            var tab         = (ProfileType)t;
            var user        = GetSnsUser();
            var tabs        = CodeTable.GetCodes(typeof(ProfileType));
            var partialView = string.Format("Profiles/{0}", tab);
            var model       = new TabPageModel(user, "账户设置", partialView, tabs);

            switch (tab)
            {
            case ProfileType.Basic:
                model.Data = CurrentUser;
                break;
            }
            return(View("_TabPage", model));
        }