public ActionResult UpdateCategory() { InformationCategoryEntity category = RequestArgs <InformationCategoryEntity>(); if (category == null) { return(RespondResult(false, "参数无效。")); } category.Domain = UserContext.User.Domain; _informationManager.UpdateCategory(category); #region 操作日志 _operatedLogManager.Create(new OperatedLogEntity() { Domain = DomainContext.Domain.Id, AppId = DomainContext.AppId, User = UserContext.User.Id, IP = Request.UserHostAddress, Module = EnumModule.Information, Description = "更新分类信息分类" }); #endregion return(RespondResult()); }
public void UpdateCategory(InformationCategoryEntity informationCategory) { if (informationCategory == null) { Debug.Assert(false, "informationCategory 为空"); return; } _dataBase.Update(informationCategory); }
public void CreateCategory(InformationCategoryEntity informationCategory) { if (informationCategory == null) { Debug.Assert(false, "informationCategory 为空"); return; } informationCategory.CreateTime = DateTime.Now; _dataBase.Insert(informationCategory); }
public ActionResult GetCategory() { string id = Request.QueryString["id"]; if (String.IsNullOrEmpty(id)) { return(RespondResult(false, "参数无效。")); } InformationCategoryEntity category = _informationManager.GetCategory(Guid.Parse(id)); return(RespondDataResult(category)); }
public InformationCategoryEntity GetCategory(Guid id) { InformationCategoryEntity category = new InformationCategoryEntity(); category.Id = id; if (_dataBase.Fill <InformationCategoryEntity>(category)) { return(category); } else { return(null); } }