OrgMan

OrgMan Used AI

1 devlog
28h 42m
Created by Wade Olivieri

This is an Organization management solution. It is a school project so some security measures have been cut due to lack of resources.
The program is designed to be run on a standalone computer with a Microsoft SQL Database linked to it.
The employee/admin has a credential to sign into the program, where they can manage assets and clients, as well as their own personal details.

Timeline

11/06/2025
Moved MainPage to LoginWindow Folder and Changed name to LoginPage.
Changed the Colour Scheme from Purple to Blue and White.

02/07/2025
Added LoginPage UI.
Added MainWindow Folder
Added HomePage to MainWindow Folder
Modified AppShell to begin at MainWindow.HomePage
Modified App.xaml.cs to launch LoginWindow.LoginPage at start, and to launch as Navigation Window.
This ensures that once login has been authenticated all credentials are cleared from memory, as the window will be closed completely instead of just opening a new page.

09/07/2025
Installed and Configured Microsoft SQL Server onto development computer.
Created ORGMAN Database
Added Login Table to Database
Added SQL User 'OrgManUser' with password 'OrgManPassword__02*'
Assigned limited access to user, with read and write data only access to ORGMAN database.
This means the user cannot add, modify, or remove anything on the server, unless it is data, and only in the ORGMAN database.

10/07/2025
Added Microsoft.Data.SqlClient NuGet Package
Added BCrypt.Net-Next NuGet Package.
This will be used to encryot entered passwords as BCrypt to either be stored in or compared against database for secure authentication.
Added Columns to Login Table as follows:
ID (int) --> Primary Key, Unique, Auto Incrementing, Not Null
Username (nvarchar(100)) --> Unique, Not Null
PasswordHash (nvarchar(255)) --> Unique, Not Null
AdminStatus (bit) --> Not Null
Note: PasswordHash is Unique as it is encrypted using bcrypt, which is salted, and therefore the same password should have a unique hash each time it is generated.

11/07/2025
Added class LoginRecord which stores the user sign in information.
Added class DatabaseService which stores the SQL Database Connection string.

12/07/2025
Added SQL selection string to check if Username exists and populate the loginRecord object.
Modified CheckCredentials to check if both UsernameEntry and PasswordEntry were being filled, and if one or the other are not filled to display an error message on ErrorLabel.
Used breakpoint at the beginning of else to check the logic, as I noticed the field was not always filling.
The breakpoint showed that the else statement was not being called when a field was previously filled, sign in is clicked, and then it is emptied.
I was able to determine that when the else is being triggered, the fields were null, but when they were not, the fields were just empty, not null.
This lead to changing the statement from 'if (entry != null)' to 'if (!string.IsNullOrEmpty(entry))', which fixed the bug.

13/07/2025
Added static class 'LoginRecordGlobal' to store user loginRecord once authentication is successful.
Added authentication logic to:
Verify inputted password with stored password in database, based on provided username.
If Password is correct:
1. Clear stored PasswordHash value.
2. Transfer temporary loginRecord into LoginRecordGlobal.
3. Close LoginPage and open HomePage.
If Password is incorrect:
Display 'The Username or Password is incorrect'

14/07/2025
Added Sign Out button to flyout for AppShell, which is the frame each page is based on in the main window.
Note: LoginPage is a NavigationWindow, which is a different window to the main window.

17/07/2025
Added all other pages.
Added Pages to AppShell.
Made Admin Panel visible only to administrators.

18/07/2025
Added Notes Editor element and placeholder editor element for assigned assets.
Added Save button for Notes.
Linked all Notes elements to database.

19/07/2025
Designed EmployeeModify Page for non-administrators.
Linked all elements to database.
Designed ClientList Page
Linked readonly entry to database to select all clients in the database and list them.
Linked View Button as well as ID Entry to Database and ClientModify page.
Linked Add Button to blank ClientModify page.
Designed ClientModify page based on EmployeeModify page, both XAML and C# code.
Linked all fields to database.
Added validation to EmployeeModify and ClientModify to ensure values which must be Unique are not doubled up.

20/07/2025
Built AssetList and AssetModify pages, which are essentially a replication of ClientList and ClientModify.
Started building Admin Panel

21/07/2025
Finished building Admin Panel.
Linked all outstanding elements to their database counterparts.
Fixed up classes by putting them in a single document and applying abstraction, inheritence, encapsulation, and consequentially polymorphism to them.

Update attachment