コード例 #1
0
 public ActionResult Create_Post()
 {
     try     // handle exogenous exceptions
     {
         try // log all exceptions
         {
             ShippersBusinessModelLayers       shippersBusinessModelLayers = new ShippersBusinessModelLayers();
             BusinessModelLayer.ShippersSingle shippers = new BusinessModelLayer.ShippersSingle();
             TryUpdateModel(shippers);
             if (ModelState.IsValid)
             {
                 //mm
                 shippersBusinessModelLayers.AddShippers(shippers);
                 return(RedirectToAction("List"));
             }
             else
             {
                 return(View());
             }
         }
         catch (Exception ex)
         {
             BusinessLayer.ExceptionLogging exlog = new BusinessLayer.ExceptionLogging();
             exlog.SendExcepToDB(ex);
             throw;
         }
     }
     catch (Exception)
     {
         throw;
     }
 }