A desktop contact management application built with C# Windows Forms and SQL Server.
The application allows users to manage contact information, search contacts, filter them by birthday, and store profile images in the database.
- Add new contacts
- Edit existing contacts
- Delete contacts
- Search contacts by name and family name
- Filter contacts by birthday range
- Store contact profile images
- Display stored images in the contact list
- Input validation
- Persian date display
- SQL Server database integration
- Confirmation dialogs for destructive actions
- C#
- .NET / Windows Forms
- SQL Server
- ADO.NET / DataTable
- SQL
The application uses SQL Server with two main tables:
Stores the primary contact information:
- Contact ID
- Name
- Family name
- Mobile number
- Birthday
Stores contact images using varbinary(max) and is related to the Main table through a foreign key.
Deleting a contact also deletes its associated image through ON DELETE CASCADE.
Contacts/
├── Program.cs
├── Form1.cs
├── Form1.Designer.cs
├── EditForm.cs
├── EditForm.Designer.cs
├── Repository/
│ └── ...
└── Contacts.sql
git clone https://github.com/ShadowWolf-mh/Contacts-Manager.gitOpen Contacts.sql in SQL Server Management Studio and execute the script to create the required database objects.
Update the database connection string in the project according to your local SQL Server configuration.
Open the project in Visual Studio and build/run the application.
After starting the application, you can:
- Add a new contact.
- Enter the contact's name, family name, and mobile number.
- Optionally add a birthday and profile image.
- Edit or delete existing contacts.
- Search contacts by name.
- Filter contacts by birthday.
This project was created as a learning project while studying C#, Windows Forms, and SQL Server.
The main goal was to practice:
- Object-oriented programming
- GUI development
- CRUD operations
- Database interaction
- SQL queries
- Input validation
- Working with images and files
- Connecting a desktop application to a relational database
Possible improvements for future versions include:
- Improving project architecture
- Separating business logic from the UI
- Better validation and error handling
- Improving the database access layer
- Adding pagination for large contact lists
- Improving the user interface
- Adding contact categories or groups
- Adding unit tests
- Replacing hard-coded configuration values with configuration files
This project is for educational purposes.