A Windows desktop application for creating and viewing hospital appointments. The project was built with C#, Windows Forms, Entity Framework Core, and Microsoft SQL Server.
- Enter and validate patient information
- Select a medical specialty and doctor
- Choose an appointment date and time
- Prevent appointments from being created in the past
- Prevent duplicate appointment time slots
- Save appointments to SQL Server
- Display existing appointments in the application
- C#
- .NET 9
- Windows Forms
- Entity Framework Core 9
- Microsoft SQL Server
Hospital-Appointment-System/
├── Database/
│ └── HospitalProject.sql
├── Form1.cs
├── Form1.Designer.cs
├── Form1.resx
├── Program.cs
├── WinFormsApp1.csproj
├── .gitignore
└── README.md
- Install Microsoft SQL Server.
- Open SQL Server Management Studio (SSMS) or another SQL Server client.
- Run
Database/HospitalProject.sql. - The script creates the
HospitalProjectdatabase, the required tables, sample medical specialties, and sample doctors.
No sample patient records are included.
By default, the application uses the following local connection:
Server=localhost;Database=HospitalProject;Trusted_Connection=True;TrustServerCertificate=True
If your SQL Server uses a different server or instance name, set the HOSPITAL_DB_CONNECTION environment variable to your own connection string before starting the application.
Example for SQL Server Express:
Server=.\\SQLEXPRESS;Database=HospitalProject;Trusted_Connection=True;TrustServerCertificate=True
- Clone or download this repository.
- Open
WinFormsApp1.csprojin Visual Studio. - Make sure the database has been created using
Database/HospitalProject.sql. - Restore the NuGet packages if Visual Studio does not restore them automatically.
- Run the application.
The database setup script contains only sample doctor and specialty data. It does not include real patient information.