Sei sulla pagina 1di 33

[ADDRESSBOOK MVC APPLICATION]

Prerequisites:
1. Must have Microsoft visual studio2010 installed on your machine.
2. Must Have Microsoft Sql server 2008 installed on your machine.
3. To build an ASP.NET MVC 3.0 application, you need either of the following:
If you have nothing, please visit http://www.asp.net/mvc and download and install Visual Web
Developer Express 2010.
If you already have Visual Studio 2010, please visit http://www.microsoft.com/enus/download/details.asp?id=1491 and download the standalone installation for ASP.NET MVC.
4. To build as ASP.NET4.0 application you just need to install VS.NET 2012.
Project Details
Application Type: Web
Startup window: Login page
Implementation: MVC
Database: MSSQL
Framework: 4.0
Language: c#
Credentials:
Name: Admin
Password: Admin
Contents:
This AddressBookMVC will contain following files.
1. AddressBookMVC Project
2. Sql server query file.
Description of contents:
1. AddressBookMVC: This folder will have solution file, controllers, models and view required to operate the
program.
Deccansoft Software Services |

[ADDRESSBOOK MVC APPLICATION]


2. Run Sql query to create a database which is required for project.
Roles:
1. Admin: This role will have all privileges, such as managing countries, states, managing database, etc.
2. User: This role is limited to only certain actions, such as Adding Address, Filtering address, Managing User
Details

Modules:

Login

User

Admin

Login Module: Asks for Username and Password


Verify Username and Password
a) If the user is of type Admin checks for the password from Database. If Valid show AdminZone else
show Error Message: Not an valid password
b) For Non- Admin. If the logged in user entry exists, show User Zone.
User Module:
a) Manage Address Book: Editing, Deleting and filtering the address based on country, state and active
address.
b) Add Address: Adding new addresses to database
Admin Module:
a) Manage Country: Here editing, deleting of Country details will be done.
b) Add Country: Adding new country to database
c) Manage State: Here editing, deleting of State will be done.
d) Add State: Adding of new state details to database
e) Manage Address: Filtering of address done based on country, state and active address.

Deccansoft Software Services |

[ADDRESSBOOK MVC APPLICATION]


How to run this project:
Create Database with AddressBookMVC in your Management Studio.
FileDatabase (Right Click) New Database.

Deccansoft Software Services |

[ADDRESSBOOK MVC APPLICATION]


Select the AddressBookMVC database which will be there at left hand side after creating.
Click New Query to Run the Sql Script (Double click on AddressBookMVC Script Sql file)
Click on execute button at the top to create schema and data for database.

Deccansoft Software Services |

[ADDRESSBOOK MVC APPLICATION]


If the schema and data are successfully created you will see this on your studio

Deccansoft Software Services |

[ADDRESSBOOK MVC APPLICATION]

In Microsoft Visual studio


Step1:
Creating .edmx file: Project Name (Right Click) Add New ItemsADO.NET Entity Data Model.

Deccansoft Software Services |

[ADDRESSBOOK MVC APPLICATION]

Step 2:
Click Next button.

Deccansoft Software Services |

[ADDRESSBOOK MVC APPLICATION]

Step 3:
If required database is not there then click on New Connection button, then it creates new window in that we
need to specify the database server name and select the database name from drop down list the press OK
button.

Deccansoft Software Services |

[ADDRESSBOOK MVC APPLICATION]

Step 4:
Click on Next button.

Deccansoft Software Services |

[ADDRESSBOOK MVC APPLICATION]

Step 5:
Select the tables, views and stored procedures which are required and press Finish button.

Deccansoft Software Services |

10

[ADDRESSBOOK MVC APPLICATION]

Step 6:
It creates an entity as below.

Deccansoft Software Services |

11

[ADDRESSBOOK MVC APPLICATION]

In Web.config
It automatically add the connection string
<Configuration>
<connectionStrings>
<add name="AddressBookMVCEntities"
connectionString="metadata=res://*/AddressBookMVC.csdl|res://*/AddressBookMVC.ssdl|res://*/AddressBookM
VC.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.\sqlexpress;Initial
Catalog=AddressBookMVC;Integrated Security=True;MultipleActiveResultSets=True&quot;"
providerName="System.Data.EntityClient" />
</connectionStrings>

Deccansoft Software Services |

12

[ADDRESSBOOK MVC APPLICATION]

Step 1: Start Programs Visual Studio


File Open Project/Solution

Deccansoft Software Services |

13

[ADDRESSBOOK MVC APPLICATION]

Step 2: Open the project/solution Select AddressBookMVC Application Click Open.

Deccansoft Software Services |

14

[ADDRESSBOOK MVC APPLICATION]

Step 3: (Ctrl+F5) Run Application.

Deccansoft Software Services |

15

[ADDRESSBOOK MVC APPLICATION]

Step 4: Enter following login credentials


Admin Module:

User Name: Admin,


Password: Admin.

Click Create

Deccansoft Software Services |

16

[ADDRESSBOOK MVC APPLICATION]

Step 5: Click Create Country link

Deccansoft Software Services |

17

[ADDRESSBOOK MVC APPLICATION]

Step 6: Enter details Click submit.

Deccansoft Software Services |

18

[ADDRESSBOOK MVC APPLICATION]

Step 7: Click Edit link (Refer step 5) Modify Country Details Click Save

Deccansoft Software Services |

19

[ADDRESSBOOK MVC APPLICATION]

Step 8: Click Delete link (Refer step 5) Delete Country Details Click Delete

Deccansoft Software Services |

20

[ADDRESSBOOK MVC APPLICATION]

Step 9: Go to Manage Address Book Menu

Deccansoft Software Services |

21

[ADDRESSBOOK MVC APPLICATION]

Step 10: Click on country name link for creating or editing state details.

Deccansoft Software Services |

22

[ADDRESSBOOK MVC APPLICATION]

Step11: Click Create New link

Deccansoft Software Services |

23

[ADDRESSBOOK MVC APPLICATION]

Step 12: Enter DetailsClick Create.

Deccansoft Software Services |

24

[ADDRESSBOOK MVC APPLICATION]

Step 13: Click Edit link (Refer step 11)Edit the details Click Save / Back to Manage States in India.

Deccansoft Software Services |

25

[ADDRESSBOOK MVC APPLICATION]

Step 14: Click Delete link (Refer step 11) click Delete / Back to Manage States in India.

Deccansoft Software Services |

26

[ADDRESSBOOK MVC APPLICATION]

Step 15: Select Address Menu

Deccansoft Software Services |

27

[ADDRESSBOOK MVC APPLICATION]

Step 16: Click on link click Register (Refer step 4) Enter user detailsClick OK.

Deccansoft Software Services |

28

[ADDRESSBOOK MVC APPLICATION]

Step 17: Click Log In


User Part: User Name: Chaitanya,
Password: 123456.

Deccansoft Software Services |

29

[ADDRESSBOOK MVC APPLICATION]

Step 18: Manage Address Book-> Click on Create New link.

Deccansoft Software Services |

30

[ADDRESSBOOK MVC APPLICATION]

Step 19: Enter Address Book detailsClick Create.

Deccansoft Software Services |

31

[ADDRESSBOOK MVC APPLICATION]

Step 20: Click Edit link (Refer step 18) Edit details click Save / Back to list link.

Deccansoft Software Services |

32

[ADDRESSBOOK MVC APPLICATION]

Step 2 1: Click Delete link (Refer step 18) click Delete clicks Delete / Back to list link.

Deccansoft Software Services |

33

Potrebbero piacerti anche