/// <summary> /// Get Shipment Information From the sage /// </summary> /// <param name="ShipmentID">String Shiment Number</param> /// <param name="LocationNull">Boolean loacation filer true</param> /// <returns>List<cstShipment></returns> public List <cstShipment> GetShipmentInfoFromSage(string ShipmentID, Boolean LocationNull) { try { //selection operation that fetch the data from the sage DB for the perticular id //linq query var _Shipment = Service.Get.View_Get_Shipping_DataAll(); //from Ship in entx3v6.Get_Shipping_Data // where Ship.ShipmentID == ShipmentID // select Ship; //Add each shipment information row in to the list foreach (var _shipentItem in _Shipment) { cstShipment _ship = new cstShipment(); _ship.SKU = _shipentItem.SKU; _ship.Quantity = Convert.ToInt64(_shipentItem.Quantity); _ship.ProductName = _shipentItem.ProductName; _ship.UPCCode = _shipentItem.UPCCode; _ship.Location = _shipentItem.LocationCombined; _lsShipment_SPAKD.Add(_ship); } } catch (Exception Ex) { Error_Loger.elAction.save("GetShipmentDetails_command.Execute()", Ex.Message.ToString()); } return(_lsShipment_SPAKD); }
/// <summary> /// Get Shipment information from the sage /// </summary> /// <param name="ShipmentID">String shipment number</param> /// <returns>List<cstShipment></returns> public List <cstShipment> GetShipmentInfoFromSage(string ShipmentID) { try { String _location = cmdLocalFile.ReadString("Location"); //selection operation that fetch the data from the sage DB for the perticular id //linq query var _Shipment = from Ship in entx3v6.Get_Shipping_Data.OrderBy(i => i.Row_Number) where Ship.ShipmentID == ShipmentID && Ship.LocationCombined == _location select new { Ship.Row_Number, Ship.ShipmentID, Ship.SKU, Ship.ItemName, Ship.ProductName, Ship.Quantity, Ship.ItemWeight, Ship.UnitOfMeasure, Ship.LineType, Ship.UPCCode, Ship.CountryOfOrigin, Ship.MAP_Price, Ship.TCLCOD_0, Ship.TarrifCode, Ship.ValidationFLG, Ship.ShippingLocation, Ship.AllocationLocation, Ship.LocationCombined, }; //Add each shipment information row in to the list foreach (var _shipentItem in _Shipment) { cstShipment _ship = new cstShipment(); _ship.UPCCode = _shipentItem.UPCCode; _ship.Location = _shipentItem.LocationCombined; _ship.LineType = Convert.ToInt32(_shipentItem.LineType); _ship.SKU = _shipentItem.SKU; _ship.Quantity = Convert.ToInt64(_shipentItem.Quantity); _ship.ProductName = _shipentItem.ProductName; _lsShipment_SPAKD.Add(_ship); } } catch (Exception Ex) { Error_Loger.elAction.save("GetShipmentDetails_command.Execute()", Ex.Message.ToString()); } return(_lsShipment_SPAKD); }