示例#1
0
 public JsonResult SaveCompany(Company company)
 {
     if (company != null)
     {
         if (company.Id.Equals(Guid.Empty))
         {
             company.Id = Guid.NewGuid();
             companyService.Add(company);
             return Json(true);
         }
         else
         {
             companyService.Update(company);
             return Json(true);
         }
     }
     return Json(false);
 }
示例#2
0
 public Company Update(Company company)
 {
     companyRepository.Update(company);
     return company;
 }
示例#3
0
 public Company Add(Company company)
 {
     companyRepository.Add(company);
     return company;
 }