public InputQuantity(OrderedStock stock)
        {
            InitFields();
            Quantity.Value     = null;
            Multiplicity.Value = null;
            SrcStock.Value     = stock;
            var env = Config.Env.Current;

            Warning      = new InlineEditWarning(env.Scheduler, null);
            WasCancelled = true;
        }
示例#2
0
        private void UpdateOrAddStock(OrderedStock item)
        {
            if (checkType == null)
            {
                checkType = CheckType.SaleBuyer;
            }
            var exists = Lines.FirstOrDefault(x => x.Stock.Id == item.Id);

            if (exists != null)
            {
                exists.Quantity   = item.Ordered.Value;
                CurrentLine.Value = exists;
            }
            else
            {
                var checkLine = new CheckLine(item, item.Ordered.Value);
                Lines.Add(checkLine);
                CurrentLine.Value = checkLine;
            }
        }