Beispiel #1
0
 public JavaScriptResult Create(StyleViewModel Stylevm)
 {
     try
     {
         _styleService.Add(Mapper.Map <Style>(Stylevm));
         return(JavaScript($"ShowResult('{"Data saved successfully."}','{"success"}','{"redirect"}','{"/APanel/Style"}')"));
     }
     catch (Exception ex)
     {
         return(JavaScript($"ShowResult('{ex.Message}','failure')"));
     }
 }