Refactoring: Added interfaces, custom exceptions, UserManager unit tests, dependency injection/inversion; Regex match search by date, keywords

This commit is contained in:
Dimitar Byalkov
2023-06-06 17:52:36 +02:00
parent 180b261d37
commit 53c42a35d8
43 changed files with 668 additions and 211 deletions

View File

@@ -1,4 +1,5 @@
using Logic;
using Data;
using Logic;
using Models;
using System;
using System.Collections.Generic;
@@ -41,7 +42,7 @@ namespace WinForms
private void btnSave_Click(object sender, EventArgs e)
{
UserManager userManager = new UserManager();
UserManager userManager = new UserManager(new UserRepository());
if (string.IsNullOrEmpty(tbUsername.Text) || string.IsNullOrEmpty(tbPassword.Text) || cbUserRole.SelectedIndex == -1)
{
MessageBox.Show("Please enter data in all fields");