Skip to content

About

A Windows Forms contact management application built with C# and SQL Server, featuring CRUD operations, search, birthday filtering, input validation, and contact image storage.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contacts Manager

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.

Features

  • 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

Technologies

  • C#
  • .NET / Windows Forms
  • SQL Server
  • ADO.NET / DataTable
  • SQL

Database

The application uses SQL Server with two main tables:

Main

Stores the primary contact information:

  • Contact ID
  • Name
  • Family name
  • Mobile number
  • Birthday

ContactImages

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.

Project Structure

Contacts/
├── Program.cs
├── Form1.cs
├── Form1.Designer.cs
├── EditForm.cs
├── EditForm.Designer.cs
├── Repository/
│   └── ...
└── Contacts.sql

How to Run

1. Clone the repository

git clone https://github.com/ShadowWolf-mh/Contacts-Manager.git

2. Create the database

Open Contacts.sql in SQL Server Management Studio and execute the script to create the required database objects.

3. Configure the connection

Update the database connection string in the project according to your local SQL Server configuration.

4. Run the application

Open the project in Visual Studio and build/run the application.

Usage

After starting the application, you can:

  1. Add a new contact.
  2. Enter the contact's name, family name, and mobile number.
  3. Optionally add a birthday and profile image.
  4. Edit or delete existing contacts.
  5. Search contacts by name.
  6. Filter contacts by birthday.

Purpose

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

Future Improvements

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

License

This project is for educational purposes.

About

A Windows Forms contact management application built with C# and SQL Server, featuring CRUD operations, search, birthday filtering, input validation, and contact image storage.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages