This is a simple Employee Management System built using C# and .NET 8. It allows users to manage employees, including adding, editing, deleting, viewing, and searching for employees.
- Add different types of employees:
- Hourly Employee
- Commission Employee
- Salaried Employee
- Salary Plus Commission Employee
- Edit employee details.
- Delete employees.
- View all employees in a tabular format.
- Search employees by name.
- .NET 8 SDK installed on your system.
- Visual Studio 2022 or any compatible IDE.
-
Clone the repository: git clone https://github.com/tungle2709/Employee-Management-System git cd Employee-Management-System
-
Open the project in Visual Studio 2022.
-
Build the solution:
- Press
Ctrl + Shift + Bor go to Build > Build Solution.
- Press
-
Run the application:
- Press
F5or go to Debug > Start Debugging.
- Press
-
Follow the on-screen menu to manage employees.
- Add Employee: Select option
1from the menu to add a new employee. Choose the type of employee and provide the required details. - Edit Employee: Select option
2to edit an existing employee's details. - Delete Employee: Select option
3to delete an employee by their ID. - View Employees: Select option
4to view all employees in a tabular format. - Search Employee: Select option
5to search for employees by name. - Exit: Select option
6to exit the application.
- Program.cs: Entry point of the application.
- A1Employee.cs: Contains methods for adding, editing, deleting, viewing, and searching employees.
- Employee.cs: Defines the
Employeeclass and its derived classes (HourlyEmployee,CommissionEmployee, etc.). - EmployeeDisplay.cs: Handles displaying employees in a tabular format using
ConsoleTables.
The application includes sample employees for testing purposes. These are added automatically when the application starts.