Beispiel #1
0
 public IActionResult UpdateShipmentFee(ShipmentFeeUpdate shipmentfee)
 {
     try
     {
         return(new JsonResult(ShipmentBAL.UpdateShipmentFee(shipmentfee)));
     }
     catch (Exception ex)
     {
         return(StatusCode(StatusCodes.Status500InternalServerError, "Failed to update Shipment Fee"));
     }
 }
Beispiel #2
0
        public ShipmentFee UpdateShipmentFee(ShipmentFeeUpdate shipmentfee)
        {
            using (SqlConnection connection = new SqlConnection(DefaultConnection))
            {
                DynamicParameters p = new DynamicParameters();
                p.Add("shipmentfeeid", shipmentfee.ShipmentFeeID);
                p.Add("shipmentid", shipmentfee.ShipmentID);
                p.Add("feeid", shipmentfee.FeeID);
                p.Add("feeamount", shipmentfee.FeeAmount);

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

                return(result);
            }
        }
Beispiel #3
0
 public ShipmentFee UpdateShipmentFee(ShipmentFeeUpdate shipmentfee)
 {
     return(ShipmentDAL.UpdateShipmentFee(shipmentfee));
 }