Exemplo n.º 1
0
 public void EditCompany(int id, Company company)
 {
     var companyToEdit = GetCompany(id);
     if (companyToEdit == null) return;
     companyToEdit.Name = company.Name;
     _db.SaveChanges();
 }
Exemplo n.º 2
0
 public ActionResult Create(Company company)
 {
     try
     {
         _companyHandler.AddCompany(company);
         return RedirectToAction("Index");
     }
     catch
     {
         return View(company);
     }
 }
Exemplo n.º 3
0
 public void EditCompany(int id, Company company)
 {
     _companyRepository.EditCompany(id, company);
 }
Exemplo n.º 4
0
 public void AddCompany(Company company)
 {
     _db.Company.Add(company);
     _db.SaveChanges();
 }
Exemplo n.º 5
0
 public void AddCompany(Company company)
 {
     _companyRepository.AddCompany(company);
 }