public ActionResult Create(SetOfBookModel model) { if (ModelState.IsValid) { SetOfBook duplicateRecord = service.GetSetOfBook(AuthenticationHelper.User.CompanyId, model.Name); if (duplicateRecord == null) { string result = service.Insert(MapModel(model)); return(RedirectToAction("Index")); } else { ModelState.AddModelError("Error", "Set of Book Already exists."); } } return(View(model)); }
public static SetOfBook GetSetOfBookByName(string sobName) { return(service.GetSetOfBook(AuthenticationHelper.CompanyId.Value, sobName)); }