Exemplo 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); }
        }
Exemplo n.º 2
0
 public string GetInfo(Vacancy vac)
 {
     return(vac.ToString());
 }