コード例 #1
0
 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);
     }
 }
コード例 #2
0
 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);
     }
 }
コード例 #3
0
 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);
     }
 }
コード例 #4
0
 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);
     }
 }