예제 #1
0
        public ActionResult AddClient(AddClientViewModel model)
        {
            string UserId = User.Identity.GetUserId();

            LogicService cmLogic = new LogicService();

            bool addedSucessfully = cmLogic.AddClient(
                model.Name,
                model.Email,
                model.PhoneNumber,
                UserId,
                model.StreetAddress,
                model.City,
                model.State,
                model.Zip);


            if (addedSucessfully)
            {
                return(RedirectToAction("Result", "Dashboard", new { statusCode = 0, message = "Client Added Sucessfully" }));
            }
            else
            {
                return(RedirectToAction("Result", "Dashboard", new { statusCode = 1, message = "Client Not Added Sucessfully" }));
            }
        }