Skip to content

Tocon96/WHManager

Repository files navigation

WHManager

Application designed to manage warehouse of a small company.

Contents

Development Environment

Visual Studio 2019 v16.11.5

Programming language

Backend was created using C#, user interface was created with XAML used by WPF.

Functions

  • Login
  • User management
  • Warehouse content management and cataloguing
  • Contractor management
  • Order and delivery management
  • Generating invoices and warehouse documentation
  • Generating reports

Database

MSSQL

Current database structure:

  • _EFMigrationHistory
    • MigrationId (Primary key, nvarchar(150), not null),
    • ProductVersion (nvarchar(32), not null)
  • Clients
    • Id (Primary key, int, not null),
    • Name (nvarchar(max), not null),
    • Nip (float, null),
    • PhoneNumber (nvarchar(max), null)
  • Config
    • Id (Primary key, int, not null),
    • Field (nvarchar(max), null),
    • Value (nvarchar(max), null)
  • ContrahentReports
    • Id (Primary key, int, not null),
    • ReportOrigin (nvarchar(max), null),
    • ContrahentId (int, not null),
    • ContrahentName (nvarchar(max), null),
    • DateFrom (datetime2(7), null),
    • DateTo (datetime2(7), null)
  • Deliveries
    • Id (Primary key, int, not null),
    • ProviderId (Foreign key, int, null),
    • DateCreated (datetime2(7), null),
    • DateRealized (datetime2(7), null),
    • Realized (bit, not null)
  • DeliveryElements
    • Id (Primary key, int, not null),
    • Origin (nvarchar(max), null),
    • ProductId (int, not null),
    • ProductCount (int, not null),
    • DeliveryId (int, not null),
  • IncomingDocuments
    • Id (Primary key, int, not null),
    • ProviderId (Foreign key, int, null),
    • DateReceived (datetime2(7), not null)
    • DeliveryId (int, not null)
  • DocumentData
    • Id (Primary key, int, not null),
    • DocumentId (int, not null),
    • DocumentDate (datetime2(7), not null),
    • DocumentType (nvarchar(max), null),
    • ContrahentName (nvarchar(max), null),
    • ContrahentNip (nvarchar(max), null),
    • ContrahentPhoneNumber (nvarchar(max), null),
    • ProductNumber (int, not null),
    • ProductName (nvarchar(max), null),
    • ProductCount (int, not null),
    • TaxType (int, not null),
    • ProductPrice (decimal(18,2), not null),
    • TaxValue (decimal(18,2), not null),
    • GrossValue (decimal(18,2), not null),
    • NetValue (decimal(18,2), not null),
  • Invoices
    • Id (Primary key, int, not null),
    • DateIssued (datetime2(7), not null),>
    • ClientId (Foreign key, int, not null),
    • OrderId (Foreign key, int, not null)
  • Items
    • Id (Primary key, int, not null),
    • ProductId (Foreign key, int, not null),
    • DateOfAdmission (datetime2(7), not null),
    • DateOfEmission (datetime2(7), null),
    • IsInStock (bit, not null),
    • IsInOrder (bit, not null),
    • OrderId (Foreign key, int, null),
    • ProviderId (Foreign key, int, null),
    • IncomingDocumentId (Foreign key, int, null),
    • OutgoingDocumentId (Foreign key, int, null),
    • InvoiceId (Foreign key, int, null),
    • DeliveryId (Foreign key, int, not null),
  • ManufacturerReports
    • Id (Primary key, int, not null),
    • Name (nvarchar(max), null),
    • ManufacturerId (Foreign key, int, null),
    • DateRealizedFrom (datetime2(7), null),
    • DateRealizedTo (datetime2(7), null)
  • Manufacturers
    • Id (Primary key, int, not null),
    • Name (nvarchar(50), not null),
    • Nip (float, not null)
  • Orders
    • Id (Primary key, int, not null),
    • Price (decimal(18,2), not null),
    • DateOrdered (datetime2(7), not null),
    • DateRealized (datetime2(7), null),
    • IsRealized (bit, not null),
    • ClientId (Foreign key, int, null),
    • IncomingDocumentId (Foreign key, int, null)
  • OutgoingDocuments
    • Id (Primary key, int, not null),
    • ContrahentId (Foreign key, int, null),
    • DateSent (datetime2(7), not null),
    • OrderId (Foreign key, int, not null)
  • ProductReports
    • Id (Primary key, int, not null),
    • Name (nvarchar(max), null),
    • ProductId (Foreign key, int, null),
    • DateRealizedFrom (datetime2(7), null),
    • DateRealizedTo (datetime2(7), null)
  • Products
    • Id (Primary key, int, not null),
    • Name (nvarchar(50), not null),
    • TypeId (Foreign key, int, not null)
    • TaxId (Foreign key, int, not null)
    • ManufacturerId (Foreign key, int, not null)
    • PriceBuy (decimal(18,2), not null),
    • PriceSell (decimal(18,2), not null),
    • InStock (bit, not null)
  • ProductTypes
    • Id (Primary key, int, not null),
    • Name (nvarchar(30), not null),
  • Provider
    • Id (Primary key, int, not null),
    • Name (nvarchar(max), null),
    • Nip (float, null),
    • PhoneNumber (nvarchar(max), null)
  • Roles
    • Id (Primary key, int, not null),
    • Name (nvarchar(max), null)
    • Admin (bit, not null)
    • Business (bit, not null)
    • Contractors (bit, not null)
    • Documents (bit, not null)
    • Warehouse (bit, not null)
    • Report (bit, not null)
  • Taxes
    • Id (Primary key, int, not null),
    • Name (nvarchar(50), not null),
    • Value (int, not null)
  • TypeReports
    • Id (Primary key, int, not null),
    • Name (nvarchar(max), null),
    • TypeId (Foreign key, int, null),
    • DateRealizedFrom (decimal(18,2), null),
    • DateRealizedTo (decimal(18,2), null)
  • Users
    • Id (Primary key, int, not null),
    • UserName (nvarchar(max), null),
    • PasswordHash (nvarchar(max), null),
    • RoleId (Foreign key, int, null)

