public ActionResult Create(Store model) { SystemFail error = new SystemFail(); if (ModelState.IsValid) { StoreBLL.CreateStore(model, error); if (!error.Error) { TempData["StartUpScript"] = "$.notify('" + error.Message + "','success');"; } else { TempData["StartUpScript"] = "$.notify('" + error.Message + "','error');"; } } else { ViewBag.StartupScript = "$.notify('Some errores were found in the formulary information. Please check it','warn')"; return(View(model)); } return(RedirectToAction("Index")); }