//Gets a list of all proposed interventions from the database
 public IList <ListInterventionForManager> ListOfPropInterventions(string userid, int InterventionId)
 {
     try
     {
         List <ListInterventionForManager>    interlist = new List <ListInterventionForManager>();
         ListInterventionForManagerRepository repo      = new ListInterventionForManagerRepository(context);
         interlist = repo.GetAllInterventionByInterventionId(InterventionId).ToList();
         return(interlist);
     }
     catch
     {
         throw new FaliedToRetriveRecordException();
     }
 }
 public IList <ListInterventionForManager> ListOfAssociatedIntrevention(string userid)
 {
     try
     {
         List <ListInterventionForManager>    interlist      = new List <ListInterventionForManager>();
         ListInterventionForManagerRepository repo           = new ListInterventionForManagerRepository(context);
         List <ListInterventionForManager>    associatedlist = new List <ListInterventionForManager>();
         associatedlist = repo.GetAllInterventionAssociatedWithManager(userid);
         return(associatedlist);
     }
     catch
     {
         throw new FaliedToRetriveRecordException();
     }
 }
 //get the list of intervention of manager
 public IList <ListInterventionForManager> GetInterventions(string userid)
 {
     try
     {
         var repos = new ListInterventionForManagerRepository(context);
         var rows  = repos.GetAllProposedInterventiond();
         List <ListInterventionForManager> list = new List <ListInterventionForManager>();
         foreach (var row in rows)
         {
             list.Add(row);
         }
         return(list);
     }
     catch
     {
         throw new FaliedToRetriveRecordException();
     }
 }