Example #1
0
 public void AddRecordToRepo(ProjectSetting ps)
 {
     if (ps == null)
     {
         throw new ArgumentNullException("Error: The argument is Null");
     }
     ProjectSettingCollection.Add(ps);
 }
Example #2
0
        public void DeleteRecordFromRepo(string id)
        {
            if (id == null)
            {
                throw new Exception("Record ID cannot be null");
            }

            int index = 0;

            while (index < ProjectSettingCollection.Count)
            {
                if (ProjectSettingCollection[index].ProjectID == id)
                {
                    ProjectSettingCollection.RemoveAt(index);
                    break;
                }
                index++;
            }
        }
Example #3
0
 public List <ProjectSetting> GetAllProjectSettings()
 {
     return(ProjectSettingCollection.ToList());
 }
Example #4
0
 public ProjectSetting GetProjectSetting(string projectID)
 {
     return(ProjectSettingCollection.FirstOrDefault(n => n.ProjectID == projectID));
 }