-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7b3d723
commit 534777c
Showing
15 changed files
with
137 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,25 +28,33 @@ public Login() | |
|
||
private void btnLogin_Click(object sender, EventArgs e) | ||
{ | ||
User? user = _userManager.AuthenticateUser(txtEmail.TextButton, txtPassword.TextButton); | ||
|
||
if (user != null && user is not Customer) | ||
try | ||
{ | ||
Main frm = new Main(user); | ||
this.Hide(); | ||
frm.ShowDialog(); | ||
Application.Exit(); | ||
User? user = _userManager.AuthenticateUser(txtEmail.TextButton, txtPassword.TextButton); | ||
|
||
if (user != null && user is not Customer) | ||
{ | ||
Main frm = new Main(user); | ||
this.Hide(); | ||
frm.ShowDialog(); | ||
Application.Exit(); | ||
} | ||
else | ||
{ | ||
txtEmail.TextButton = string.Empty; | ||
txtPassword.TextButton = string.Empty; | ||
|
||
MessageBox.Show("Sorry, only Staff and Owners can access the desktop application!"); | ||
} | ||
} | ||
else | ||
catch (DataAccessException) | ||
{ | ||
txtEmail.TextButton = string.Empty; | ||
txtPassword.TextButton = string.Empty; | ||
|
||
MessageBox.Show("Incorrect login details for Staff members and Owners."); | ||
MessageBox.Show("A problem with the database occured. Please try again later!"); | ||
} | ||
catch | ||
{ | ||
MessageBox.Show("Incorrect credentials. Please enter valid ones!"); | ||
} | ||
|
||
// Owner owner = new Owner(1, "Steve", "Orlov", "[email protected]", "[email protected]", "", "Chicago", "555-555-123"); | ||
// _userManager.CreateUser(owner); | ||
|
||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Fit Fusion - Sport Nutrition Shop | ||
|
||
![Fit Fusion Logo](https://www.creativefabrica.com/wp-content/uploads/2021/09/03/F-ff-logo-design-vector-Graphics-16738354-1-580x386.jpg) | ||
|
||
Fit Fusion is a web and desktop application developed by Kaloyan Kulov for the individual assignment in Semester 2 of Software Engineering & ICT. This project aims to create a comprehensive solution for a sport nutrition shop, providing functionality for customers, staff, and the owner. | ||
|
||
## Table of Contents | ||
- [Introduction](#introduction) | ||
- [User Roles and Credentials](#user-roles-and-credentials) | ||
- [Features](#features) | ||
- [Installation](#installation) | ||
- [Usage](#usage) | ||
- [Contributing](#contributing) | ||
- [License](#license) | ||
|
||
## Introduction | ||
|
||
Fit Fusion is designed to be a versatile application catering to the needs of a sport nutrition shop. It includes features for customers to browse and purchase products, staff to manage inventory and orders, and an owner to oversee and manage the entire system. | ||
|
||
## User Roles and Credentials | ||
|
||
### Customer | ||
- **Email:** [email protected] | ||
- **Password:** [email protected] | ||
|
||
### Staff | ||
- **Email:** [email protected] | ||
- **Password:** [email protected] | ||
|
||
### Owner | ||
- **Email:** [email protected] | ||
- **Password:** [email protected] | ||
|
||
## Installation | ||
|
||
1. Clone the repository. | ||
```bash | ||
git clone https://github.com/KaloyankerR/Fit-Fusion.git |