Exemplo n.º 1
0
        public Deals Load_Deals(string DealReference)
        {
            string PATCH = Directory_Deals + DealReference + Extention_Deals;

            AsmodatSerialization.DataBase_Deals ASDB_Deals = AsmodatSerialization.Operations.Load <DataBase_Deals>(PATCH);


            if (ASDB_Deals == null)
            {
                return(null);
            }

            Deals DEALS = new Deals();

            DEALS.ASK = ASDB_Deals.ASK;
            DEALS.BID = ASDB_Deals.BID;
            DEALS.BUY = ASDB_Deals.BUY;
            DEALS.ConfirmationNumber = ASDB_Deals.CONFIRMATIONNUMBER;
            DEALS.CONTRACT           = ASDB_Deals.CONTRACT;
            DEALS.COUNTER            = ASDB_Deals.COUNTER;
            DEALS.DealReference      = ASDB_Deals.DEALREFERENCE;
            DEALS.DealSequence       = ASDB_Deals.DEALSEQUENCE;
            DEALS.OPENED             = ASDB_Deals.OPENED;
            DEALS.PRODUCT            = ASDB_Deals.PRODUCT;
            DEALS.RATE = ASDB_Deals.RATE;
            DEALS.SELL = ASDB_Deals.SELL;
            DEALS.TIME = ASDB_Deals.TIME;

            return(DEALS);
        }
Exemplo n.º 2
0
        public void Save_Deals(Deals DEALS)
        {
            AsmodatSerialization.DataBase_Deals ASDB_Deals = new AsmodatSerialization.DataBase_Deals();
            ASDB_Deals.ASK = DEALS.ASK;
            ASDB_Deals.BID = DEALS.BID;
            ASDB_Deals.BUY = DEALS.BUY;
            ASDB_Deals.CONFIRMATIONNUMBER = DEALS.ConfirmationNumber;
            ASDB_Deals.CONTRACT           = DEALS.CONTRACT;
            ASDB_Deals.COUNTER            = DEALS.COUNTER;
            ASDB_Deals.DEALREFERENCE      = DEALS.DealReference;
            ASDB_Deals.DEALSEQUENCE       = DEALS.DealSequence;
            ASDB_Deals.OPENED             = DEALS.OPENED;
            ASDB_Deals.PRODUCT            = DEALS.PRODUCT;
            ASDB_Deals.RATE = DEALS.RATE;
            ASDB_Deals.SELL = DEALS.SELL;
            ASDB_Deals.TIME = DEALS.TIME;

            string PATCH = Directory_Deals + DEALS.DealReference + Extention_Deals;

            this.Delete_Deals(DEALS.DealReference);
            AsmodatSerialization.Operations.Save <AsmodatSerialization.DataBase_Deals>(ASDB_Deals, PATCH);
        }