private int addItemToUI(int actual, ItemQB i)
 {
     App.Current.Dispatcher.Invoke(() =>
     {
         CardItem card = new CardItem(i);
         this.mainContent.Children.Add(card);
         taskbarItemInfo.ProgressValue = (double)actual++ / itemFromDataBase.Count;
     });
     System.Threading.Thread.Sleep(10);
     return(actual);
 }
Example #2
0
        private List <ItemQB> readItems(IORItemRetList itemRetList)
        {
            List <ItemQB> items = new List <ItemQB>();

            for (int i = 0; i < itemRetList.Count; i++)
            {
                IORItemRet cutomerRet = itemRetList.GetAt(i);
                ItemQB     item       = readItem.readItemFromCustomerRet(cutomerRet);
                items.Add(item);
            }
            return(items);
        }
Example #3
0
        public ItemQB readItemFromCustomerRet(IORItemRet itemRet)
        {
            ItemQB item = new ItemQB();

            if (itemRet.ItemInventoryRet != null)
            {
                item.Name = itemRet.ItemInventoryRet.Name.GetValue().ToString();
                item.QBId = itemRet.ItemInventoryRet.ListID.GetValue().ToString();
            }
            else if (itemRet.ItemServiceRet != null)
            {
                item.Name = itemRet.ItemServiceRet.Name.GetValue().ToString();
                item.QBId = itemRet.ItemServiceRet.ListID.GetValue().ToString();
            }
            return(item);
        }
Example #4
0
 public CardItem(ItemQB item)
 {
     InitializeComponent();
     this.DataContext = item;
 }
Example #5
0
 public void delete(ItemQB i)
 {
     throw new NotImplementedException();
 }
Example #6
0
 public void register(ItemQB i)
 {
     context.QBItems.Add(i);
     context.SaveChanges();
 }
Example #7
0
 public void registerItemInDatabase(ItemQB i)
 {
     repositoryItems.register(i);
 }