public async Task <ActionResult> DeleteChild(OutModels.Models.VideoGallery vg) { try { return(new JsonResult(await this._repository.Delete(vg.VG_Id))); } catch (Exception ex) { return(null); } }
public async Task <ActionResult> UpdateGalleryChild(OutModels.Models.VideoGallery vg) { try { VideoGalleryModel pcm = (VideoGalleryModel)_mapper.Map <OutModels.Models.VideoGallery, VideoGalleryModel>(vg); return(new JsonResult(await this._repository.Update(pcm))); } catch (Exception ex) { return(null); } }
public async Task <ActionResult> AddChild(OutModels.Models.VideoGallery vg) { try { VideoGalleryModel b = (VideoGalleryModel)_mapper.Map <OutModels.Models.VideoGallery, VideoGalleryModel>(vg); return(new JsonResult(await this._repository.Insert(b))); } catch (Exception ex) { return(null); } }
public async Task <ActionResult> DisableChild(OutModels.Models.VideoGallery vg) { try { int id = vg.VG_Id; if (id == 0) { return(new JsonResult(ResponseModel.Error("گالری مورد نظر یافت نشد"))); } return(new JsonResult(await this._repository.LogicalAvailable(id, false))); } catch (Exception ex) { return(null); } }