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); }
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); }
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); }
public CardItem(ItemQB item) { InitializeComponent(); this.DataContext = item; }
public void delete(ItemQB i) { throw new NotImplementedException(); }
public void register(ItemQB i) { context.QBItems.Add(i); context.SaveChanges(); }
public void registerItemInDatabase(ItemQB i) { repositoryItems.register(i); }