Ejemplo n.º 1
0
        public ActionResult Create(Employee emp)
        {
            bool isSuccess = false;

            try
            {
                if (ModelState.IsValid)
                {
                    isSuccess = con.AddEmployee(emp);
                    if (isSuccess)
                    {
                        ViewBag.Message = "Employee details added successfully";
                    }
                }
                return(View());
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }