Exemple #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"));
     }
 }
Exemple #2
0
        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);
            }
        }
Exemple #3
0
 public ShipmentFee CreateShipmentFee(ShipmentFeeInsert shipmentfee)
 {
     return(ShipmentDAL.CreateShipmentFee(shipmentfee));
 }