public TradeOperation(double time, string shipId, string fullLogEntry, string shipName, int quantity, string product, string soldToId, string soldToName, string faction, int money)
        {
            if ("Please load the XML".Equals(shipId))
            {
                return;
            }
            this.Time = time;
            Ship ourShip = Ship.GetShip(shipId);

            //this is to ensure the last name of the ship sticks
            OurShip.ShipName = shipName;

            this.OurShip      = ourShip;
            this.FullLogEntry = fullLogEntry;
            this.Quantity     = quantity;

            Ware itemSold = Ware.GetWare(product);

            this.ItemSold = itemSold;

            this.SoldTo          = Ship.GetSoldTo(soldToId);
            this.SoldTo.ShipName = soldToName;
            this.Faction         = faction;
            this.Money           = money;
            ourShip.AddTradeOperation(this);
            PartialSumByShip = OurShip.GetListOfTradeOperations().Sum(x => x.Money);
            PartialSumByWare = 0;


            itemSold.AddTradeOperation(this);
        }
 public void ParseTextEntry(XmlReader logEntry)
 {
     this.FullLogEntry     = logEntry.Value;
     this.OurShip          = Ship.GetShip(getShipID(logEntry.Value));
     this.OurShip.ShipName = getShipName(logEntry.Value, this.OurShip.ShipID);
     this.Quantity         = getQtdSold(logEntry.Value);
     this.ItemSold         = Ware.GetWare(getProduct(logEntry.Value, this.Quantity));
     this.SoldTo           = Ship.GetSoldTo(getDestinationID(logEntry.Value));
     this.SoldTo.ShipName  = getSoldToName(logEntry.Value, this.SoldTo.ShipID);
 }