Exemplo n.º 1
0
        public List <ITPurchaseInfo> GetFinishedBills(Guid userId)
        {
            var wfs     = wFInstanceServer.GetCompletedWFsByUserId(userId);
            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);
        }
Exemplo n.º 2
0
 public List <WFNodeInstance> GetCompletedWFsByUserId(Guid id)
 {
     return(iWFInstanceServer.GetCompletedWFsByUserId(id));
 }