Example #1
0
        public ActionResult Add(AddEmployeeViewModel employee)
        {
            bool isAddedSuccessfully = false;
            var  emp = empFactory.GetEmployeeFromAddVM(employee);

            if (employee.IsPermanent)
            {
                isAddedSuccessfully = _empOps.AddPermEmployee(emp);
            }
            else
            {
                isAddedSuccessfully = _empOps.AddEmployee(emp);
            }

            return(View());
        }