Additional libraries

  • iText - Used for PDF generation
  • Entity Framework - Used for communication between DataAccess layer and database

Classes

DataAccess Layer

Models

  • Client,
  • Config,
  • ContrahentReports,
  • Delivery,
  • DeliveryOrderElements,
  • DocumentData,
  • IncomingDocument,
  • Invoice,
  • Item,
  • Manufacturer,
  • ManufacturerReports
  • Order,
  • OutgoingDocument
  • Product,
  • ProductReports,
  • ProductType,
  • Provider,
  • Role,
  • Tax,
  • TypeReports,
  • User

Repositories

Each of the repository has corresponding interface.

  • ClientRepository,
  • ConfigRepository,
  • ContrahentReportRepository,
  • DeliveryOrderElementsRepository,
  • DeliveryRepository,
  • DocumentDataRepository,
  • IncomingDocumentRepository,
  • InvoiceRepository
  • ItemRepository
  • ManufacturerReportsRepository
  • ManufacturerRepository,
  • OrderRepository,
  • OutgoingDocumentRepository,
  • ProductReportRepository
  • ProductReporistory
  • RoleRepository,
  • TaxRepository
  • TypeReportsRepository
  • UserRepository

Data Access classes

  • WHManagerDBContext
  • WHManagerDBContextFactory

Business layer

Models

  • Client,
  • ClientReportRecord,
  • Config,
  • ContrahentReportData,
  • ContrahentReport,
  • Delivery,
  • DeliveryOrderTableContent,
  • DocumentData,
  • IncomingDocument,
  • Invoice,
  • Item,
  • Manufacturer,
  • ManufacturerReports,
  • Order,
  • OutgoingDocument,
  • Product,
  • ProductItem,
  • ProductReports,
  • Role,
  • Tax,
  • TypeReports,
  • User

Services

Each service has corresponding interface containing class functions.

  • AuthenticationService,
  • CommandService,
  • DocumentDataService,
  • IncomingDocumentService,
  • InvoiceService,
  • OutgoingDocumentService,
  • ClientReportRecordService,
  • ContrahentReportService,
  • ManufacturerReportsService,
  • ProductReportsService,
  • ProviderReportsRecordService,
  • TypeReportsService,
  • ClientService,
  • ConfigService,
  • DeliveryService,
  • ItemService,
  • ManufacturerService,
  • OrderService,
  • ProductService,
  • ProductTypeService,
  • ProviderService,
  • RoleService,
  • TaxService,
  • UserService

Presentation layer

Classes within presentation layer consist of partial classes corresponsing to views they are assigned to therefore the list of the classes will be the same as the list of views found below.

Views

  • CompanyDataView,
  • RoleView,
  • UserView,
  • DeliveryView,
  • OrderView,
  • ClientView,
  • ManufacturerView,
  • ProviderView,
  • IncomingDocumentView,
  • InvoiceView,
  • OutgoingDocumentView,
  • InitializeCompanyFormView,
  • LoginFormView,
  • ManageClientReportFormView,
  • ManageManufacrurerReportFormView,
  • ManageProductReportFormView,
  • ManageProviderReportFormView,
  • ManageTypeReportFormView,
  • ManageClientFormView,
  • ManageCompanyDataFormView,
  • ManageDeliveryFormView,
  • ManageInvoiceFormView,
  • ManageManufacturerFoirmView,
  • ManageOrderFormView,
  • ManageProductFormView,
  • ManageProductTypeFormView,
  • ManageProviderFormView,
  • ManageRoleFormView,
  • ManageTaxFormView,
  • ManageUserFormView,
  • ContrahentReportDisplayView,
  • ManufacturerReportDisplayView,
  • ProductReportDisplayView,
  • ProductTypeReportDisplayView,
  • ProviderReportDisplayView,
  • ClientReportView,
  • ManufacturerReportView,
  • ProductReportView,
  • ProductTypeReportView,
  • ProviderReportView,
  • DeliveryItemsView,
  • EmittedItemsView,
  • ItemView,
  • OrdersItemsView,
  • ProductTypeView,
  • ProductView,
  • TaxView

Example views:

Login view:
image

Product view:
image

Create new product view:
image

Client report view:
image

About

.NET 3.1 WPF 3 layer architecture

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages