Exemple #1
0
 private SelectList GetChildAssociations(GovItemType type)
 {
     List<GovItem> items = null;
     switch (type)
     {
         case GovItemType.Function:
             items = GetGovItemsByType(GovItemType.Focus);
             break;
         case GovItemType.Focus:
             items = GetGovItemsByType(GovItemType.Process);
             break;
         case GovItemType.Process:
             items = GetGovItemsByType(GovItemType.Risk);
             break;
         case GovItemType.Risk:
             items = GetGovItemsByType(GovItemType.Control);
             break;
         case GovItemType.Control:
             break;
     }
     return GetSelectList(items);
 }
Exemple #2
0
 private List<GovItem> GetGovItemsByType(GovItemType type)
 {
     var db = new GuvnerContext();
     return db.GovItems.Where(g => g.GovItemType == (int)type).ToList();
 }