Example #1
0
        public ActionResult Add(ServiceVm services)
        {
            //set the created user
            bool response = _serviceService.AddnewService(services);

            if (response)
            {
                //successfule
                //Set the success message for user to see
                _pageMessageSvc.SetSuccessMessage(string.Format("Service [{0}] was added successfully.", services.Name.ToUpper()));
                //Session["PageSuccessMessage"] = string.Format("Service [{0}] was added successfully.", services.Name.ToUpper());
            }
            else
            {
                //there was an error
                //Set the Error message for user to see
                //Session["PageErrorMessage"] = string.Format("There was an error adding service [{0}] ", services.Name.ToUpper());
                _pageMessageSvc.SetErrormessage(string.Format("There was an error adding service [{0}] ",
                                                              services.Name.ToUpper()));
            }

            return(_uniquePageService.RedirectTo <ServicesPage>());
        }