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