コード例 #1
0
ファイル: BlogController.cs プロジェクト: eCollobro/eCollabro
        public ActionResult BlogCategory(int Id = 0)
        {
            if (!SavePermissionsToViewBag(FeatureEnum.Blog))
                return Redirect("~/home/unauthorized");

            BlogCategoryModel BlogCategoryModel = new BlogCategoryModel();
            BlogCategoryModel.BlogCategoryId = Id;
            if (Request.IsAjaxRequest())
                return PartialView(BlogCategoryModel);
            else
                return View(BlogCategoryModel);
        }
コード例 #2
0
ファイル: ContentClient.cs プロジェクト: eCollobro/eCollabro
 /// <summary>
 /// SaveBlogCategory
 /// </summary>
 /// <param name="blogCategory"></param>
 public void SaveBlogCategory(BlogCategoryModel blogCategory)
 {
     BlogCategoryDC blogCategoryDC = Mapper.Map<BlogCategoryModel, BlogCategoryDC>(blogCategory);
     ServiceResponse<int> saveBlogCategoryResponse = _contentProxy.Execute(opt => opt.SaveBlogCategory(blogCategoryDC));
     if (saveBlogCategoryResponse.Status != ResponseStatus.Success)
         HandleError(saveBlogCategoryResponse.Status, saveBlogCategoryResponse.ResponseMessage);
     else
         blogCategory.BlogCategoryId = saveBlogCategoryResponse.Result;
 }
コード例 #3
0
 public HttpResponseMessage SaveBlogCategory(BlogCategoryModel blogCategoryModel, int siteId)
 {
     ContentClientProcessor.UserContext.SiteId = siteId;
     ContentClientProcessor.SaveBlogCategory(blogCategoryModel);
     return Request.CreateResponse(HttpStatusCode.OK, new { Message = CoreMessages.SavedSuccessfully, Id = blogCategoryModel.BlogCategoryId });
 }
コード例 #4
0
ファイル: ContentClient.cs プロジェクト: eCollobro/eCollabro
 /// <summary>
 /// GetBlogCategory
 /// </summary>
 /// <param name="blogCategoryId"></param>
 /// <returns></returns>
 public BlogCategoryModel GetBlogCategory(int blogCategoryId)
 {
     BlogCategoryModel BlogCategoryResult = new BlogCategoryModel();
     ServiceResponse<BlogCategoryDC> BlogCategoryResponse = _contentProxy.Execute(opt => opt.GetBlogCategory(blogCategoryId));
     if (BlogCategoryResponse.Status == ResponseStatus.Success)
     {
         BlogCategoryResult = Mapper.Map<BlogCategoryDC, BlogCategoryModel>(BlogCategoryResponse.Result);
     }
     else
     {
         HandleError(BlogCategoryResponse.Status, BlogCategoryResponse.ResponseMessage);
     }
     return BlogCategoryResult;
 }