0% found this document useful (0 votes)
40 views2 pages

Visual Programming MCS MIT MiD Fall 2016

The document contains questions for a visual programming midterm exam. Question 1 involves validating user input and saving records to a database table. Question 2 retrieves employee records from the database where pay is over 15000 and displays a message box with the employee count between two dates. Question 3 defines programming concepts and provides examples.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views2 pages

Visual Programming MCS MIT MiD Fall 2016

The document contains questions for a visual programming midterm exam. Question 1 involves validating user input and saving records to a database table. Question 2 retrieves employee records from the database where pay is over 15000 and displays a message box with the employee count between two dates. Question 3 defines programming concepts and provides examples.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

PMAS Arid Agriculture University Rawalpindi

University Institute of Information Technology

VISUAL PROGRAMMING
Mid Examination- Fall 2016
MCS/MIT 3rd Semester (M/E)
Max Marks : 18 Time Allowed : 90 Mins
Note: Attempt All Questions. Read Each Questions carefully before you attempt Question
Question No. 01
Consider the following Details
Database Server Name : dbserver1
Database Name : PayRollSystem
User Id : sa and Password : uiit%12
Table Name : tbl_PayDetails(PayID, EmpName, EmpCNIC, BankDetails,
NetPayAmount, PayDate)
Finally, perform the following operations
1. When btnAddNewEmpSal button is pressed then it must be ensured that
(a)- EmpName must not be NULL
(b)- Length of the CNIC must be 13 (without hyphen)
(c)- PayDate must not be greater than System Date (i.e. Today Date)
(d)- NetPayAmount must be non-negative, non-zero
Change the BackColor and add appropriate messages to the Textboxes if any of (a)- to (d)-
conditions are failed.
2. Before Record is saved to database table, Confirms from user that He/She really want to
save the record (by using MessageBox). If user press the Yes button on MessageBox
then record is saved otherwise record is not saved to database.
3. Add a button named btnAddNewEmpSal on the Form, when you click on the button
then a new Record is stored to tbl_PayDetails.
Question No. 02
Using the database details given in Question No. 1,
(a)- Write the C# Code to fill the dataGridView with those employees record whose pay is
greater than 15000 in the Form_Load() event.
(b)- Show in MessageBox, how many Employees paid during the period 1-July-2016 to 31-
October-2016. MessageBox is displayed when you press the button named
btnShowMessage
PMAS Arid Agriculture University Rawalpindi
University Institute of Information Technology

Question No. 03 [5 Marks]


Define the following Concepts
1. Define .Net framework

2. Define CLR, FCL

3. Differentiate between SDI & MDI

4. Differentiate between Byte Code & MSIL

5. Define the purpose of the following Windows available in Visual Studio IDE:

ToolBox, Solution Explorer, Property Windows, Error List

6. Give programming examples for Console.ReadKey(), Console.Write(),

Console.WriteLine(), do-while in C# Console Application.

7. Using TextBoxes, Labels and Buttons design the Simple Calculator Application in

C#.

You might also like