MVC Demo Project

I have provided entire GYMONE project to download with SQL server Script that contains tables and stored procedures.

Please read text file ReadMe_First.txt first.

In this application there are 2 types of users one will be Admin and other will be System User.

Project System User Process

This project aims completely on GYM process. The process starts with Membership, when Member newly joins the GYM he is registered in the GYM Software by System User. While registering he will ask the Member that which type of Scheme he would like to take (GYM+CARDIO OR GYM) and for how much period he will be joining the GYM (Quarterly, Half Yearly, Yearly). According to this the fees of GYM will be decided. After registering, the member is given a receipt and declaration form. The receipt is signed by the system user and the declaration form is signed by the Member who is joining the GYM. Along with this, the Member is told to provide legal document proof of address and photo identity. Now the Member can use GYM facilities till the Period for which he paid for Services. After completion of service he needs to renew Membership from System User for the next Period (Quarterly, Half Yearly, Yearly) and pay fee to System User for that Period.

The system user also has a right to check how much amount has been collected this month by seeing Month wise (Month wise Report Download) Report and if he want to check how much amount has been collected this year then he can view Year wise Report (Year wise Report Download) and Finally, he can also check which user renewal is coming to notify him about the renewal of Membership by viewing renewal Report.

Admin System User Process

The role of Admin is to create and delete System User and also assign roles (Admin , System User ) to them. He also has rights for Adding Scheme ( GYM+CARDIO OR GYM etc ) and Plan ( Quarterly , Half Yearly , Yearly). He can view All Reports: Month wise collection Report and Year wise collection Report, Renewal Report . Accordingly, he can plan scheme for getting more Member to his GYM.

Platform Used

About Platform Used

I had developed this Application using Microsoft Visual Studio Ultimate 2012 with Microsoft SQL server 2008 and Reporting is done using Crystal Report Version (13.0.2000.0).

Project is created using ASP.NET MVC 4 and language used is C# and ORM Dapper with Repository Pattern.

Microsoft Visual Studio Ultimate 2012

Link to download Trial Microsoft Visual Studio Ultimate 2012.

Microsoft Visual Studio Ultimate 2012

Microsoft SQL Server 2008

Link to download Trial Microsoft Visual Microsoft SQL server 2008.

SQL SERVER

SAP Crystal Report Version (13.0.2000.0)

SAP

Download Trial Crystal report Viewer 2011.

Database Details

Finally after understanding the process let's check out which are the tables we had used in this Application.

Please read text files ReadMe_First.txt first. In this file entire process of database creation and login details of file exists.

I have created database with name GYMONEDBMVC, inside this all the tables are present.

Let’s start with ASP.NET Membership tables. Firsty, we have the following five tables:

  1. Users
  2. webpages_Membership
  3. webpages_OAuthMembership
  4. webpages_Roles
  5. webpages_UsersInRoles

User Table

This table contains User Details with UserID.

User Table

webpages_Membership

This table contains User Password Details.

User Password Details

webpages_OAuthMembership

OAuthMembership

webpages_Roles

This table contains roles.

Roles

webpages_UsersInRoles

This table contains roles assigned to User.

UsersInRoles

After completing with all the Membership Tables now let's start with other tables.

  1. SchemeMaster
  2. PlanMaster
  3. MemberRegistration
  4. PaymentDetails
  5. RecepitTB
  6. Fiscalyear

SchemeMaster

Table contains all Scheme Details in it. For example, GYM+CARDIO or GYM

SchemeMaster

Plan Master

Table contains all Plan Name in it also a Foreign key SchemeID.

E.g. ( Quarterly , Half Yearly , Yearly)

Foreign key SchemeID

MemberRegistration

Table contains all the details of members and it is a Master table.

MemberRegistration

PaymentDetails

Table contains all the payment details of Member in it. MemberID is Foreign key in this table.

PaymentDetails

ReceiptDetails

Table contains details of who and how many Receipts have been downloaded

ReceiptDetails

Fiscal year

Table contains all Fiscal year details.

Fiscalyear

After completing database details now let’s have a look on Project structure in Visual Studio.

The Project Name is GYMONE.

You can see the basic folder structure provided by MVC.

basic folder structure

External packages which are used in this Project

I have also added some packages from NuGet, here is the list:

  1. Bootstrap
  2. Dapper dot net
  3. Grid.MVC
  4. PagedList.MVC
  5. JQuery UI

Let’s have a look at folder and the details

Bootstrap folder contains all files of .js and .css.

Bootstrap folder

Controller Folder contains all Controllers created in this application.

Controller Folder

Model Folder contains all Models created in this application.

Model Folder

View Folder contains all Views created in this application.

