Esempio n. 1
0
        public ActionResult AddCallForContent(String contentID)
        {
            //获取并设置项目版本号
            SetMetasVersion();
            //获取当前登录的用户编号
            String userID = User.Identity.Name;
            userID = userID == "" ? null : userID;
            //用户必须登录才能打开该页面
            if (userID == null || userID == "")
                return RedirectToAction("Error", "Error", new { errNo = "参数不正确。" });

            Models.PageModels.Content.AddContentModel model = new Models.PageModels.Content.AddContentModel();
            model.UserID = userID;
            model.MemberID = userID;
            model.AlreadyLogon = userID == null || userID == "" ? false : true;
            model.Member = userID == null || userID == "" ? null : Models.DisplayObjProvider.getMemberFullDisplayObj(userID);
            //图片上传时要用到的图片类型
            ViewData["phototype"] = BiZ.Photo.PhotoType.CallForContentPhoto.GetHashCode();
            if (contentID != null && contentID != "")
            {
                model.contentObj = new BiZ.Content.PublicContent().getPublicContent(contentID);
            }
            return View(model);
        }
Esempio n. 2
0
 public ActionResult AddContentType(BiZ.Content.ContentType contentType, BiZ.Content.PublicContent contentObj)
 {
     //获取并设置项目版本号
     SetMetasVersion();
     //获取当前登录的用户编号
     String userID = User.Identity.Name;
     userID = userID == "" ? null : userID;
     //用户必须登录才能打开该页面
     if (userID == null || userID == "")
         return RedirectToAction("Error", "Error", new { errNo = "参数不正确。" });
     Models.PageModels.Content.AddContentModel model = new Models.PageModels.Content.AddContentModel();
     model.UserID = userID;
     model.MemberID = userID;
     model.AlreadyLogon = true;
     model.type = getContentType(contentType);
     if (contentObj != null)
     {
         model.contentObj = contentObj;
     }
     return View(model);
 }
Esempio n. 3
0
 /// <summary>
 /// 右边的公共控件
 /// </summary>
 /// <param name="interestList">当前用户的兴趣集合</param>
 /// <returns></returns>
 public ActionResult AddRightPanel(BiZ.Content.PublicContent contentObj)
 {
     //获取并设置项目版本号
     SetMetasVersion();
     //获取当前登录的用户编号
     String userID = User.Identity.Name;
     userID = userID == "" ? null : userID;
     ////用户必须登录才能打开该页面
     //if (userID == null || userID == "")
     //    return RedirectToAction("Error", "Error", new { errNo = "参数不正确。" });
     Models.PageModels.Content.AddContentModel model = new Models.PageModels.Content.AddContentModel();
     model.UserID = userID;
     model.MemberID = userID;
     model.AlreadyLogon = userID == null || userID == "" ? false : true;
     model.interestList = BiZ.InterestCenter.InterestFactory.GetMemberInterest(userID, 0, 0);
     if (contentObj != null)
     {
         model.contentObj = contentObj;
     }
     else
     {
         model.contentObj = null;
     }
     return View(model);
 }
Esempio n. 4
0
 public ActionResult ImageUploadascx(Boolean ifShowUp, String contentTitle, String photoType, BiZ.Content.PublicContent contentObj)
 {
     SetMetasVersion();
     String userID = User.Identity.Name;
     userID = userID == "" ? null : userID;
     Models.PageModels.Content.AddContentModel model = new Models.PageModels.Content.AddContentModel();
     model.UserID = userID;
     model.MemberID = userID;
     model.AlreadyLogon = userID == null || userID == "" ? false : true;
     if (contentObj != null)
     {
         model.contentObj = contentObj;
     }
     ViewData["ifShowUp"] = ifShowUp;
     ViewData["contentTitle"] = contentTitle;
     ViewData["phototype"] = photoType;
     return View(model);
 }