post2-log in system

14
THIS PROGRAM CREATE A LOG IN SYSTEM THAT LOADS DIFFERENT FORMS FOR EVERY USER TYPE AND IF THE USER TYPE "ADMIN" THEN THE FORM2 WILL LOAD, THEN IF THE USER TYPE "STAFF" THE FORM3 WILL LOAD POST #2 Pass By: De Vera, Pyke Danrenz BSIT3 B1

Upload: p-danrenz-de-vera

Post on 05-Dec-2015

11 views

Category:

Documents


0 download

DESCRIPTION

it3-b1

TRANSCRIPT

THIS PROGRAM CREATE A LOG IN SYSTEM THAT LOADS DIFFERENT FORMS

FOR EVERY USER TYPEAND IF THE USER TYPE "ADMIN" THEN THE FORM2 WILL LOAD, THEN IF THE

USER TYPE"STAFF" THE FORM3 WILL LOAD

POST #2

Pass By: De Vera, Pyke Danrenz

BSIT3 B1

STEP 1. OPEN THE VISUAL STUDIO 2012 OR C# APPLICATION

STEP 2. CLICK NEW PROJECT

STEP 3. SELECT VISUAL C# AND THEN SELECT WINDOWS FORMS APPLICATION AFTER THAT CLICK OK

Edit the name

Of your project

here into log in system

STEP 4. CREATE A FORM1 LIKE THIS AS YOUR FIRST FORM.

Select a control that you want to edit

Its properties

Textbox 1

Textbox 2

Button 1

Button 2

Label 3

Label 1

Label 2

Step 5.Add two forms as your Form2 and Form3. just right click the highlighted word logInSystem, then select Add after that select Windows form

and then just enter and no need to rename.To Add form3 just do it again the instruction in step 2.

1st

2nd

3rd

1st Select this

2nd click this

You can rename this

STEP 6.DESIGN YOUR FORM2 AND FORM3 JUST LIKE THIS.FORM2 IS ALMOST THE SAME AS FORM3 EXCEPT THE

LABEL1, JUST RENAMETHE LABEL1 IN FORM3 TO "USER:STAFF" THE REST IS THE

SAME.

Label 1 Label 3

Rich text box 1

Date time picker 1

Button 2

Textbox 1

Button 1

STEP 7.HERE'S THE CODING PORTION, DOUBLE CLICK THE BUTTON1 IN FORM1.THEN COPY OR TYPE THE CODE BELOW:

Continue coding

THEN COPY THE CODE BELOW:

Step 8.Here's the second coding portion, double click the button1 or log in button in

Form2

STEP 9.THE SAME CODING INSTRUCTION IN STEP 5,DOUBLE CLICK THE BUTTON1 IN FORM3 THEN COPY THE CODE BELOW:

Output

Step 10. F5 to run the program and the output is look like this.

username: admin password: admin or

Username: staff password: staff

Output

REFERENCE: