Example #1
0
 public void AddSecPositionInfo(string data)
 {
   TransaqSecPosition tsp = new TransaqSecPosition(data);
   lock (this.lockerSecPosition)
   {
     if (!this.SecPosition.ContainsKey(tsp.Client))
     {
       this.SecPosition.Add(tsp.Client, new Dictionary<string, TransaqSecPosition>());
       this.SecPosition[tsp.Client].Add(tsp.SecCode + tsp.Register, tsp);
     }
     else if (!this.SecPosition[tsp.Client].ContainsKey(tsp.SecCode + tsp.Register))
       this.SecPosition[tsp.Client].Add(tsp.SecCode + tsp.Register, tsp);
     else
       this.SecPosition[tsp.Client][tsp.SecCode + tsp.Register].Update(tsp);
   }
 }
Example #2
0
 public void Update(TransaqSecPosition tsp)
 {
     if (tsp.SecId != -1)
     {
         this.SecId = tsp.SecId;
     }
     if (tsp.Client != string.Empty)
     {
         this.Client = tsp.Client;
     }
     if (tsp.ShortName != string.Empty)
     {
         this.ShortName = tsp.ShortName;
     }
     if (tsp.SaldoIn != string.Empty)
     {
         this.SaldoIn = tsp.SaldoIn;
     }
     if (tsp.SaldoMin != string.Empty)
     {
         this.SaldoMin = tsp.SaldoMin;
     }
     if (tsp.Bought != -1)
     {
         this.Bought = tsp.Bought;
     }
     if (tsp.Sold != -1)
     {
         this.Sold = tsp.Sold;
     }
     if (tsp.Saldo != double.MaxValue)
     {
         this.Saldo = tsp.Saldo;
     }
     if (tsp.OrderBuy != string.Empty)
     {
         this.OrderBuy = tsp.OrderBuy;
     }
     if (!(tsp.OrderSell != string.Empty))
     {
         return;
     }
     this.OrderSell = tsp.OrderSell;
 }
Example #3
0
        public void AddSecPositionInfo(string data)
        {
            TransaqSecPosition tsp = new TransaqSecPosition(data);

            lock (this.lockerSecPosition)
            {
                if (!this.SecPosition.ContainsKey(tsp.Client))
                {
                    this.SecPosition.Add(tsp.Client, new Dictionary <string, TransaqSecPosition>());
                    this.SecPosition[tsp.Client].Add(tsp.SecCode + tsp.Register, tsp);
                }
                else if (!this.SecPosition[tsp.Client].ContainsKey(tsp.SecCode + tsp.Register))
                {
                    this.SecPosition[tsp.Client].Add(tsp.SecCode + tsp.Register, tsp);
                }
                else
                {
                    this.SecPosition[tsp.Client][tsp.SecCode + tsp.Register].Update(tsp);
                }
            }
        }
Example #4
0
 public void Update(TransaqSecPosition tsp)
 {
   if (tsp.SecId != -1)
     this.SecId = tsp.SecId;
   if (tsp.Client != string.Empty)
     this.Client = tsp.Client;
   if (tsp.ShortName != string.Empty)
     this.ShortName = tsp.ShortName;
   if (tsp.SaldoIn != string.Empty)
     this.SaldoIn = tsp.SaldoIn;
   if (tsp.SaldoMin != string.Empty)
     this.SaldoMin = tsp.SaldoMin;
   if (tsp.Bought != -1)
     this.Bought = tsp.Bought;
   if (tsp.Sold != -1)
     this.Sold = tsp.Sold;
   if (tsp.Saldo != double.MaxValue)
     this.Saldo = tsp.Saldo;
   if (tsp.OrderBuy != string.Empty)
     this.OrderBuy = tsp.OrderBuy;
   if (!(tsp.OrderSell != string.Empty))
     return;
   this.OrderSell = tsp.OrderSell;
 }