예제 #1
0
 public JavaScriptResult Create(CourierViewModel Couriervm)
 {
     try
     {
         _courierService.Add(Mapper.Map <Courier>(Couriervm));
         return(JavaScript($"ShowResult('{"Data saved successfully."}','{"success"}','{"redirect"}','{"/Courier"}')"));
     }
     catch (Exception ex)
     {
         return(JavaScript($"ShowResult('{ex.Message}','failure')"));
     }
 }