コード例 #1
0
 public IActionResult CreateShipmentFee(ShipmentFeeInsert shipmentfee)
 {
     try
     {
         return(new JsonResult(ShipmentBAL.CreateShipmentFee(shipmentfee)));
     }
     catch (Exception ex)
     {
         return(StatusCode(StatusCodes.Status500InternalServerError, "Failed to create Shipment Fee"));
     }
 }
コード例 #2
0
ファイル: ShipmentDAL.cs プロジェクト: alonzoalden/freight
        public ShipmentFee CreateShipmentFee(ShipmentFeeInsert shipmentfee)
        {
            using (SqlConnection connection = new SqlConnection(DefaultConnection))
            {
                DynamicParameters p = new DynamicParameters();
                p.Add("shipmentid", shipmentfee.ShipmentID);
                p.Add("feeid", shipmentfee.FeeID);
                p.Add("feeamount", shipmentfee.FeeAmount);

                ShipmentFee result = connection.Query <ShipmentFee>("spCreateShipmentFee", p, commandType: CommandType.StoredProcedure).Single();

                return(result);
            }
        }
コード例 #3
0
ファイル: ShipmentBAL.cs プロジェクト: alonzoalden/freight
 public ShipmentFee CreateShipmentFee(ShipmentFeeInsert shipmentfee)
 {
     return(ShipmentDAL.CreateShipmentFee(shipmentfee));
 }