public static List <ItemInventoryRet> ValidateInventoryItemQuery(string listId, string QBCompanyFile) { var modxml = ItemInventoryViewModel.BuildItemInventoryQueryRq(listId); var modres = QBPosContext.ProcessXML(modxml.OuterXml, QBCompanyFile); //if(sessionBegun == true) var lst = new List <ItemInventoryRet>(); lst.AddRange(GetQBInventoryItems(modres)); return(lst.GroupBy(x => x.ListID).Select(grp => grp.First()).ToList()); }
// private static volatile QBPOS instance; public static List <ItemInventoryRet> GetInventoryItemQuery(string QBCompanyFile, int days = 1) { var modxml = ItemInventoryViewModel.BuildModifiedItemInventoryQuery(days); var createdxml = ItemInventoryViewModel.BuildCreatedItemInventoryQuery(days); var modres = QBPosContext.ProcessXML(modxml.OuterXml, QBCompanyFile); var createdres = QBPosContext.ProcessXML(createdxml.OuterXml, QBCompanyFile); //if(sessionBegun == true) var lst = new List <ItemInventoryRet>(); lst.AddRange(GetQBInventoryItems(modres)); lst.AddRange(GetQBInventoryItems(createdres)); return(lst.GroupBy(x => x.ListID).Select(grp => grp.First()).ToList()); }