public async Task <ActionResult> UpdateGalleryChild(OutModels.Models.ImageGallery ig) { try { ImageGalleryModel pcm = (ImageGalleryModel)_mapper.Map <OutModels.Models.ImageGallery, ImageGalleryModel>(ig); return(new JsonResult(await this._repository.Update(pcm))); } catch (Exception ex) { return(null); } }
public async Task <ActionResult> DeleteChild(OutModels.Models.ImageGallery ig) { try { ImageGalleryModel igm = await this._repository.GetById(ig.IG_Id); var res = this._uploaderService.RemoveFile("IMAGEGALLERY", "GALLERYCHILD", igm.IG_ImageUrl); return(new JsonResult(await this._repository.Delete(igm))); } catch (Exception ex) { return(null); } }
public async Task <ActionResult> DisableChild(OutModels.Models.ImageGallery ig) { try { int id = ig.IG_Id; if (id == 0) { return(new JsonResult(ResponseModel.Error("گالری مورد نظر یافت نشد"))); } return(new JsonResult(await this._repository.LogicalAvailable(id, false))); } catch (Exception ex) { return(null); } }