public InboxRowGrid GetGrantedInBoxItems() { List <InboxItems> MyInBoxGranted = new List <InboxItems>(); InboxItems objGrantedInboxItem = new InboxItems(); List <InboxItems> l = this.GetFormXML(); MyInBoxGranted = objGrantedInboxItem.GetGrantedInboxItems(l); InboxRowGrid dictInboxRowGrid = new InboxRowGrid(); foreach (InboxItems i in MyInBoxGranted) { if (!(dictInboxRowGrid.InboxRow.ContainsKey(i.Name))) { dictInboxRowGrid.InboxRow.Add(i.Name, new List <string>()); } foreach (TransactionCode tranCode in i.TransactionCodeList) { dictInboxRowGrid.InboxRow[i.Name].Add(tranCode.StepName); } } return(dictInboxRowGrid); }
public List <InBoxList> GetInbox(List <InboxContent> listTaskNameWithCount, InboxRowGrid dictInboxRowGrid) { List <InBoxList> listIn = new List <InBoxList>(); List <InboxRowGrid> list = new List <InboxRowGrid>(); if (listTaskNameWithCount != null) { foreach (string s in dictInboxRowGrid.InboxRow.Keys) { InBoxList oInbox = new InBoxList(); oInbox.Name = s; oInbox.Count = 0; foreach (string ss in dictInboxRowGrid.InboxRow[s]) { Boolean isFound = false; foreach (InboxContent sss in listTaskNameWithCount) { if (sss.TaskName.ToUpper() == ss.ToUpper()) { oInbox.Count += sss.Count; isFound = true; break; } } if (isFound == true) { break; } } listIn.Add(oInbox); } } return(listIn); }