Esempio n. 1
0
        public bool EditVacansy(Vacancy vac, string cat, string name, double salary)
        {
            try
            {
                repository.vacancies.Where(x => x.Name == vac.Name && x.Salary == vac.Salary)
                .FirstOrDefault().Name = name;

                repository.vacancies.Where(x => x.Name == vac.Name && x.Salary == vac.Salary)
                .FirstOrDefault().Salary = salary;

                repository.vacancies.Where(x => x.Name == vac.Name && x.Salary == vac.Salary)
                .FirstOrDefault().Category = cat;

                serializer.Serialize(repository);

                return(true);
            }
            catch (Exception) { return(false); }
        }
Esempio n. 2
0
 public string GetInfo(Vacancy vac)
 {
     return(vac.ToString());
 }