public ActionResult AddOrganisation(AddOrganisationDetails model)
 {
     if (!ModelState.IsValid || _organisationService.OrganisationExist(model.Name) ||
         _organisationService.OrganisationCodeExist(model.Code ?? 0)) return View(model);
     _organisationService.AddOrganisation(new OrganisationBO
     {
         Name = model.Name,
         Code = model.Code ?? 0
     });
     return RedirectToAction("Dashboard");
 }
예제 #2
0
 public ActionResult <Organisation> AddOrganisation(Models.Organisation organisation)
 {
     return(_organisationService.AddOrganisation(organisation));
 }