Exemplo n.º 1
0
            public CharacterOrder(long CharID, XmlNode xmlNode)
            {
                m_DataObject.charID = CharID;

                m_DataObject.issued       = DBConvert.FromCCPTime(xmlNode.Attributes["issued"].InnerText);
                m_DataObject.orderID      = long.Parse(xmlNode.Attributes["orderID"].InnerText);
                m_DataObject.ownerID      = long.Parse(xmlNode.Attributes["charID"].InnerText);
                m_DataObject.stationID    = long.Parse(xmlNode.Attributes["stationID"].InnerText);
                m_DataObject.volEntered   = long.Parse(xmlNode.Attributes["volEntered"].InnerText);
                m_DataObject.volRemaining = long.Parse(xmlNode.Attributes["volRemaining"].InnerText);
                m_DataObject.minVolume    = long.Parse(xmlNode.Attributes["minVolume"].InnerText);
                m_DataObject.orderState   = DBConvert.ToOrderState(xmlNode.Attributes["orderState"].InnerText);
                m_DataObject.typeID       = long.Parse(xmlNode.Attributes["typeID"].InnerText);
                m_DataObject.range        = DBConvert.ToMarketRange(xmlNode.Attributes["range"].InnerText);
                m_DataObject.accountKey   = DBConvert.ToAccountKey(xmlNode.Attributes["accountKey"].InnerText);
                m_DataObject.duration     = long.Parse(xmlNode.Attributes["duration"].InnerText);
                m_DataObject.escrow       = decimal.Parse(xmlNode.Attributes["escrow"].InnerText);
                m_DataObject.price        = decimal.Parse(xmlNode.Attributes["price"].InnerText);
                m_DataObject.bid          = DBConvert.ToBoolean(xmlNode.Attributes["bid"].InnerText);
            }
Exemplo n.º 2
0
            void SetValue(QueryValues which, object obj)
            {
                switch (which)
                {
                case QueryValues.charID:
                    m_DataObject.charID = DBConvert.ToLong(obj);
                    return;

                case QueryValues.issued:
                    m_DataObject.issued = DBConvert.ToDateTime(obj);
                    return;

                case QueryValues.orderID:
                    m_DataObject.orderID = DBConvert.ToLong(obj);
                    return;

                case QueryValues.ownerID:
                    m_DataObject.charID = DBConvert.ToLong(obj);
                    return;

                case QueryValues.stationID:
                    m_DataObject.stationID = DBConvert.ToLong(obj);
                    return;

                case QueryValues.volEntered:
                    m_DataObject.volEntered = DBConvert.ToLong(obj);
                    return;

                case QueryValues.volRemaining:
                    m_DataObject.volRemaining = DBConvert.ToLong(obj);
                    return;

                case QueryValues.minVolume:
                    m_DataObject.minVolume = DBConvert.ToLong(obj);
                    return;

                case QueryValues.orderState:
                    m_DataObject.orderState = DBConvert.ToOrderState(obj);
                    return;

                case QueryValues.typeID:
                    m_DataObject.typeID = DBConvert.ToLong(obj);
                    return;

                case QueryValues.range:
                    m_DataObject.range = DBConvert.ToMarketRange(obj);
                    return;

                case QueryValues.accountKey:
                    m_DataObject.accountKey = DBConvert.ToAccountKey(obj);
                    return;

                case QueryValues.duration:
                    m_DataObject.duration = DBConvert.ToLong(obj);
                    return;

                case QueryValues.escrow:
                    m_DataObject.escrow = DBConvert.ToDecimal(obj);
                    return;

                case QueryValues.price:
                    m_DataObject.price = DBConvert.ToDecimal(obj);
                    return;

                case QueryValues.bid:
                    m_DataObject.bid = DBConvert.ToBoolean(obj);
                    return;
                }
                throw new ArgumentOutOfRangeException("which", which, "");
            }