Basic Application Using Two Screens in LightSwitch 2012

This article shows how to create a basic application using two HTML Client Screens in LightSwitch using Visual Studio 2012.

Procedure for creating an application in LightSwitch.

Step 1

Open the Solution Explorer.

sol ex.jpg

Step 2

In the Solution Explorer, right-click on the data source and choose "Add Table".

add table.jpg

Step 3

The table appears.

table.jpg

Step 4

In the Solution Explorer, right-click on "Screen" and choose "Add Screen".

add src.jpg

The Add New Screen dialog box appears, choose "Browse Data Screen" from the Screen Template and select Employees in the Screen Data and click "OK".

browse src.jpg

Step 5

Once again go to the Solution Explorer and add another Screen.

This time we will add an Add/Edit Details Screen and use the same Screen Data.

add edit src.jpg

Step 6

Open the Browse Screen Designer.

browse src desi.jpg

In the Screen Designer right-click to add a button.

add button.jpg

Step 7

The Add Button Dialog Box appears.
From that select "Choose an existing method", and specify "Employees.addAndEditNew".

dialog.jpg

Step 8

Press F5 to run the application.

add edit employee.jpg

Provide the data to the screen and click on the "Save" button.

output.jpg

Up Next
    Ebook Download
    View all
    Learn
    View all