public IActionResult EmpCreate(Employee emp) { //return objemp.AddEmployee(emp); int user1 = objemp.AddEmployee(emp); if (user1 > 0) { return(Ok(new { Status = 200, success = true })); } else { return(Ok(new { Status = 401, success = false })); } }
//Calling Add Employee public static int AddEmployee_BL(Employee newEmp, CapgeminiDetails capg) { int rowsAffected = 0; try { if (ValidatEmployee(newEmp)) { rowsAffected = Employee_DAL.AddEmployee(newEmp, capg); } } catch (SqlException ex) { throw ex; } catch (HRMSException ex) { throw ex; } return(rowsAffected); }