예제 #1
0
        private void LoadProcessesIntoCmb()
        {
            var processDAO = new ProcessDAO();
            var processes  = processDAO.Processes();

            foreach (var process in processes)
            {
                cmbProcesses.Items.Add(process.Name);
            }
        }
예제 #2
0
        public bool CheckNameNotBeingUsed(string name)
        {
            var processDAO = new ProcessDAO();
            var process    = processDAO.Processes().FirstOrDefault(x => x.Name == name);

            if (process == null)
            {
                return(true);
            }
            throw new NameBeingUsedException();
        }