Example #1
0
        public bool isDublicate(Job job)
        {
            for (int i = 0; i < jobs.Count; i++)
            {
                if (jobs[i].name == job.name)
                {
                    return true;
                }
            }

            return false;
        }
Example #2
0
        private bool ValidateJob(Job job)
        {
            if (checkDuplicate)
            {
                if (isDublicate(job))
                    return false;
            }

            return job.ValidateJob();
        }
Example #3
0
 public bool AddJob(Job job)
 {
     if (ValidateJob(job))
     {
         jobs.Add(job);
         return true;
     }
     else
         return false;
 }