FlawlessCasual17 / FP_SPSU23

An example of a dotNET MAUI app that creates and manages an SQLite database.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

.NET MAUI Final Project 2023

Last Updated: December 11, 2023 4:20 AM (UTC)

Developed by Hieu Pham, Sherif Mansour, and Kris Schneider


A short explanation of this app

Once you've signed up and logged in, you can perform a search, choose a member from the search results, and add a new entry to update the desired field by clicking the update button. The process for deleting is similar: you search, select, click delete, confirm the deletion, and then voilĂ .

How to use the app

Sign Up

To use the SKH Gym Management App, you need to sign up with your credentials.

  1. Open the app on your device.

  2. Click on the "Sign Up" button.

  3. Fill in the required information (e.g., username, password, email).

  4. Click the "Submit" button to create your account.

Log In

After signing up, log in to access the app's functionalities.

  1. Click on the "Log In" button.

  2. Enter your username and password.

  3. Click the "Login" button.

Search Members

Once logged in, you can search for members in the database.

  1. Click on the "Search" button.

  2. Enter the member's information (e.g., name, ID) in the search field.

  3. Select the desired member from the search results.

Update Member Information

After selecting a member, you can update their information.

  1. Click on the "Update" button.

  2. Type the new information in the corresponding fields.

  3. Click the "Update" button to save the changes.

Delete Members

If you need to remove a member from the database, follow these steps.

  1. Search for the member as described in the "Search Members" section.

  2. Select the member you want to delete.

  3. Click on the "Delete" button.

  4. Confirm the deletion.


Program Structure

  1. App.xaml & App.xaml.cs:

    Defines the main application class and lifecycle events. Manages initialization and startup logic for the SKH Gym Management App.

  2. MainPage.xaml & MainPage.xaml.cs:

    Scrollable main page with a logo, welcome message, and buttons for sign-up, log-in, and member management. Configured button properties for size, color, and event handlers. Logic for button clicks implemented in MainPage.xaml.cs.

  3. SignUp.xaml & SignUp.xaml.cs:

    Scrollable Sign-Up page with input fields organized using ScrollView() and VerticalStackLayout(). Each input field arranged using HorizontalStackLayout(). SignUpButton triggers OnClickSignUp() event on click.

  4. LogIn.xaml & LogIn.xaml.cs:

    Scrollable Log In page with username, password input fields, and the "Login" button. Layout organized using ScrollView() and VerticalStackLayout(). LogInButton triggers OnClickLogIn() event on click.

  5. ManageMember.xaml & ManageMember.xaml.cs:

    Scrollable page for managing members with a search bar, search results, and sections for selected member details and update fields. Input fields organized using various layouts like StackLayout() and HorizontalStackLayout(). Buttons for updating and deleting members with corresponding event handlers (OnClickUpdate() and OnClickDelete()).


Methods employed

  1. In SignUp.xaml.cs

    • OnClickSignUp() Handles the click event of the SignUpButton(). Includes logic to validate user inputs, process the sign-up request, and navigate to the appropriate page.
  2. In LogIn.xaml.cs

    • OnClickLogIn() Handles the click event of the LogInButton(). Includes logic to authenticate user credentials, process the log-in request, and navigate to the main application page.
  3. In ManageMember.xaml.cs

    • OnSearchTextChanged() Handles the text changed event of the MemberSearchBar. Includes logic to filter and update the displayed search results based on the entered text.

    • OnItemSelected() Handles the item selected event of the SearchResultsListView. Includes logic to display detailed information about the selected member.

    • OnClickUpdate() Handles the click event of the "UpdateButton". Includes logic to update the member's information based on the entered data in the update fields.

    • OnClickDelete() Handles the click event of the "DeleteButton". Includes logic to delete the selected member from the system.

Feel free to reach out if you encounter any issues or have suggestions for improvement. Thank you for using the SKH Gym Management App!


Tools used for developing the project

  • Visual Studio 2022/JetBrains Rider
  • dotNET SDK
  • Visual Studio Code (VSCode)/VSCodium (Optional)

Getting Started (For developers only)

  1. Installation Clone the repository to your local machine.

    git clone 'https://github.com/FlawlessCasual17/FP_SPSU23.git'
  2. Navigate to the project directory.

    cd "a_directory/FP_SPSU23"

Build and run the app

  1. Prerequisite Steps

    1. Open the solution in Visual Studio 2022/JetBrains Rider, or your preferred IDE.

    2. Please note, the following NuGet packages are required: Microsoft.sqlite.core and sqlitepclraw.bundle_E_sqlite3. These can be installed by running,

      dotnet add package Microsoft.sqlite.core
      dotnet add package sqlitepclraw.bundle_E_sqlite3

      Or by using your IDEs built-in NuGet package manager GUI.

  2. Building and Running the App

    IMPORTANT NOTE: Before running the app, ensure that you comment out the dummy data to prevent it from being inserted into the database inadvertently. Failure to do so may result in unwanted data being added to the database during the initial run. Please refer to the code comments for guidance on how to comment out the dummy data.

    1. Make sure you have .NET MAUI installed on your machine. If you don't have .NET MAUI on your system; you can install it by running,

      Note: Make sure your working directory in your terminal is SET to the folder you cloned the project to.

      dotnet workload install maui -s 'https://api.nuget.org/v3/index.json'
    2. In the IDE of your choice, click the "Build" button to compile the project. Then click the "Run" button to run and deploy the app.

About

An example of a dotNET MAUI app that creates and manages an SQLite database.


Languages

Language:C# 98.9%Language:PowerShell 1.1%