Exemplo n.º 1
0
 public static BystronicData GetData(DataSource dataSource)
 {
     lock (_bystronicDataLock)
     {
         if (_bystronicData == null)
         {
             _bystronicData = new BystronicData(dataSource);
         }
         return(_bystronicData);
     }
 }
Exemplo n.º 2
0
 public static void UpdateData(DataSource dataSource)
 {
     //if (_tmpBystronicData == null)
     _tmpBystronicData = new BystronicData(dataSource);
     // else
     //    _tmpBystronicData.ReadData(dataSource);
     lock (_bystronicDataLock)
     {
         _bystronicData = _tmpBystronicData;
         //LogUtil.Trace("* Bystronic data reloaded");
     }
 }
Exemplo n.º 3
0
        public void OrderChanged(Order order)
        {
            order.YtdSaleBeforeThisOrder = this.GetYtdSale(order.Salesman, order.ID, order.OrderDate.Value);
            var index = BystronicData.GetData(this).orders.FindIndex(x => x.ID == order.ID);

            if (index >= 0)
            {
                UpdateOrder(order);
                BystronicData.GetData(this).UpdateOrder(order, index);
            }
            else
            {
                AddOrder(order);
                BystronicData.GetData(this).AddOrder(order);
            }
            BystronicData.GetData(this).RefreshSalesmenData(this);
        }
Exemplo n.º 4
0
 public void OrderDeleted(int orderID, out string poNumber)
 {
     DeleteOrder(orderID);
     BystronicData.GetData(this).DeleteOrder(orderID, out poNumber);
     BystronicData.GetData(this).RefreshSalesmenData(this);
 }