Exemplo n.º 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);
     }
 }
Exemplo n.º 2
0
 public JsonResult SaveGalleryCategory(GalleryCategoryModel model)
 {
     tbl_GalleryCategory category = GalleryService.SaveGalleryCategory(model.Title, model.GalleryCategoryID);
     return Json((category != null) ?
             new { success = true, galleryCategoryID = category.GalleryCategoryID } :
             new { success = false, galleryCategoryID = 0 }
         );
 }