View Folder

Repository Folder

This folder contains Interface and there implementation.

E.g. IPlanMaster (Interface) and PlanMaster Implementation.

Repository Folder

Reports Folder

This folder contains Crystal report which have been developed in this application.

Reports Folder

The above shows how the directory and folder structure looks, now let’s check out our screens.

Starting with Login Screen.

Login Screen

Login Screen

After login screen now let’s check System User Screen.

System User Section

User Dashboard

After login, the user will see this User Dashboard screen in which he will be able to see all the pages which he can access.

User Dashboard Register Member Master

Now let’s open first link of User Dashboard Register Member Master.

Register Member Master [Create]

Register Member Master Create

Register Member Master [Listing]

Register Member Master Listing

Register Member Master [Edit / Update]

Register Member Master

Receipt Download

In this page we can download Candidate Receipt.

Receipt Download

Candidate Form Download

In this page we can download Candidate Declaration Form.

Candidate Declaration Form

Payment Listing

In this page we can check out details of Member Payment and Renewal according to Member No or Member Name.

Payment Listing

Renewal Details

In this page we can renew All Members Membership.

renew All Members Membership

All Members Membership

All Member List

In this page we can see All Member List which are Registered.

All Member List

Year wise Report Download

In this page we can download Year wise Report of Fee Collection.

Year wise Report Download

Month wise Report Download

In this page we can download Month wise Report of Fee Collection.

Month wise Report Download

Detailed Renewal Report Download

In this page we can download Detailed Renewal Report of all Members.

Detailed Renewal Report Download

Detailed Date wise Renewal Report Download [Exact Date]

In this page we can download Detailed Renewal Report of all Members according to Date.

Exact Date

Detailed Date wise Renewal Report Download [Between Dates]

In this page we can download Detailed Renewal Report of all the Members according to Date.

Detailed Date

After completing with viewing System User Page now let’s move forward to have a look on Admin
Dashboard and Pages.

It is coded in a simpler way, just have a look on it and learn.

Account Section

The first thing we are going to look is Admin dashboard.

Reports here will be similar to what System User Reports.

Account Section

After seeing dashboard now we are going to see how a role is created.

Create Role [Create]

Under admin section, create role and it is a one time entry.

In this system I have created only 2 roles [Admin , SystemUser], if any one wants to add another role then he need to add ([Authorize(Roles = "NewRoleName")]) attribute to controller in system.

Create Role

Role Listing [Listing / Delete Role]

In this page I am displaying all roles which admin has added.

Role Listing

After adding roles now let's move towards creating System User Account.

Create User Account

In this page I am going to Register “SystemUser or Admin" which are going to use system.
And here are the details which are entered for creating an Account.

Create User Account

After Creating Account, first we are going to do is assign role to a user which we have created.

Assign Role to User

In this page I am going to show how to assign role to User which are created.

Assign Role to User

After assigning a role, now  move towards Listing of Roles assigned to the User.

Display All SystemUser Assign Roles

In this page I am displaying all roles with Username to whom it is assigned.

Display All SystemUser Assign Roles

Remove Role from User

In this page I am showing how to delete a User from a role whom we have already assigned a role.

Remove Role from User

All Registered User Details

In this page I am displaying all the registered user details.

All Registered User Details

After viewing all the registered User Details now lets Add Scheme to Member from Scheme Master.

Create Scheme Master [Create]

In this page I am going to show how to create a Scheme.

Create Scheme Master

Scheme Master [Listing]

In this page I am going to display all the Scheme details.

Scheme Master

Scheme Master [Edit]

In this page I am going to show how to Edit Scheme.

Edit

Create Plan Master [Create]

In this page I am going to show how to create a plan.

Create

Plan Master [Listing]

In this page I am going to display all the entered Plans.

Listing

Plan Master [Edit]

In this page I am going to show how to Edit Plan.

Plan Master

Finally after completing View, now let’s move towards report to have a look on it.

Month wise Report

The first report which we are going to see is Month wise Report. In this report we are going to display all the fees collected in a particular month.

Month wise Report

Year wise Report

The second report which we are going to see is Year wise Report. In this report we are going to display the fee collected in a particular year.

Year wise Report
Details Report

The Third report which we are going to see is Details Member Report in this report we are going to display all Members which are registered in the GYM.

Details Report

Payment Receipt

The Fourth report which we are going to see is Payment Receipt.

Payment Receipt

Declaration Form

The Fifth report which we are going to see is Declaration Form.

Declaration Form

Declaration

Finally we have completed the project successfully and I believe that people who are new to MVC have learnt a lot from this project.

Up Next
    Ebook Download
    View all
    Learn
    View all