public static ClientShipment Cast(ShipmentDB order) { var newObject = new ClientShipment() { IdShipment = order.IdShipment, Orders = Cast(order.Orders), QuantityOrders = order.Quantity, TotalWeigthOrders = order.TotalWeigthOrders, IdLoad = order.IdLoad }; return(newObject); }
public static ShipmentDB Cast(ShipmentDTO shipment) { var newObject = new ShipmentDB() { IdLoad = shipment.IdLoad, Quantity = shipment.Quantity, TotalWeigthOrders = shipment.TotalWeigthOrders, IdShipment = shipment.IdShipment, Orders = Cast(shipment.Orders) }; return(newObject); }
public static IList <ShipmentDB> Cast(IList <ClientShipment> shipments) { var list = new List <ShipmentDB>(); foreach (var ships in shipments) { var ship = new ShipmentDB() { IdShipment = ships.IdShipment, Orders = Cast(ships.Orders), Quantity = ships.QuantityOrders, TotalWeigthOrders = ships.TotalWeigthOrders, IdLoad = ships.IdLoad }; list.Add(ship); } return(list); }
public static IList <ShipmentDB> Cast(IEnumerable <ShipmentDTO> orders) { var shipmentList = new List <ShipmentDB>(); foreach (var order in orders) { var newObject = new ShipmentDB() { IdShipment = order.IdShipment, Orders = Cast(order.Orders), Quantity = order.Quantity, TotalWeigthOrders = order.TotalWeigthOrders, IdLoad = order.IdLoad }; shipmentList.Add(newObject); } return(shipmentList); }
/// <summary> /// The Update method will upate a certain shipment that exists into a deleted load /// </summary> /// <param name="id">The id<see cref="int"/></param> /// <param name="shipment">The shipment<see cref="ShipmentDB"/></param> /// <returns>The <see cref="string"/></returns> public string Update(int id, ShipmentDB shipment) { _shipmentRepo.Update(id, shipment); return("updated succesfully"); }