public IActionResult CreateShipmentFee(ShipmentFeeInsert shipmentfee) { try { return(new JsonResult(ShipmentBAL.CreateShipmentFee(shipmentfee))); } catch (Exception ex) { return(StatusCode(StatusCodes.Status500InternalServerError, "Failed to create Shipment Fee")); } }
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); } }
public ShipmentFee CreateShipmentFee(ShipmentFeeInsert shipmentfee) { return(ShipmentDAL.CreateShipmentFee(shipmentfee)); }