Skip to content

WPF App for managing a garden center's customer, product, and offer data. it features a layered architecture with a data access layer (DAL), business logic layer (BLL), and presentation layer.

Notifications You must be signed in to change notification settings

clintonimaroo/TuinCentrum

Repository files navigation

TuinCentrum

This project is a simple desktop application for managing a garden center's customer, product, and offer data. It is built using WPF for the UI, with a backend powered by a SQL Server database. The application is structured with a layered architecture, including a data access layer (DAL), a business logic layer (BLL), and a presentation layer.

Requirements

  • .NET 6 or later
  • SQL Server
  • Visual Studio 2022 or later

Configuration

Before running the project, you need to configure the following:

1. Database

Ensure that you have a SQL Server instance running and create a database named TuinCentrumDB. Use the following SQL script to create the required tables:

CREATE TABLE Klant (
    KlantID INT PRIMARY KEY,
    Naam NVARCHAR(100) NOT NULL,
    Adres NVARCHAR(200) NOT NULL
);

CREATE TABLE Product (
    ProductID INT PRIMARY KEY,
    NederlandseNaam NVARCHAR(100) NOT NULL,
    WetenschappelijkeNaam NVARCHAR(100) NOT NULL,
    Beschrijving NVARCHAR(500),
    Prijs DECIMAL(10, 2) NOT NULL
);

CREATE TABLE Offerte (
    OfferteID INT PRIMARY KEY,
    Datum DATE NOT NULL,
    KlantID INT NOT NULL,
    Aantal INT NOT NULL,
    Afhaall BIT NOT NULL,
    Aanleg BIT NOT NULL,
    CONSTRAINT FK_Klant FOREIGN KEY (KlantID) REFERENCES Klant(KlantID)
);

CREATE TABLE Offerte_Producten (
    OfferteID INT NOT NULL,
    ProductID INT NOT NULL,
    Aantal INT NOT NULL,
    CONSTRAINT PK_Offerte_Producten PRIMARY KEY (OfferteID, ProductID),
    CONSTRAINT FK_Offerte FOREIGN KEY (OfferteID) REFERENCES Offerte(OfferteID),
    CONSTRAINT FK_Product FOREIGN KEY (ProductID) REFERENCES Product(ProductID)
);

2. Connection String

Update the connection string in the TuinRepository class to match your SQL Server configuration. Open TuinRepository.cs and set the connectionString variable with your SQL Server details:

private string connectionString = "Server=YOUR_SERVER_NAME;Database=TuinCentrumDB;Trusted_Connection=True;";

3. Certificate Configuration (if using SSL)

If you are using SSL for your SQL Server connection, ensure that the appropriate certificates are installed and configured on your machine. Update the connection string to include Encrypt=True;TrustServerCertificate=True if necessary.

4. Running the Application

  • Open the solution in Visual Studio.
  • Restore the NuGet packages.
  • Build the solution.
  • Run the application.

Contributing

Contributions are welcome! Please fork the repository and create a pull request with your changes.

About

WPF App for managing a garden center's customer, product, and offer data. it features a layered architecture with a data access layer (DAL), business logic layer (BLL), and presentation layer.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages