public void AddEmployee(Employee emp) { if (com == null) { throw new Exception("The Details of the Database are not yet set"); } if (emp.EmpID > 100) { throw new Exception("Employee ID should be lesser than 100"); } com.AddEmployee(emp.EmpID, emp.EmpName, emp.EmpAddress, emp.EmpSalary); }