Ejemplo n.º 1
0
        public ActionResult Education()
        {
            ViewData["AdditionHeader"] = "我的设置";
            EducationModel model = new EducationModel();

            model.CurUser       = CurrentUser;
            model.CurUserConfig = CurrentUserConfig;
            model.Educations    = Educations.GetEducationsByUID(model.CurUser.ID);
            return(View(model));
        }
Ejemplo n.º 2
0
        //
        // GET: /MiniBlog/

        public ActionResult Info(long uid)
        {
            if (CurrentUser.ID == uid)
            {
                Models.MyInfoModel model = new Models.MyInfoModel();
                model.CurSkinCss    = CurrentCssUrl;
                model.CurUser       = CurrentUser;
                model.CurUserConfig = CurrentUserConfig;
                model.MyCareer      = Careers.GetCareersByUID(model.CurUser.ID);
                model.MyEducation   = Educations.GetEducationsByUID(model.CurUser.ID);
                return(View("~/Views/MiniBlog/MyInfo.cshtml", model));
            }
            else
            {
                Models.OtherInfoModel model = new Models.OtherInfoModel();
                model.CurUser         = CurrentUser;
                model.CurUserConfig   = CurrentUserConfig;
                model.OtherUser       = Users.GetUserByID(uid);
                model.OtherUserConfig = Users.GetUserConfigByID(model.OtherUser.ID);
                model.OtherCareer     = Careers.GetCareersByUID(model.OtherUser.ID);
                model.OtherEducation  = Educations.GetEducationsByUID(model.OtherUser.ID);
                if (model.OtherUserConfig.IsThemeDIY == 1)
                {
                    model.OthersSkinCss = "/DiyCss/" + model.OtherUser.ID.ToString();
                }
                else
                {
                    Theme t = Themes.GetThemeByID(model.OtherUserConfig.ThemeID);
                    if (t != null)
                    {
                        model.OthersSkinCss = t.CssUrl;
                    }
                    else
                    {
                        model.OthersSkinCss = "";
                    }
                }
                return(View("~/Views/MiniBlog/OtherInfo.cshtml", model));
            }
        }