Exemplo n.º 1
0
        public Shipment UpdateShipment(ShipmentUpdate shipment)
        {
            using (SqlConnection connection = new SqlConnection(DefaultConnection))
            {
                DynamicParameters p = new DynamicParameters();
                p.Add("shipmentid", shipment.ShipmentID);
                p.Add("businessid", shipment.BusinessID);
                p.Add("shipperid", shipment.ShipperID);
                p.Add("customerid", shipment.CustomerID);
                p.Add("originffw", shipment.OriginFFW);
                p.Add("origin3pl", shipment.Origin3PL);
                p.Add("destinationffw", shipment.DestinationFFW);
                p.Add("destination3pl", shipment.Destination3PL);
                p.Add("hblnumber", shipment.HBLNumber);
                p.Add("mblnumber", shipment.MBLNumber);
                p.Add("containernumber", shipment.ContainerNumber);
                p.Add("etd", shipment.ETD);
                p.Add("eta", shipment.ETA);
                p.Add("txl", shipment.TXL);
                p.Add("isffiled", shipment.ISFFiled);
                p.Add("deliverylocationid", shipment.DeliveryLocationID);
                p.Add("status", shipment.Status);
                p.Add("memo", shipment.Memo);
                p.Add("shipperreference", shipment.ShipperReference);
                p.Add("updatedby", shipment.UpdatedBy);

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

                return(result);
            }
        }
Exemplo n.º 2
0
 public IActionResult UpdateShipment(ShipmentUpdate shipment)
 {
     try
     {
         return(new JsonResult(ShipmentBAL.UpdateShipment(shipment)));
     }
     catch (Exception ex)
     {
         return(StatusCode(StatusCodes.Status500InternalServerError, "Failed to update Shipment"));
     }
 }
Exemplo n.º 3
0
 public Shipment UpdateShipment(ShipmentUpdate shipment)
 {
     return(ShipmentDAL.UpdateShipment(shipment));
 }