Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
 public static string Insert(SetOfBookModel model)
 {
     return(service.Insert(getEntityByModel(model)));
 }