public List <ITPurchaseInfo> GetSentBills(Guid userId) { var wfs = wFInstanceServer.GetSentWFsByUserId(userId); wfs = wfs.Union(wFInstanceServer.GetBackSentWFsByUserId(userId)).Distinct().ToList(); var stalist = wfs.Where(p => p.BType == typeof(ITPurchase).Name); var list = purchaseServer.GetBillsById(stalist.Select(p => p.BId).ToList()); List <ITPurchaseInfo> slist = new List <ITPurchaseInfo>(); foreach (var item in list) { slist.Add(new ITPurchaseInfo() { WFInstanceId = stalist.FirstOrDefault(p => p.BId == item.Id).WFInstanceId, NodeInstanceId = stalist.FirstOrDefault(p => p.BId == item.Id).WFNodeId, Desc = wfs.FirstOrDefault(p => p.BId == item.Id)?.Desc, ITPurchaseViewModel = item }); } return(slist); }
public List <WFNodeInstance> GetBackSentWFsByUserId(Guid id) { return(iWFInstanceServer.GetBackSentWFsByUserId(id)); }