public void RaiseChange(OnHandStock onHandStock)
 {
     if (Change != null)
     {
         Change(this, new OnHandDetailChangeEventArgs(onHandStock));
     }
 }
        //public void Update(SecurityInfo si, int onhand, int available)
        //{
        //    for (int i = 0; i < onHandStocks.Count; i++)
        //    {
        //        if (onHandStocks[i].Si == si)
        //        {
        //            onHandStocks[i].StockOnHand = onhand;
        //            onHandStocks[i].StockAvailable = available;
        //            return;
        //        }
        //    }
        //    onHandStocks.Add(new OnHandStock(si, onhand, available));
        //}

        //public int GetAvailable(SecurityInfo si)
        //{
        //    for (int i = 0; i < onHandStocks.Count; i++)
        //    {
        //        if (onHandStocks[i].Si == si)
        //        {
        //            return onHandStocks[i].StockAvailable;
        //        }
        //    }
        //    return 0;
        //}

        public void AddOnHandDetail(SecurityInfo securityInfo, int onh, int ava)
        {
            lock (_lockObj)
            {
                OnHandStock ohs = new OnHandStock(securityInfo, onh, ava);
                onHandStocks.Add(ohs);
                RaiseChange(ohs);
            }
        }