public async Task <ActionResult> UpdateNoticesGategory(OutModels.Models.NoticesGategory cat) { try { NoticesCategoryModel pcm = (NoticesCategoryModel)_mapper.Map <OutModels.Models.NoticesGategory, NoticesCategoryModel>(cat); return(new JsonResult(await this._repository.Update(pcm))); } catch (Exception ex) { return(null); } }
public async Task <ActionResult> DisableCategory(OutModels.Models.NoticesGategory cat) { try { int id = cat.NC_Id; if (id == 0) { return(new JsonResult(ResponseModel.Error("دسته بندی مورد نظر یافت نشد"))); } return(new JsonResult(await this._repository.LogicalAvailable(id, false))); } catch (Exception ex) { return(null); } }