00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŵ

00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page Ŷ

Cours.: O|j.ct Ori.ut.d iro,rauuiu,
iroj.ct ou: Ouiz Maua,.u.ut S·st.u

¹l'I¯¯!! ¯´·

Sir Z..s|au i|a«.r

¹l'I¯¯!! l`·

Mar·au S|.|zadi l08 MD 148
la|ia Za|..r l08 MD 024
la«ad Mirza l07 MD 0SS
lsuail la··az l08 MD 034
Mu|auuad Ali l08 MD 03S
Saluau A|ual l08 MD 043


Tabl¢ of Cont¢nts
Introduction .................................................................................................................................................................. ŵ
Modul¢s and Coding ................................................................................................................................... Ŷ
0uiz Nanagement System Foim ................................................................................................. Ŷ
Welcome Foim ................................................................................................................................. Ÿ
NBI Paient Foim ............................................................................................................................. Ż
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŷ

Staiting Winuows Foim ............................................................................................................. ŵŵ
Cieate Login Foim ...................................................................................................................... ŵŷ
0nline 0uiz Sheet Foim.............................................................................................................. ŵŻ
Passwoiu Recoveiy Foim .......................................................................................................... Ŷź
Log 0ut Foim ................................................................................................................................. ŷŴ
Shut Bown Loauing Foim .......................................................................................................... ŷŶ
Staiting Aumin Winuow Scieen Foim ................................................................................... ŷŸ
Change aumin Info Foim ........................................................................................................... ŷź
Cieate 0uiz Foim.......................................................................................................................... ŷ9
Auu 0uestion Foim ...................................................................................................................... ŸŶ
uoogle Seaich Foim..................................................................................................................... ŹŸ
Belete Stuuent Login Foim ....................................................................................................... ŹŹ
Euit 0uestion Foim...................................................................................................................... Źź
¢ports .......................................................................................................................................................... źŶ
Papei Show Repoit ...................................................................................................................... źŶ
Answei Sheet Repoit .................................................................................................................. źŸ
Stuuent Result Batabase Foim ................................................................................................ źŹ
Stuuent Solveu Sheet Foim ....................................................................................................... źŻ
Naiks Sheet Foim ........................................................................................................................ ź9
Acc¢ss Databas¢ ¢cords ...................................................................................................................... Żŵ
Auu 0uestion in Batabase ........................................................................................................... Żŵ
Answei Sheet Batabase .............................................................................................................. ŻŶ
0lu 0uiz Solveu Sheet Batabase ............................................................................................... Żŷ
Cieate 0uiz Title............................................................................................................................. ŻŸ
Login Batabase ............................................................................................................................... ŻŹ
Naiks Sheet Batabase .................................................................................................................. Żź
0lu 0uizes Naiks Sheet Batabase ............................................................................................ ŻŻ
Conclusion................................................................................................................................................................... Ż8

00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page Ÿ

INTDUCTIN:
This pioject is about NLINE QUIZ SYSTEM which pioviues the facility to both Teacheis anu Stuuents. Teacheis have a
sepaiate login system to geneiate quiz accoiuing to subject. A piogiam has a facility to Inseit questions in quiz along
with uiffeient functionalities like upuate quiz, view quiz, select quiz anu uelete quiz. Theie is also a sepaiate
Auministiative Login pioviueu to teacheis so that stuuents can't cheat by enteiing into teachei's login anu getting the
quizzes. Stuuents have sepaiate section foi login, anu take quiz. Aftei taking quizzes the piogiam will check the quizzes,
geneiate maiks anu view iepoits.
Foi enteiing into whole piocess theie is a system of Login wheie stuuents anu teacheis give theii IB anu passwoiu. If
theie is a new usei in piocess the piogiam also have a facility to iegistei a new stuuent. Besiues that system also checks
eithei passwoiu is accuiate oi not anu it uoes also pioviues facility to iecovei passwoiu in case of loose youi passwoiu
anu to change the existing passwoiu. Along with all this, theie aie uiffeient types of exception hanuling, secuiity anu
seaich mouules aie maue to make the piogiam moie convenient anu usei fiienuly.







00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page Ź

Class Cod¢
//IN1FRFCFS//

inteiface NaiksŎEvaluationŎCiiteiia
{
uecimal count():
}
inteiface SystemŎBatabase
{
voiu selection(stiing queiy, stiing tablename):
voiu inseit(stiing queiy):
voiu upuate(stiing queiy):
voiu uelete(stiing queiy):

}

//INHFRI1FNCF IN1FRFACF//

inteiface ExceptionŎhanuling:SystemŎBatabase
{
int logineiioichek(stiing a, stiing b, stiing c):
int passiecoveiyeiioichekŵ(stiing b):
int passiecoveiyeiioichekŶ(stiing a, stiing b):
int auminpasschangeeiioi(stiing b):
int stuuentpasschangeeiioi(stiing b):
int ueletelogineiioichk(stiing b):
int viewquestioneioichek(stiing b):
int euitquestioneiioichek(stiing b):
}

//CIASSFS INHFRI1FNCF WI1H OVFRRIÐIN0 PIUS POIIMORPHISAM//

public class obtainmaiks :NaiksŎEvaluationŎCiiteiia
{
public uecimal om:
public uecimal m:
public static uecimal incieament = ŵ:
public static uecimal incieamentŵ = ŵ:

public viitual uecimal count()
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ź

{
om = om + incieament:
ietuin om:
}
}
public class maxmaiks : obtainmaiks
{


public oveiiiue uecimal count()
{
m = m + incieamentŵ:
ietuin m:
}

}

//CIASSFS//

public class quizsystem:ExceptionŎhanuling
{

//FOIIOWIN0 ARF 1HF OBjFC1S OF 1HF CIASS//

public stiing|] questions = new stiing|ŵŶ]:
public int q:
public stiing pass:
stiing connection = ŐPioviuei=Niciosoft.Iet.0LEBB.Ÿ.Ŵ:Bata Souice=quizsystemŶŴŴŴ.mubŐ:
public 0leBbConnection conn = new 0leBbConnection():
public 0leBbBataAuaptei uataauaptei = new 0leBbBataAuaptei():
public BataSet uataset = new BataSet():
public 0leBbCommanu commanu = new 0leBbCommanu():

//CONS1RUC1OR FUNC1ION//

public quizsystem()
{
conn.ConnectionStiing = connection:
conn.0pen():
}

//INSFR1, UPÐA1F,ÐFIF1F MF1HOÐS//
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page Ż

public voiu selection(stiing queiy, stiing tablename)
{
uataauaptei = new 0leBbBataAuaptei(queiy, conn):
uataauaptei.Fill(uataset, tablename):
}
public voiu inseit(stiing queiy)
{
commanu = new 0leBbCommanu(queiy, conn):
commanu.ExecuteNon0ueiy():
}
public voiu upuate(stiing queiy)
{
commanu = new 0leBbCommanu(queiy, conn):
commanu.ExecuteNon0ueiy():
}
public voiu uelete(stiing queiy)
{
commanu = new 0leBbCommanu(queiy, conn):
commanu.ExecuteNon0ueiy():
}

//SIMPIF MF1HOÐS//

public int logineiioichek(stiing a, stiing b, stiing c)
{
int i = Ŵ:
int ans = Ÿ:
foieach (BataRow iow in uataset.Tables|Ŵ].Rows)
{
if (Conveit.ToStiing(iow|ŐnameŐ]) == a || Conveit.ToStiing(iow|ŐpassŐ]) == a || Conveit.ToStiing(iow|ŐoccuŐ]) == c)
{
ans = ŵ:
}
else
{
i++:
}
}
if (i == uataset.Tables|ŐloginŐ].Rows.Count)
{
ans = Ŵ:
}
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page 8

ietuin ans:
}

public int passiecoveiyeiioichekŵ(stiing b)
{
int i = Ŵ:
int ans = Ÿ:
foieach (BataRow iow in uataset.Tables|Ŵ].Rows)
{
if (Conveit.ToStiing(iow|ŐnameŐ]) == b)
{
ans = ŵ:
}
else
{
i++:
}
}
if (i == uataset.Tables|ŐloginŐ].Rows.Count)
{
ans = Ŵ:
}
ietuin ans:
}
public int passiecoveiyeiioichekŶ(stiing a,stiing b)
{
int i = Ŵ:
int ans = Ÿ:
foieach (BataRow iow in uataset.Tables|Ŵ].Rows)
{
if (Conveit.ToStiing(iow|ŐsqŐ]) == a || Conveit.ToStiing(iow|ŐansŐ])==b )
{
pass = Conveit.ToStiing(iow|ŐpassŐ]):
ans = ŵ:
}
else
{
i++:
}
}
if (i == uataset.Tables|ŐloginŐ].Rows.Count)
{
ans = Ŵ:
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page 9

}
ietuin ans:
}
public int auminpasschangeeiioi(stiing b)
{
int i = Ŵ:
int ans = Ÿ:
foieach (BataRow iow in uataset.Tables|Ŵ].Rows)
{
if (Conveit.ToStiing(iow|ŐpassŐ]) == b)
{
ans = ŵ:
}
else
{
i++:
}
}
if (i == uataset.Tables|ŐloginŐ].Rows.Count)
{
ans = Ŵ:
}
ietuin ans:
}
public int stuuentpasschangeeiioi(stiing b)
{
int i = Ŵ:
int ans = Ÿ:
foieach (BataRow iow in uataset.Tables|Ŵ].Rows)
{
if (Conveit.ToStiing(iow|ŐpassŐ]) == b)
{
ans = ŵ:
}
else
{
i++:
}
}
if (i == uataset.Tables|ŐloginŐ].Rows.Count)
{
ans = Ŵ:
}
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŵŴ

ietuin ans:
}

public int ueletelogineiioichk(stiing b)
{
int i = Ŵ:
int ans = Ÿ:
foieach (BataRow iow in uataset.Tables|Ŵ].Rows)
{
if (Conveit.ToStiing(iow|ŐnameŐ]) == b)
{
ans = ŵ:
}
else
{
i++:
}
}
if (i == uataset.Tables|ŐloginŐ].Rows.Count)
{
ans = Ŵ:
}
ietuin ans:
}
public int viewquestioneioichek(stiing b)
{
int i = Ŵ:
int ans = Ÿ:
foieach (BataRow iow in uataset.Tables|Ŵ].Rows)
{
if (Conveit.ToStiing(iow|ŐqnoŐ]) == b)
{
questions|Ŵ] = Conveit.ToStiing(iow|ŐqstmtŐ]):
questions|ŵ] = Conveit.ToStiing(iow|ŐansŵŐ]):

questions|Ŷ] = Conveit.ToStiing(iow|ŐansŶŐ]):

questions|ŷ] = Conveit.ToStiing(iow|ŐansŷŐ]):

questions|Ÿ] = Conveit.ToStiing(iow|ŐansŸŐ]):

questions|Ź] = Conveit.ToStiing(iow|ŐansŹŐ]):

00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŵŵ

questions|ź] = Conveit.ToStiing(iow|ŐcictansŐ]):

ans = ŵ:
}
else
{
i++:
}
}
if (i == uataset.Tables|ŐauuquestŐ].Rows.Count)
{
ans = Ŵ:
}
ietuin ans:
}
public int euitquestioneiioichek(stiing b)
{
int i = Ŵ:
int ans = Ÿ:
foieach (BataRow iow in uataset.Tables|Ŵ].Rows)
{
if (Conveit.ToStiing(iow|ŐqnoŐ]) == b)
{
ans = ŵ:
}
else
{
i++:
}
}
if (i == uataset.Tables|ŐauuquestŐ].Rows.Count)
{
ans = Ŵ:
}
ietuin ans:
}

}

}


00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŵŶ

MDULES AND CDINC
QUIZ MANACEMENT SYSTEM {FM: ŵŵ)
This is a staiting foim of 0uiz system pioject.
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŵŷ

CDINC F FM ŵŵ:
//SPIASH SCRFFN COÐF//
piivate voiu FoimŵŵŎLoau(object senuei, EventAigs e)
{
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŵŸ

timeiŵ.Stait():
p.value = Ŵ:
timeiŶ.Stait():
}

piivate voiu timeiŵŎTick(object senuei, EventAigs e)
{
this.0pacity += Ŵ.ŴŶ:
}

piivate voiu timeiŶŎTick(object senuei, EventAigs e)
{
NBIPaientŵ paiemtfoim = new NBIPaientŵ():

if (p.value >= p.Naximum - ŵ)
{
this.0pacity -= Ŵ.ŷ:
if (this.0pacity <= Ŵ)
{
this.Biue():
timeiŶ.Stop():
timeiŵ.Stop():
paiemtfoim.Show():
}
}
else
{
p.value += Ŷ:
}
}


ELCME FM {FM: ŵŷ)
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŵŹ

CDINC F FM ŵŷ:
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŵź

AÐMINIS1RA1OR MAIN WINÐOWS AF1FR IO0IN SCRFFN

]]F MAKE QUIZ ]]

piivate voiu builu0uizToolStiipNenuItemŎClick(object senuei, EventAigs e)
{
FoimŸ obj = new FoimŸ():
obj.Show():
}

]]F CNFIM LCUT INDS]]

piivate voiu buttonŵŎClick(object senuei, EventAigs e)
{
FoimŻ obj = new FoimŻ():
obj.Show():
this.Close():
}

]]F CNFIM LCUT INDS THUCH MENUSTIP]]

piivate voiu logoutToolStiipNenuItemŎClick(object senuei, EventAigs e)
{
FoimŻ obj = new FoimŻ():
obj.Show():
this.Close():
}

]]F VISUAL EFFECTS F FM]]

piivate voiu timeiŵŎTick(object senuei, EventAigs e)
{
this.0pacity += Ŵ.ŵ:
}

]]STATINC VISUAL EFFECT THUCH THIS TIME]]

piivate voiu FoimŶŎLoau(object senuei, EventAigs e)
{
timeiŵ.Stait():
}



piivate voiu toolStiipNenuItemŷŎClick(object senuei, EventAigs e)
{
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŵŻ

FoimŵŸ foimŵŸobj = new FoimŵŸ():
foimŵŸobj.Show():
}

piivate voiu changeLoginPasswoiuToolStiipNenuItemŎClick(object senuei, EventAigs e)
{
Foimŵ8 obj = new Foimŵ8():
obj.Show():
}

piivate voiu ueleteLoginToolStiipNenuItemŎClick(object senuei, EventAigs e)
{
Foimŵ9 obj = new Foimŵ9():
obj.Show():
}

piivate voiu piint0uizToolStiipNenuItemŎClick(object senuei, EventAigs e)
{
Foimŷ obj = new Foimŷ():
obj.Show():
}

piivate voiu iesultToolStiipNenuItemŎClick(object senuei, EventAigs e)
{
FoimŶŴ obj = new FoimŶŴ():
obj.Show():
}

piivate voiu solveuAnsweiSheetRepoitToolStiipNenuItemŎClick(object senuei, EventAigs e)
{
Foim8 obj = new Foim8():
obj.Show():
}

piivate voiu toolStiipNenuItemŵŎClick(object senuei, EventAigs e)
{
FoimŶŵ obj = new FoimŶŵ():
obj.Show():
}





LCIN SCEEN {MDI PAENT FM):
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŵ8

This is a snapshot of NBI paient login foim wheie Teacheis anu stuuents make theii login anu enteis foi fuithei
piocessing.




















CDINC F MDI PAENT FM ŵ:
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŵ9

//IO0IN SCRFFN FORM COÐF//

//FOR OPACI1Y OF IO0IN FORM 1IMFR IS RUNNIN0 HFRF//

piivate voiu NBIPaientŵŎLoau(object senuei, EventAigs e)
{
timeiŵ.Stait():
}
//FOR FFFFC1S OF OPACI1Y WORKIN0 IS HFRF//

piivate voiu timeiŵŎTick(object senuei, EventAigs e)
{
this.0pacity += Ŵ.ŵ:
if (p.value >= p.Naximum - ŵ)
{
timeiŵ.Stop():
}

else
{
p.value += Ŷ:
}
}

]]LCIN BUTTN CDE]]

piivate voiu buttonŵŎClick(object senuei, EventAigs e)
{
stiing useiname = textBoxŵ.Text:
stiing pass = textBoxŶ.Text:
int x = Ź:
stiing loginqueiy = ŐSELECT * FR0N login wheie name = ŏŐ + useiname + Őŏ anu pass = ŏŐ + pass + Őŏ anu occu = ŏŐ +
comboBoxŵ.SelecteuItem + Őŏ Ő:

quizsystem obj = new quizsystem():

obj.selection(loginqueiy,ŐloginŐ):
x=obj.logineiioichek(useiname,pass,comboBoxŵ.SelecteuText):
if(x==ŵ)
{
if (comboBoxŵ.SelecteuInuex == Ŵ)
{
p.value = Ŵ:
timeiŵ.Stait():
Foimŵ foimŵobj = new Foimŵ():
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŶŴ

foimŵobj.Show():
this.Biue():
}
else if (comboBoxŵ.SelecteuInuex == ŵ)
{
pŵ.value = Ŵ:
timeiŶ.Stait():
FoimŸ foimŸobj = new FoimŸ():
foimŸobj.Show():
this.Biue():
}
}
else if(x==Ŵ)
{
if (NessageBox.Show(ŐNake Suie The 0seiname anu Passwoiu anu Bomain you enteieu is Coiiect.Ő + ŐōiōnŐ + ŐBo you
wish to tiy again Ő, ŐIncoiiect PasswoiuŐ, NessageBoxButtons.YesNo) == BialogResult.Yes)

{
this.Activate():
textBoxŵ.Cleai():
textBoxŶ.Cleai():
comboBoxŵ.SelecteuInuex=-ŵ:
}
else
{
this.Close():
}
}
}

//PIC1URF CHAN0F IN PIC1URFBOX SFIFC1 ON COMOBOX OP1ION COÐF//

piivate voiu comboBoxŵŎSelecteuInuexChangeu(object senuei, EventAigs e)
{
if (comboBoxŵ.SelecteuInuex == Ŵ)
{
this.pictuieBoxŶ.Image = global::WinuowsFoimsApplicationŵ.Piopeities.Resouices.imagesuy:
}
else if (comboBoxŵ.SelecteuInuex == ŵ)
{
this.pictuieBoxŶ.Image = global::WinuowsFoimsApplicationŵ.Piopeities.Resouices.iconLoginŵ:
}
}

//FOR OPACI1Y FFFFC1 ANO1HFR 1IMFR IS WORKIN0 HFRF//

00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page Ŷŵ

piivate voiu timeiŶŎTick(object senuei, EventAigs e)
{
this.0pacity += Ŵ.ŵ:
if (pŵ.value >= pŵ.Naximum - ŵ)
{
timeiŶ.Stop():
}
else
{
pŵ.value += Ŷ:
}
}


//APPFAR CRFA1F IO0IN FOR S1UÐFN1 HFRF//

piivate voiu buttonŷŎClick(object senuei, EventAigs e)
{
Foim9 obj = new Foim9():
obj.Show():
}


//OPFN PASSWORÐ RFCOVFRY FORM HFRF//

piivate voiu buttonŶŎClick(object senuei, EventAigs e)
{
FoimŹ obj = new FoimŹ():
obj.Show():
}

//SHU1 ÐOWN BU11ON COÐF//

piivate voiu buttonŸŎClick(object senuei, EventAigs e)
{
this.Close():
}




STATINC IND FM {FM: Ÿ)
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŶŶ

Now this is a piocessing which leaus to ielevant piocess which is chosen, such as staiting client winuows.





















CDINC F FM Ÿ:
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page Ŷŷ

//1O S1AR1 1HIS WINÐOWS 1IMFR IS RFOUIRFÐ HFRF FOR FFFFC1S//

piivate voiu FoimŸŎLoau(object senuei, EventAigs e)
{
p.value = Ŵ:
timeiŵ.Stait():
}

//1IMFR WHFRF FFFFC1 IS WORKIN0//

piivate voiu timeiŵŎTick(object senuei, EventAigs e)
{
Foimŵŷ foimŵŷobj = new Foimŵŷ():
if (p.value >= p.Naximum - ŵ)
{
this.0pacity -= Ŵ.Ÿ:
if (this.0pacity <= Ŵ)
{
foimŵŷobj.Show():
this.Close():
}
}
else
{
p.value += Ŷ:
}
}
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŶŸ

CEATE LCIN FM F STUDENTS {FM: 9)
This scieen is useu foi cieating stuuents login by fulfilling the ielevant infoimation like usei name, passwoiu, secuiity
question anu its answei.



























00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŶŹ

CDINC F FM 9:
]] CEATE LCIN F STUDENT FM CDE]]

//PASSWORÐ MA1CH COÐIN0 ON 1FX1BOX//

piivate voiu textBoxŸŎTextChangeu(object senuei, EventAigs e)
{
if (textBoxŸ.Text == textBoxŷ.Text)
{
labelŹ.visible = tiue:
labelź.visible = false:
pictuieBoxŵ.visible = tiue:
}
//BACK BU11ON COÐIN0//

piivate voiu buttonŷŎClick(object senuei, EventAigs e)
{
this.Close():
}
//CRFA1F IO0IN INSFR1 ÐA1A COÐF//

piivate voiu buttonŵŎClick(object senuei, EventAigs e)
{
if (textBoxŶ.Text == ŐŐ || textBoxŸ.Text == ŐŐ || textBoxŷ.Text == ŐŐ || textBoxŹ.Text == ŐŐ || comboBoxŵ.Items.Count==Ŵ)
{
NessageBox.Show(ŐNust Entei all the infoŐ):
textBoxŶ.Cleai():
textBoxŷ.Cleai():
textBoxŸ.Cleai():
comboBoxŵ.SelecteuInuex = -ŵ:
textBoxŹ.Cleai():
labelŹ.visible = false:
pictuieBoxŵ.visible = false:
}
else
{
if (textBoxŸ.Text != textBoxŷ.Text)
{
labelź.visible = tiue:
labelŹ.visible = false:
pictuieBoxŵ.visible = false:
}
else
{
tiy
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page Ŷź

{
stiing occu = textBoxŵ.Text:
stiing name = textBoxŶ.Text:
stiing pass = textBoxŸ.Text:
stiing ans = textBoxŹ.Text:
stiing inseitstuuentinfo = Őinseit into login values(ŏŐ + name + Őŏ , ŏŐ + pass + Őŏ , ŏŐ + occu + Őŏ , ŏŐ + ans + Őŏ , ŏŐ +
comboBoxŵ.SelecteuItem + Őŏ)Ő:
quizsystem loginobj = new quizsystem():
loginobj.inseit(inseitstuuentinfo):
if (NessageBox.Show(ŐRecoiu has been stoieu successfully Ő, ŐSuccessŐ, NessageBoxButtons.0K) == BialogResult.0K)
{
this.Close():
}

loginobj.conn.Close():
}
catch (Exception)
{
NessageBox.Show(ŐThis Account is Alieauy Exist, Tiy Anothei 0seinameŐ):
}
}
piivate voiu buttonŶŎClick(object senuei, EventAigs e)
{
if (textBoxŶ.Text == ŐŐ)
{
NessageBox.Show(ŐNust entei 0seinameŐ, ŐAccess BenieuŐ):
}
else
{
pictuieBoxŶ.visible = tiue:
label9.visible = false:
labelŵŴ.visible = false:
stiing uname = textBoxŶ.Text:
int x = Ź:
stiing nameselect = Őselect * fiom login wheie name = ŏŐ + uname + ŐŏŐ:
quizsystem selectobj = new quizsystem():
selectobj.selection(nameselect, ŐloginŐ):
x = selectobj.passiecoveiyeiioichekŵ(uname):
if (x == ŵ)
{

p.value = Ŵ:
timeiŵ.Stait():
}
else if (x == Ŵ)
{
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŶŻ

pŵ.value = Ŵ:
timeiŶ.Stait():
}
}
}

piivate voiu timeiŵŎTick(object senuei, EventAigs e)
{
if (p.value == p.Naximum)
{
label9.visible = tiue:
labelŵŴ.visible = false:
pictuieBoxŶ.visible = false:
timeiŵ.Stop():
}
else
{
p.value += Ź:
}
}

piivate voiu timeiŶŎTick(object senuei, EventAigs e)
{
if (pŵ.value == pŵ.Naximum)
{
label9.visible = false:
labelŵŴ.visible = tiue:
pictuieBoxŶ.visible = false:
timeiŶ.Stop():
}
else
{
pŵ.value += Ź:
}







00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page Ŷ8

NLINE QUIZZ SHEET {FM: ŵŶ)
This winuow is foi taking quizzes fiom stuuents, which is piepaieu by the Auministiatoi.



00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page Ŷ9

CDINC F FM ŵŶ:
//ONIINF OUIZ SHFF1 FORM//

//BACK BU11ON COÐF//

piivate voiu buttonŷŎClick(object senuei, EventAigs e)
{
this.Close():
}

//ANSWFR OP1IONS RAÐIOBU1ONS COÐF//

piivate voiu iauioButtonŵŎCheckeuChangeu(object senuei, EventAigs e)
{
textBox9.Text = ŐAŐ:
if (iauioButtonŵ.Checkeu)
{
iauioButtonŶ.Enableu = false:
iauioButtonŷ.Enableu = false:
iauioButtonŸ.Enableu = false:
iauioButtonŹ.Enableu = false:
}
}
piivate voiu iauioButtonŶŎCheckeuChangeu(object senuei, EventAigs e)
{
textBox9.Text = ŐBŐ:
if (iauioButtonŶ.Checkeu)
{
iauioButtonŵ.Enableu = false:
iauioButtonŷ.Enableu = false:
iauioButtonŸ.Enableu = false:
iauioButtonŹ.Enableu = false:
}
}

piivate voiu iauioButtonŷŎCheckeuChangeu(object senuei, EventAigs e)
{
textBox9.Text = ŐCŐ:
if (iauioButtonŷ.Checkeu)
{
iauioButtonŶ.Enableu = false:
iauioButtonŵ.Enableu = false:
iauioButtonŸ.Enableu = false:
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŷŴ

iauioButtonŹ.Enableu = false:
}
}

piivate voiu iauioButtonŸŎCheckeuChangeu(object senuei, EventAigs e)
{
textBox9.Text = ŐBŐ:
if (iauioButtonŸ.Checkeu)
{
iauioButtonŶ.Enableu = false:
iauioButtonŷ.Enableu = false:
iauioButtonŵ.Enableu = false:
iauioButtonŹ.Enableu = false:
}
}

piivate voiu iauioButtonŹŎCheckeuChangeu(object senuei, EventAigs e)
{
textBox9.Text = ŐEŐ:
if (iauioButtonŹ.Checkeu)
{
iauioButtonŶ.Enableu = false:
iauioButtonŷ.Enableu = false:
iauioButtonŸ.Enableu = false:
iauioButtonŵ.Enableu = false:
}
}

//OUIZ S1AR1IN0 IOAÐ VAIUFS FROM 1ABIFS COÐF//

piivate voiu FoimŵŶŎLoau(object senuei, EventAigs e)
{
stiing viewmsqt = Őselect * fiom maiksheetubŐ:
quizsystem auuquestobjŶ = new quizsystem():
auuquestobjŶ.selection(viewmsqt, ŐmaiksheetubŐ):
foieach (BataRow iow in auuquestobjŶ.uataset.Tables|ŐmaiksheetubŐ].Rows)
{

vqtm.Text = Conveit.ToStiing(iow|ŐqtŐ]):
}
auuquestobjŶ.conn.Close():
stiing viewasqt = Őselect * fiom answeisheetubŐ:
quizsystem auuquestobjŷ = new quizsystem():
auuquestobjŷ.selection(viewasqt, ŐansweisheetubŐ):
foieach (BataRow iow in auuquestobjŷ.uataset.Tables|ŐansweisheetubŐ].Rows)
{
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŷŵ

vqtans.Text = Conveit.ToStiing(iow|ŐqtŐ]):
}
auuquestobjŶ.conn.Close():

stiing auuquestviewŵ = Őselect * fiom auuquestŐ:
quizsystem auuquestobjŵ = new quizsystem():
auuquestobjŵ.selection(auuquestviewŵ, ŐauuquestŐ):
foieach (BataRow iow in auuquestobjŵ.uataset.Tables|ŐauuquestŐ].Rows)
{

textBox8.Text = Conveit.ToStiing(iow|ŐqnoŐ]):
}
auuquestobjŵ.conn.Close():

//INS1AN1IA1ION OF POIIMORPHISAM VARIABIFS ON FORM IOAÐ ON ACCOUN1 OF COUN1FR//

obj|Ŵ] = new obtainmaiks():
obj|ŵ] = new maxmaiks():

ÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈ

stiing titleview = Őselect * fiom cieatequizŐ:
quizsystem titleobj = new quizsystem():
titleobj.selection(titleview, ŐcieatequizŐ):
foieach (BataRow iow in titleobj.uataset.Tables|ŐcieatequizŐ].Rows)
{
qt.Text = Conveit.ToStiing(iow|ŐqtŐ]):
cn.Text = Conveit.ToStiing(iow|ŐcnŐ]):
ct.Text = Conveit.ToStiing(iow|ŐctŐ]):
ti.Text = Conveit.ToStiing(iow|ŐciŐ]):
tm.Text = Conveit.ToStiing(iow|ŐmmŐ]):
ta.Text = Conveit.ToStiing(iow|ŐtaŐ]):
u.Text = Conveit.ToStiing(iow|ŐquŐ]):
ei.Text = Conveit.ToStiing(iow|ŐetŐ]):
}
if (textBox8.Text == ŐŐ)
{
if (NessageBox.Show(ŐTheie is no quiz foi AttemtŐ + ŐōiōnŐ + ŐPlease contact to youi InstiuctoiŐ, ŐAccess BenieuŐ,
NessageBoxButtons.0K) == BialogResult.0K)
{
this.Close():
}
}
else if (textBox8.Text != ŐŐ)
{
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŷŶ

stiing auuquestview = Őselect * fiom auuquestŐ:
quizsystem auuquestobj = new quizsystem():
auuquestobj.selection(auuquestview, ŐauuquestŐ):
foieach (BataRow iow in auuquestobj.uataset.Tables|ŐauuquestŐ].Rows)
{
listBoxŵ.Items.Auu(Conveit.ToStiing(iow|ŐqnoŐ])):

}
auuquestobj.conn.Close():
listBoxŵ.SelecteuInuex = Ŵ:
}

}

//OUFS1ION APPFAR ON IIS1BOX INÐFX CHAN0F COÐF//

piivate voiu listBoxŵŎSelecteuInuexChangeu(object senuei, EventAigs e)
{

stiing selectquest = Őselect * fiom auuquest wheie qno=ŏŐ + listBoxŵ.SelecteuItem + ŐŏŐ:
quizsystem select = new quizsystem():
select.selection(selectquest, ŐauuquestŐ):
foieach (BataRow iow in select.uataset.Tables|ŐauuquestŐ].Rows)
{
qno.Text = Conveit.ToStiing(iow|ŐqnoŐ]):
qs.Text = Conveit.ToStiing(iow|ŐqstmtŐ]):
optŵ.Text = Conveit.ToStiing(iow|ŐansŵŐ]):
optŶ.Text = Conveit.ToStiing(iow|ŐansŶŐ]):
optŷ.Text = Conveit.ToStiing(iow|ŐansŷŐ]):
optŸ.Text = Conveit.ToStiing(iow|ŐansŸŐ]):
optŹ.Text = Conveit.ToStiing(iow|ŐansŹŐ]):
cans.Text = Conveit.ToStiing(iow|ŐcictansŐ]):
}
select.conn.Close():
if (listBoxŵ.SelecteuInuex == listBoxŵ.Items.Count - ŵ)
{
buttonŵ.visible = false:
buttonŶ.visible = tiue:
}
}

]]AAY B)ECT CALL F PLIMPHISAM]]

obtainmaiks|] obj = new obtainmaiks|Ŷ]:


00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŷŷ

//1O SOIVF 1HF OUIZ -----NFX1 BU11ON COÐF---FOR IAS1 OUFS1ION//

piivate voiu buttonŶŎClickŎŵ(object senuei, EventAigs e)
{
tiy
{
if (textBoxŵ.Text == ŐŐ || textBoxŶ.Text == ŐŐ)
{
NessageBox.Show(ŐNust entei the Roll No anu NameŐ):
}
else
{
if (iauioButtonŵ.Checkeu || iauioButtonŶ.Checkeu || iauioButtonŷ.Checkeu || iauioButtonŸ.Checkeu ||
iauioButtonŹ.Checkeu)
{
obj|ŵ].count():
mm.Text = Conveit.ToStiing(obj|ŵ].m):
if (textBox9.Text == cans.Text)
{
obj|Ŵ].count():
gm.Text = Conveit.ToStiing(obj|Ŵ].om):
textBoxŷ.Text = ŐCoiiect AnsweiŐ:
}
else if (textBox9.Text != cans.Text)
{
textBoxŷ.Text = ŐWiong AnsweiŐ:
textBoxŸ.Text = cans.Text:
}
uecimal iesult = (obj|Ŵ].om ¡ obj|ŵ].m) * ŵŴŴ:
i.Text = Conveit.ToStiing(iesult):
stiing iolno = textBoxŵ.Text:
stiing nam = textBoxŶ.Text:
stiing ans = textBox9.Text:
stiing is = textBoxŷ.Text: :
stiing cictans = textBoxŸ.Text:
if (cictans != ŐŐ)
{ cictans = ŐCoiiect Answei: Ő + textBoxŸ.Text: }
else
{ cictans = ŐŐ: }
stiing ansstmt = textBoxŹ.Text:
stiing isltstmt = textBoxŻ.Text:

stiing inseitŵ = Őinseit into answeisheet values(ŏŐ + iolno + Őŏ,ŏŐ + nam + Őŏ,ŏŐ + qno.Text + Őŏ,ŏŐ + qs.Text + Őŏ,ŏŐ + optŵ.Text +
Őŏ,ŏŐ + optŶ.Text + Őŏ,ŏŐ + optŷ.Text + Őŏ,ŏŐ + optŸ.Text + Őŏ,ŏŐ + optŹ.Text + Őŏ,ŏŐ + ansstmt + Őŏ,ŏŐ + ans + Őŏ,ŏŐ + isltstmt + Őŏ,ŏŐ + is + Őŏ,ŏŐ +
cictans + Őŏ)Ő:
quizsystem inseitansweisheet = new quizsystem():
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŷŸ

inseitansweisheet.inseit(inseitŵ):
stiing inseitŶ = Őinseit into answeisheetub values(ŏŐ + vqtans.Text +Őŏ,ŏŐ + iolno + Őŏ,ŏŐ + nam + Őŏ,ŏŐ + qno.Text + Őŏ,ŏŐ +
qs.Text + Őŏ,ŏŐ + optŵ.Text + Őŏ,ŏŐ + optŶ.Text + Őŏ,ŏŐ + optŷ.Text + Őŏ,ŏŐ + optŸ.Text + Őŏ,ŏŐ + optŹ.Text + Őŏ,ŏŐ + ansstmt + Őŏ,ŏŐ + ans + Őŏ,ŏŐ +
isltstmt + Őŏ,ŏŐ + is + Őŏ,ŏŐ + cictans + Őŏ)Ő:

inseitansweisheet.inseit(inseitŶ):
inseitansweisheet.conn.Close():
if (listBoxŵ.SelecteuInuex == listBoxŵ.Items.Count - ŵ)
{
if (NessageBox.Show(ŐThank YouŐ + ŐōiōnŐ + ŐPiess 0k To PioceeuŐ, ŐCompletionŐ, NessageBoxButtons.0K) ==
BialogResult.0K)
{

stiing iolino = textBoxŵ.Text:
stiing namm = textBoxŶ.Text:
stiing cict = gm.Text:
stiing atmpt = mm.Text:
stiing islt = i.Text:
stiing inseitms = Őinseit into maiksheet values(ŏŐ + iolino + Őŏ,ŏŐ + namm + Őŏ,ŏŐ + atmpt + Őŏ,ŏŐ + cict + Őŏ,ŏŐ + islt + Őŏ)Ő:
quizsystem inseitmaiksheet = new quizsystem():
inseitmaiksheet.inseit(inseitms):
stiing inseitmsŵ = Őinseit into maiksheetub values(ŏŐ+ vqtm.Text +Őŏ,ŏŐ + iolino + Őŏ,ŏŐ + namm + Őŏ,ŏŐ + atmpt + Őŏ,ŏŐ +
cict + Őŏ,ŏŐ + islt + Őŏ)Ő:
inseitmaiksheet.inseit(inseitmsŵ):
this.Close():
}
}
iauioButtonŵ.Checkeu = false:
iauioButtonŶ.Checkeu = false:
iauioButtonŷ.Checkeu = false:
iauioButtonŸ.Checkeu = false:
iauioButtonŹ.Checkeu = false:
textBox9.Cleai():
}
else
{
NessageBox.Show(ŐNust Select The 0ption foi AnsweiŐ, ŐBenieuŐ):
}
}
}
catch (Exception ex)
{
if (NessageBox.Show(Ő0uiz has been solveu by you befoieŐ + ŐōiōnŐ + Őso please i auviseu you to leave nowŐ, ŐAccess BenieuŐ,
NessageBoxButtons.0K) == BialogResult.0K)
{
this.Close():
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŷŹ

}
}
textBoxŸ.Cleai():
}

//1O SOIVF 1HF OUIZ -----NFX1 BU11ON COÐF---FOR NFX1 OUFS1ION//

piivate voiu buttonŵŎClick(object senuei, EventAigs e)
{
tiy
{
if (textBoxŵ.Text == ŐŐ || textBoxŶ.Text == ŐŐ)
{
NessageBox.Show(ŐNust entei the Roll No anu NameŐ):

}
else
{
if (iauioButtonŵ.Checkeu || iauioButtonŶ.Checkeu || iauioButtonŷ.Checkeu || iauioButtonŸ.Checkeu ||
iauioButtonŹ.Checkeu)
{
obj|ŵ].count():
mm.Text = Conveit.ToStiing(obj|ŵ].m):
if (textBox9.Text == cans.Text)
{
obj|Ŵ].count():
gm.Text = Conveit.ToStiing(obj|Ŵ].om):
textBoxŷ.Text = ŐCoiiect AnsweiŐ:
}
else if (textBox9.Text != cans.Text)
{
textBoxŷ.Text = ŐWiong AnsweiŐ:
textBoxŸ.Text = cans.Text:
}

uecimal iesult = (obj|Ŵ].om ¡ obj|ŵ].m) * ŵŴŴ:
i.Text = Conveit.ToStiing(iesult):
stiing iolno = textBoxŵ.Text:
stiing nam = textBoxŶ.Text:
stiing ans = textBox9.Text:
stiing is = textBoxŷ.Text: :
stiing cictans = textBoxŸ.Text:
if (cictans != ŐŐ)
{ cictans = ŐCoiiect Answei: Ő + textBoxŸ.Text: }
else
{ cictans = ŐŐ: }
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŷź

stiing ansstmt = textBoxŹ.Text:
stiing isltstmt = textBoxŻ.Text:

stiing inseitŵ = Őinseit into answeisheet values(ŏŐ + iolno + Őŏ,ŏŐ + nam + Őŏ,ŏŐ + qno.Text + Őŏ,ŏŐ + qs.Text + Őŏ,ŏŐ + optŵ.Text +
Őŏ,ŏŐ + optŶ.Text + Őŏ,ŏŐ + optŷ.Text + Őŏ,ŏŐ + optŸ.Text + Őŏ,ŏŐ + optŹ.Text + Őŏ,ŏŐ + ansstmt + Őŏ,ŏŐ + ans + Őŏ,ŏŐ + isltstmt + Őŏ,ŏŐ + is + Őŏ,ŏŐ +
cictans + Őŏ)Ő:
quizsystem inseitansweisheet = new quizsystem():
inseitansweisheet.inseit(inseitŵ):
stiing inseitŶ = Őinseit into answeisheetub values(ŏŐ + vqtans.Text + Őŏ,ŏŐ + iolno + Őŏ,ŏŐ + nam + Őŏ,ŏŐ + qno.Text + Őŏ,ŏŐ +
qs.Text + Őŏ,ŏŐ + optŵ.Text + Őŏ,ŏŐ + optŶ.Text + Őŏ,ŏŐ + optŷ.Text + Őŏ,ŏŐ + optŸ.Text + Őŏ,ŏŐ + optŹ.Text + Őŏ,ŏŐ + ansstmt + Őŏ,ŏŐ + ans + Őŏ,ŏŐ +
isltstmt + Őŏ,ŏŐ + is + Őŏ,ŏŐ + cictans + Őŏ)Ő:

inseitansweisheet.inseit(inseitŶ):
inseitansweisheet.conn.Close():
iauioButtonŵ.Enableu = tiue:
iauioButtonŶ.Enableu = tiue:
iauioButtonŷ.Enableu = tiue:
iauioButtonŸ.Enableu = tiue:
iauioButtonŹ.Enableu = tiue:
iauioButtonŵ.Checkeu = false:
iauioButtonŶ.Checkeu = false:
iauioButtonŷ.Checkeu = false:
iauioButtonŸ.Checkeu = false:
iauioButtonŹ.Checkeu = false:
textBox9.Cleai():
listBoxŵ.SelecteuInuex = listBoxŵ.SelecteuInuex += ŵ:
}
else
{
NessageBox.Show(ŐNust Select The 0ption foi AnsweiŐ, ŐBenieuŐ):
}
}
}
catch (Exception ex)
{
if (NessageBox.Show(Ő0uiz has been solveu by you befoieŐ + ŐōiōnŐ + Őso please I auviseu you to leave nowŐ, ŐAccess BenieuŐ,
NessageBoxButtons.0K) == BialogResult.0K)
{
this.Close():
}
}
textBoxŸ.Cleai():
}

}
}
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŷŻ

PASSD ECVEY FM {FM Ź)
These two foims aie maue foi passwoiu iecoveiy. Stuuents entei his ¡ hei usei name, if the usei name is coiiect the
next foim appeais otheiwise the eiioi will shown. In next foim stuuent have to answei a secuiity question. If the
answei is iight the coiiect passwoiu will be shown otheiwise the eiioi message will shown.



















00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŷ8

CDINC F FM:
//PASSWORÐ RFCOVFRY FORM COÐF//

//FOR USFRNAMF VFRIFICA1ION FOR NFX1 SFOURI1Y OUFS1ION 0ROUPBOX//

piivate voiu buttonŵŎClick(object senuei, EventAigs e)
{
stiing uname = textBoxŵ.Text:
int x = Ź:
stiing nameselect = Őselect * fiom login wheie name = ŏŐ + uname + ŐŏŐ:
quizsystem selectobj = new quizsystem():
selectobj.selection(nameselect, ŐloginŐ):
x=selectobj.passiecoveiyeiioichekŵ(uname):
if (x == ŵ)
{
pictuieBoxŵ.visible = tiue:
p.value = Ŵ:
timeiŵ.Stait():
}
else if (x == Ŵ)
{
if (NessageBox.Show(ŐNake Suie The 0seiname you enteieu is Coiiect.Ő + ŐōiōnŐ + ŐBo you wish to tiy again Ő, ŐIncoiiect
0seinameŐ, NessageBoxButtons.YesNo) == BialogResult.Yes)
{
this.Activate():
textBoxŵ.Cleai():
textBoxŵ.Focus():
}
else
{
this.Close():
}
}
}

//BACK BU11ON//

piivate voiu buttonŷŎClick(object senuei, EventAigs e)
{
this.Close():
}




00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŷ9

//PRO0RFSSBAR WORKIN0 ON USFRNAMF 1HFN SHOW SFOURI1Y ARFA//

piivate voiu timeiŵŎTick(object senuei, EventAigs e)
{
if (p.value == p.Naximum)
{
pictuieBoxŵ.Biue():
gioupBoxŵ.visible = tiue:
}
else
{
p.value += Ź:
}
}

//AF1FR USFRNAMF VFRIFIFÐ SOURI1Y OUFS1ION VFRIFY PRO0RFSSBARR RUN ON 1HIS WORKIN0//

piivate voiu timeiŶŎTick(object senuei, EventAigs e)
{
if (pŵ.value == pŵ.Naximum)
{
pictuieBoxŶ.Biue():
labelŸ.visible = tiue:
labelŹ.visible = tiue:
}
else
{
pŵ.value += Ź:
}
}

//AF1FR USFRNAMF FN1FR SFCURI1Y ARFA WIII SHOW ANÐ WHFN I1 MA1CH 1HFN SHOW PASSWORÐ//

piivate voiu buttonŶŎClick(object senuei, EventAigs e)
{
stiing ans = textBoxŶ.Text:
stiing name = textBoxŵ.Text:
int x = Ź:
stiing sqselect = Őselect * fiom login wheie name= ŏŐ + name + Őŏ anu sq = ŏŐ + comboBoxŵ.SelecteuItem + Őŏ anu ans = ŏŐ + ans + Őŏ
Ő:
quizsystem selectobj = new quizsystem():
selectobj.selection(sqselect, ŐloginŐ):
x = selectobj.passiecoveiyeiioichekŶ(comboBoxŵ.SelecteuText, ans):
if (x == ŵ)


00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŸŴ

{
labelŹ.Text = selectobj.pass:
pŵ.value = Ŵ:
timeiŶ.Stait():
pictuieBoxŶ.visible = tiue:
}
else if (x == Ŵ)
{
if (NessageBox.Show(ŐNake Suie The 0seiname you enteieu is Coiiect.Ő + ŐōiōnŐ + ŐBo you wish to tiy again Ő,
ŐIncoiiect 0seinameŐ, NessageBoxButtons.YesNo) == BialogResult.Yes)
{
this.Activate():
comboBoxŵ.SelecteuItem = -ŵ:
textBoxŶ.Cleai():
}

}
}















00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page Ÿŵ

LCUT FM {FM ŵź)
Stuuents can also logout fiom the system aftei giving quiz by clicking on logout fiom the main menu anu then the
following foim appeais to confiim logout.




















00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŸŶ

CDINC F FM:
//CONFIRM IO0OU1 FOR AÐMIN MAIN WINÐOWS//


//SHU1ÐOWN BU1ON-----APPFAR SHU11IN0 ÐOWN WINÐOWS FORM ON 1HIS WORKIN0//

piivate voiu buttonŵŎClick(object senuei, EventAigs e)
{
Foimź obj = new Foimź():
obj.Show():
this.Close():
}

]]CANCEL BUTTN-----------APPEA BACK STUDENT MAIN INDS]]

piivate voiu buttonŶŎClick(object senuei, EventAigs e)
{
FoimŶ obj = new FoimŶ():
obj.Show():
this.Biue():
}
]]CANCEL BUTTN CDE------F APPEA STUDENT MAIN INDS FM BACK ]]

piivate voiu buttonŶŎClick(object senuei, EventAigs e)
{
Foimŵŷ obj = new Foimŵŷ():
obj.Show():
this.Biue():
}

]]LCUT CDE---------SHUTTINC DN INDS LADINC SCEEN APPEA N IT]]

piivate voiu buttonŵŎClick(object senuei, EventAigs e)
{
Foimź obj = new Foimź():
obj.Show():
this.Close():

}


00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page Ÿŷ

SHUT DN LADINC SCEEN FM {FM ź)
Aftei clicking on confiim logout sign the next winuow appeais foi shutuown. Which means now the usei is no moie sign
in.




















00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŸŸ

CDINC F FM:

//OPACI1Y FUNC1ION USF ON 1HIS-------AF1FR OPACI1Y=Ÿ MAIN IO0IN FORM WIII APPFAR A0AIN//

piivate voiu timeiŵŎTick(object senuei, EventAigs e)
{
if (p.value >= p.Naximum - ŵ)
{
NBIPaientŵ obj = new NBIPaientŵ():
this.0pacity -= Ŵ.Ÿ:
if (this.0pacity <= Ŵ)
{
this.Close():
obj.Show():
}
}
else
{
p.value += Ŷ:
}
}

]]TIME STAT HEE F EFFECTS]]

piivate voiu FoimźŎLoau(object senuei, EventAigs e)
{
p.value = Ŵ:
timeiŵ.Stait():
}
}
}
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŸŹ

STATINC ADMIN INDS LADINC FM {FM ŵ)
Now anothei phase of piogiam uesigneu foi Teacheis, fiom the same login winuow teacheis can also login by selecting auministiatoi
moue fiom the occupation option. 0nce giving aumin login, the scieen appeais foi aumin membeis to go thiough into quiz piocess.



































00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page Ÿź

CDINC F FM:

// FORM Ź-----IO0ON S1RIN0 WINÐOWS IOAÐIN0 SCRFFN COÐF//

piivate voiu FoimŵŎLoau(object senuei, EventAigs e)
{
p.value = Ŵ:
timeiŵ.Stait():
}

piivate voiu timeiŵŎTick(object senuei, EventAigs e)
{
FoimŶ obj = new FoimŶ():
if (p.value >= p.Naximum - ŵ)
{
this.0pacity -= Ŵ.Ÿ:
if (this.0pacity <= Ŵ)
{
this.Close():
obj.Show():
}
}
else
{
p.value += Ŷ:
}
}
}
}


00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŸŻ

CHANCE ADMIN INF FM {FM ŵ8)
This scieen is useu foi cieating Auministiation login by fulfilling the ielevant infoimation like usei name, passwoiu,
secuiity question anu its answei. Theie is also an option foi iecoveiing olu passwoiu foi Auministiation anu changing
the pass key.

00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page Ÿ8

CDINC F FM:
//AÐMIN USFRNAMF ANÐ PASSWORÐ CHAN0F FORM COÐF//


]]F PASSD MATCH N TEXTBX CDEE]]

piivate voiu textBoxŸŎTextChangeu(object senuei, EventAigs e)
{
if (textBoxŸ.Text == textBoxŷ.Text)
{
labelŹ.visible = tiue:
labelź.visible = false:
pictuieBoxŵ.visible = tiue:
}
}

]]BACK BUTTN]]

piivate voiu buttonŷŎClick(object senuei, EventAigs e)
{
this.Close():
}

]]CEATE BUTTN CDE]]

piivate voiu buttonŵŎClick(object senuei, EventAigs e)
{
if (textBoxŶ.Text == ŐŐ || textBoxŸ.Text == ŐŐ || textBoxŷ.Text == ŐŐ || textBoxŹ.Text == ŐŐ||comboBoxŵ.Items.Count==Ŵ)
{
NessageBox.Show(ŐNust Entei all the infoŐ):
textBoxŶ.Cleai():
textBoxŷ.Cleai():
textBoxŸ.Cleai():
comboBoxŵ.SelecteuInuex = -ŵ:
textBoxŹ.Cleai():
labelŹ.visible = false:
pictuieBoxŵ.visible = false:
}
else






00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page Ÿ9

{
if (textBoxŸ.Text != textBoxŷ.Text)
{
labelź.visible = tiue:
labelŹ.visible = false:
pictuieBoxŵ.visible = false:
}
else
{
stiing useiname = textBoxŶ.Text:
stiing occu = textBoxŵ.Text:
stiing newpass = textBoxŸ.Text:
stiing ans = textBoxŹ.Text:
stiing olupass = textBoxź.Text:
int x = Ź:
stiing select = Őselect * fiom loginŐ:
quizsystem obj = new quizsystem():
obj.selection(select, ŐloginŐ):
x = obj.auminpasschangeeiioi(olupass):
if (x == ŵ)
{
stiing upuate = Őupuate login set name=ŏŐ + useiname + Őŏ, pass=ŏŐ + newpass + Őŏ, ans=ŏŐ + ans + Őŏ,sq=ŏŐ +
comboBoxŵ.SelecteuItem + Őŏ,occu=ŏŐ + occu + Őŏ wheie pass=ŏŐ + olupass + ŐŏŐ:
obj.upuate(upuate):
NessageBox.Show(ŐYoui 0seiname anu Passwoiu Bas Been Changeu SuccessfullyŐ):
obj.conn.Close():
}
else if (x == Ŵ)
{
NessageBox.Show(Ő0lu Passwoiu is IncoiiectŐ, ŐuenieuŐ):
}
}







00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŹŴ

CEATE QUIZ FM {CUPBX ŷ)
Below foim is facilitating teacheis foi mouifying quizzes, cieating quiz anu auuing questions in quiz. This mouule has
also a function of euit, view anu upuate quiz.




















00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page Źŵ

CDINC F FM:
//OUIZ 1I1IF MOÐIFIFÐ FORM//


]]N FM LAD VIE F PEVIUS QUIZ TITLE INF F EDIT]]

piivate voiu FoimŵŹŎLoau(object senuei, EventAigs e)
{
stiing titleview = Őselect * fiom cieatequizŐ:
quizsystem cieateobj = new quizsystem():
cieateobj.selection(titleview, ŐcieatequizŐ):
foieach (BataRow iow in cieateobj.uataset.Tables|ŐcieatequizŐ].Rows)
{
textBoxŵ.Text = Conveit.ToStiing(iow|ŐqtŐ]):
tŵ.Text = Conveit.ToStiing(iow|ŐqtŐ]):
tŶ.Text = Conveit.ToStiing(iow|ŐcnŐ]):
tŷ.Text = Conveit.ToStiing(iow|ŐctŐ]):
tŸ.Text = Conveit.ToStiing(iow|ŐciŐ]):
tŹ.Text = Conveit.ToStiing(iow|ŐmmŐ]):
tź.Text = Conveit.ToStiing(iow|ŐtaŐ]):
tŻ.Text = Conveit.ToStiing(iow|ŐquŐ]):
t8.Text = Conveit.ToStiing(iow|ŐetŐ]):
}
cieateobj.conn.Close():
}

]]EDIT BTTUN CDE----F EDIT QUIZ TITLE]]

piivate voiu buttonŻŎClick(object senuei, EventAigs e)
{
stiing tbŵ = tŵ.Text:
stiing tbŶ = tŶ.Text:
stiing tbŷ = tŷ.Text:
stiing tbŸ = tŸ.Text:
stiing tbŹ = tŹ.Text:
stiing tbź = tź.Text:
stiing tbŻ = tŻ.Text:
stiing tb8 = t8.Text:
stiing getbox = textBoxŵ.Text:
stiing euit = Őupuate cieatequiz set qt=ŏŐ + tbŵ + Őŏ , cn=ŏŐ + tbŶ + Őŏ,ct=ŏŐ + tbŷ + Őŏ,ci=ŏŐ + tbŸ + Őŏ , mm=ŏŐ + tbŹ + Őŏ,ta=ŏŐ + tbź +
Őŏ,qu=ŏŐ + tbŻ + Őŏ,et=ŏŐ + tb8 + Őŏ wheie qt=ŏŐ + getbox + ŐŏŐ:



00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŹŶ

quizsystem cieateobj = new quizsystem():
cieateobj.upuate(euit):
NessageBox.Show(Ő0uiz Title has been Auueu SuccessfullyŐ, ŐSuccessŐ):
cieateobj.conn.Close():
}

piivate voiu buttonŷŎClick(object senuei, EventAigs e)
{
this.Close():
}

]]DATE TIME PIKE CDE N DATE TIME PIKE]]

piivate voiu uateTimePickeiŵŎvalueChangeu(object senuei, EventAigs e)
{
tŻ.Text = Conveit.ToStiing(uateTimePickeiŵ.value):
}

piivate voiu labelŵŹŎClick(object senuei, EventAigs e)
{

}
}
}











00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page Źŷ

ADD QUESTIN FM {CUPBX ŵ)
This is a foim foi auuing questions one by one in quiz by iespective teachei.





















00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŹŸ

CDINC F FM:

//CRFA1F OUIZ FORM//

]]BACK BUTTN CDE]]

piivate voiu buttonŷŎClick(object senuei, EventAigs e)
{
this.Close():
}

]]F CECT PTIN F ANSE ADIBUTTNS CDE N CEATE QUIZ CUPBX]]

piivate voiu iauioButtonŵŎCheckeuChangeu(object senuei, EventAigs e)
{
tbŵŷ.Text = ŐAŐ:
}

piivate voiu iauioButtonŶŎCheckeuChangeu(object senuei, EventAigs e)
{
tbŵŷ.Text = ŐBŐ:
}

piivate voiu iauioButtonŷŎCheckeuChangeu(object senuei, EventAigs e)
{
tbŵŷ.Text = ŐCŐ:
}

piivate voiu iauioButtonŸŎCheckeuChangeu(object senuei, EventAigs e)
{
tbŵŷ.Text = ŐBŐ:
}

piivate voiu iauioButtonŹŎCheckeuChangeu(object senuei, EventAigs e)
{
tbŵŷ.Text = ŐEŐ:
}

]]DATE TIME PIKE CDE]]

piivate voiu uateTimePickeiŵŎvalueChangeu(object senuei, EventAigs e)
{
tŻ.Text = Conveit.ToStiing(uateTimePickeiŵ.value):
}

00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŹŹ

]]F CEATE QUIZ TITLE -------NEXT BUTTN CDE]]

piivate voiu buttonŻŎClick(object senuei, EventAigs e)
{

if (tŵ.Text != Ő Ő && tŶ.Text != ŐŐ && tŷ.Text != ŐŐ && tŸ.Text != ŐŐ && tŹ.Text != ŐŐ&& tź.Text != ŐŐ && tŻ.Text != ŐŐ)
{
stiing tbŵ = tŵ.Text:
stiing tbŶ = tŶ.Text:
stiing tbŷ = tŷ.Text:
stiing tbŸ = tŸ.Text:
stiing tbŹ = tŹ.Text:
stiing tbź = tź.Text:
stiing tbŻ = tŻ.Text:
stiing tb8 = t8.Text:
stiing getbox = textBoxŵ.Text:
stiing inseitqt = Őinseit into maiksheetub values(ŏŐ + tbŵ + Őŏ,ŏŐ + Ő Ő + Őŏ,ŏŐ + Ő Ő + Őŏ,ŏŐ + Ő Ő + Őŏ,ŏŐ + Ő Ő + Őŏ,ŏŐ + Ő Ő + Őŏ)Ő:
stiing inseitqtŵ = Őinseit into answeisheetub values(ŏŐ + tbŵ + Őŏ,ŏŐ + Ő Ő + Őŏ,ŏŐ + Ő Ő + Őŏ,ŏŐ + Ő Ő + Őŏ,ŏŐ + Ő Ő + Őŏ,ŏŐ + Ő Ő + Őŏ,ŏŐ + Ő Ő +
Őŏ,ŏŐ + Ő Ő + Őŏ,ŏŐ + Ő Ő + Őŏ,ŏŐ + Ő Ő + Őŏ,ŏŐ + Ő Ő + Őŏ,ŏŐ + Ő Ő + Őŏ,ŏŐ + Ő Ő + Őŏ,ŏŐ + Ő Ő + Őŏ,ŏŐ + Ő Ő + Őŏ)Ő:
quizsystem inseitqtobj = new quizsystem():
inseitqtobj.inseit(inseitqt):
inseitqtobj.inseit(inseitqtŵ):
stiing euit = Őupuate cieatequiz set qt=ŏŐ + tbŵ + Őŏ , cn=ŏŐ + tbŶ + Őŏ,ct=ŏŐ + tbŷ + Őŏ,ci=ŏŐ + tbŸ + Őŏ , mm=ŏŐ + tbŹ + Őŏ,ta=ŏŐ + tbź +
Őŏ,qu=ŏŐ + tbŻ + Őŏ,et=ŏŐ + tb8 + Őŏ wheie qt=ŏŐ + getbox + ŐŏŐ:
quizsystem cieateobj = new quizsystem():
cieateobj.upuate(euit):
NessageBox.Show(Ő0uiz Title has been Auueu SuccessfullyŐ, ŐSuccessŐ):
cieateobj.conn.Close():
if (textBoxŶ.Text == ŐŐ)
{
gioupBoxŷ.visible = false:
gioupBoxŵ.visible = tiue:
}
else if (textBoxŶ.Text != ŐŐ)
{
stiing auuquestview = Őselect * fiom auuquestŐ:
quizsystem auuquestobj = new quizsystem():
auuquestobj.selection(auuquestview, ŐauuquestŐ):
foieach (BataRow iow in auuquestobj.uataset.Tables|ŐauuquestŐ].Rows)
{
listBoxŵ.Items.Auu(Conveit.ToStiing(iow|ŐqnoŐ])):
}
auuquestobj.conn.Close():
listBoxŵ.SelecteuInuex = Ŵ:
gioupBoxŶ.visible = tiue:
gioupBoxŷ.visible = false:
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page Źź

}
}
else
{
NessageBox.Show(ŐNake suie that all the iequiieu lines aie fullfilleuŐ, ŐAccess BenieuŐ):

tŵ.Focus():

}
}

]]F ADD QUESTINS----------NEXT BUTTN CDE]]

piivate voiu buttonŵŎClick(object senuei, EventAigs e)
{
tiy
{
if (tbŵ.Text != ŐŐ && tbŶ.Text != ŐŐ && tbŷ.Text != ŐŐ && tbŹ.Text != ŐŐ && tbŻ.Text != ŐŐ && tb9.Text != ŐŐ && tbŵŵ.Text !=
ŐŐ)
{
if (iauioButtonŵ.Checkeu || iauioButtonŶ.Checkeu || iauioButtonŷ.Checkeu || iauioButtonŸ.Checkeu || iauioButtonŹ.Checkeu)
{

stiing tboxŵ = tbŵ.Text:
stiing tboxŶ = tbŶ.Text:
stiing tboxŷ = tbŷ.Text:
stiing tboxŹ = tbŹ.Text:
stiing tboxŻ = tbŻ.Text:
stiing tbox9 = tb9.Text:
stiing tboxŵŵ = tbŵŵ.Text:
stiing tboxŵŷ = tbŵŷ.Text:
stiing question = Őinseit into auuquest values(ŏŐ + tboxŵ + Őŏ , ŏŐ + tboxŶ + Őŏ,ŏŐ + tboxŷ + Őŏ,ŏŐ + tboxŹ + Őŏ,ŏŐ + tboxŻ + Őŏ,ŏŐ +
tbox9 + Őŏ,ŏŐ + tboxŵŵ + Őŏ,ŏŐ + tboxŵŷ + Őŏ)Ő:
quizsystem auuquest = new quizsystem():
auuquest.inseit(question):
NessageBox.Show(Ő0uestion has been Auueu SuccessfullyŐ, ŐSuccessŐ):
auuquest.conn.Close():
iauioButtonŵ.Checkeu = false:
iauioButtonŶ.Checkeu = false:
iauioButtonŷ.Checkeu = false:
iauioButtonŸ.Checkeu = false:
iauioButtonŹ.Checkeu = false:
tbŵ.Focus():
tbŶ.Cleai():
tbŷ.Cleai():
tbŹ.Cleai():
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŹŻ

tbŻ.Cleai():
tb9.Cleai():
tbŵŵ.Cleai():
tbŵŷ.Cleai():
}
else
{
NessageBox.Show(ŐNust Select the Coiiect Answei 0ptionŐ, ŐBenieuŐ):
}
}
else
{
NessageBox.Show(ŐNake Suie that all the iequiieu lines aie fullfilleuŐ, ŐAccess BenieuŐ):

tbŵ.Focus():
}

}
catch (Exception)
{
NessageBox.Show(ŐThe 0uestion you enteieu is Alieauy ExistŐ, ŐBenieuŐ):
tbŵ.Cleai():
tbŵ.Focus():


}
}

]]CEATE QUIZ------- VIE BUTTN CDE----ADD QUESTN CUPBX]]

piivate voiu buttonŹŎClick(object senuei, EventAigs e)
{
stiing tboxŵ = tbŵ.Text:
stiing tboxŶ = tbŶ.Text:
stiing tboxŷ = tbŷ.Text:

stiing tboxŹ = tbŹ.Text:

stiing tboxŻ = tbŻ.Text:

stiing tbox9 = tb9.Text:

stiing tboxŵŵ = tbŵŵ.Text:

stiing tboxŵŷ = tbŵŷ.Text:
int x = Ź:
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page Ź8

stiing viewquest = Őselect * fiom auuquest wheie qno=ŏŐ + tboxŵ + ŐŏŐ:
quizsystem obj = new quizsystem():
obj.selection(viewquest, ŐauuquestŐ):
x= obj.viewquestioneioichek(tboxŵ):
if (x == ŵ)
{
tbŶ.Text = obj.questions|Ŵ]:
tbŷ.Text = obj.questions|ŵ]:
tbŹ.Text = obj.questions|Ŷ]:
tbŻ.Text = obj.questions|ŷ]:
tb9.Text = obj.questions|Ÿ]:
tbŵŵ.Text = obj.questions|Ź]:
tbŵŷ.Text = obj.questions|ź]:
}
if (x == Ŵ)
{
NessageBox.Show(ŐThe 0uestion Numbei you enteieu uosent ExistŐ, ŐBenieuŐ):
tbŵ.Focus():
}
}

]]VIE CDE ACAIN AND EDIT QUESTIN ENTEY N ADD QUESTIN CUPBX AND IF THEE IS N ENTY IN THE
BACK END IT IS ALS A EXCEPTIN HANDLEINC CDEE F NULL VIE CDE]]

piivate voiu buttonŸŎClick(object senuei, EventAigs e)
{
stiing questno= tbŵ.Text:
int x = Ź:
stiing euit = Őselect * fiom auuquest wheie qno=ŏŐ + questno + ŐŏŐ:
quizsystem cieateobj = new quizsystem():
cieateobj.selection(euit, ŐauuquestŐ):
x = cieateobj.euitquestioneiioichek(questno):
if (x == ŵ)
{
stiing tboxŵ = tbŵ.Text:
stiing tboxŶ = tbŶ.Text:
stiing tboxŷ = tbŷ.Text:
stiing tboxŹ = tbŹ.Text:
stiing tboxŻ = tbŻ.Text:
stiing tbox9 = tb9.Text:
stiing tboxŵŵ = tbŵŵ.Text:
stiing tboxŵŷ = tbŵŷ.Text:
stiing euitauuquest = Őupuate auuquest set qstmt=ŏŐ + tboxŶ + Őŏ , ansŵ=ŏŐ + tboxŷ + Őŏ,ansŶ=ŏŐ + tboxŹ + Őŏ ,ansŷ=ŏŐ + tboxŻ +
Őŏ,ansŸ=ŏŐ + tbox9 + Őŏ,ansŹ=ŏŐ + tboxŵŵ + Őŏ,cictans=ŏŐ + tboxŵŷ + Őŏ wheie qno=ŏŐ + tboxŵ + ŐŏŐ:
cieateobj.upuate(euitauuquest):
NessageBox.Show(Ő0uestion is Nouifieu SuccessfullyŐ, ŐSuccessŐ):
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page Ź9

cieateobj.conn.Close():
}
else if (x == Ŵ)
{
NessageBox.Show(ŐThe question which u tiying to euiu is not in the entiyŐ, ŐuenieuŐ):
}

}

]]F DELETE CUPBX IF THEE IS N QUESTINS IN THE BACK END F LAST QUESTIN DELETE IF THEE IS NLY
ŵ QUESTIN IN BACK END CDE]]

piivate voiu FoimŵŸŎLoau(object senuei, EventAigs e)
{
stiing ueletemaiksheets = Őuelete * fiom maiksheetŐ:
quizsystem maikshetobj = new quizsystem():
maikshetobj.uelete(ueletemaiksheets):
stiing ueleteanssheet = Őuelete * fiom answeisheetŐ:
quizsystem anssheetobj = new quizsystem():
anssheetobj.uelete(ueleteanssheet):

stiing view = Őselect * fiom auuquestŐ:
quizsystem obj = new quizsystem():
obj.selection(view, ŐauuquestŐ):
foieach(BataRow iow in obj.uataset.Tables|ŐauuquestŐ].Rows)
{
textBoxŶ.Text = Conveit.ToStiing(iow|ŐqnoŐ]):
}
obj.conn.Close():
stiing titleview = Őselect * fiom cieatequizŐ:
quizsystem cieateobj = new quizsystem():
cieateobj.selection(titleview, ŐcieatequizŐ):
foieach (BataRow iow in cieateobj.uataset.Tables|ŐcieatequizŐ].Rows)
{
textBoxŵ.Text = Conveit.ToStiing(iow|ŐqtŐ]):
}
cieateobj.conn.Close():
}

]]F DELETE ALL THE QUESTIN N NEXT BUTTN CDE]]

piivate voiu buttonŵŴŎClick(object senuei, EventAigs e)
{
stiing ueletequestions=Őuelete fiom auuquest wheie qno=ŏŐ+listBoxŵ.SelecteuItem+ŐŏŐ:
quizsystem obj = new quizsystem():
obj.uelete(ueletequestions):
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page źŴ

listBoxŵ.SelecteuInuex = listBoxŵ.SelecteuInuex += ŵ:
if (listBoxŵ.SelecteuInuex == listBoxŵ.Items.Count-ŵ)
{
buttonŵŴ.visible = false:
button8.visible = tiue:
}
}

//ÐFIF1F 0ROUPBOX------FOR IAS1 OUFS1ION ÐFIF1F ON ANO1HFR NFX1 BU11ON COÐF//

piivate voiu button8ŎClick(object senuei, EventAigs e)
{
stiing ueletequestions = Őuelete fiom auuquest wheie qno =ŏŐ + listBoxŵ.SelecteuItem + ŐŏŐ:
quizsystem obj = new quizsystem():
obj.uelete(ueletequestions):
if (NessageBox.Show(ŐAll the 0uestions has been ueleteu fiom uatabaseŐ + ŐōiōnŐ + Őpiess ok to pioceeu foi auu new entiies of
questionsŐ, ŐBelete CompleteŐ, NessageBoxButtons.0K) == BialogResult.0K)
{
gioupBoxŶ.visible = false:
gioupBoxŵ.visible = tiue:
}
}

¡¡CREATE 00ESTI0NS uR00PB0X-----F0R APPEAR CREATE 00IZ TITLE F0RN -----EBIT B0TT0N C0BE¡¡

piivate voiu buttonźŎClick(object senuei, EventAigs e)
{
FoimŵŹ obj = new FoimŵŹ():
obj.Show():
}

piivate voiu listBoxŵŎSelecteuInuexChangeu(object senuei, EventAigs e)
{
if (listBoxŵ.SelecteuInuex == listBoxŵ.Items.Count - ŵ)
{

buttonŵŴ.visible = false:
button8.visible = tiue:
}
}

piivate voiu buttonŵŵŎClick(object senuei, EventAigs e)
{
gioupBoxŶ.visible = false:
gioupBoxŵ.visible = tiue:
}
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page źŵ

piivate voiu buttonŵŶŎClick(object senuei, EventAigs e)
{
gioupBoxŷ.visible = false:
gioupBoxŶ.visible = tiue:
}
}
}

















00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page źŶ

DELETE QUESTIN {CUPBX Ŷ)
Following in the uelete foim appeaieu befoie teacheis cieate quiz winuow if theie is alieauy any quiz exists in the
mouule oi uatabase iecoiu.










00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page źŷ

CDINC F FM:
//FOR ÐFIF1F 0ROUPBOX IF 1HFRF IS NO OUFS1IONS IN 1HF BACK FNÐ FOR IAS1 OUFS1ION ÐFIF1F IF 1HFRF IS ONIY Ź
OUFS1ION IN BACK FNÐ COÐF//

piivate voiu FoimŵŸŎLoau(object senuei, EventAigs e)
{
stiing view = Őselect * fiom auuquestŐ:
quizsystem obj = new quizsystem():
obj.selection(view, ŐauuquestŐ):
foieach(BataRow iow in obj.uataset.Tables|ŐauuquestŐ].Rows)
{
textBoxŶ.Text = Conveit.ToStiing(iow|ŐqnoŐ]):
}
obj.conn.Close():
stiing titleview = Őselect * fiom cieatequizŐ:
quizsystem cieateobj = new quizsystem():
cieateobj.selection(titleview, ŐcieatequizŐ):
foieach (BataRow iow in cieateobj.uataset.Tables|ŐcieatequizŐ].Rows)
{
textBoxŵ.Text = Conveit.ToStiing(iow|ŐqtŐ]):
}
cieateobj.conn.Close():
}
//FOR ÐFIF1F AII 1HF OUFS1ION ON NFX1 BU11ON COÐF//

piivate voiu buttonŵŴŎClick(object senuei, EventAigs e)
{
stiing ueletequestions=Őuelete fiom auuquest wheie qno=ŏŐ+listBoxŵ.SelecteuItem+ŐŏŐ:
quizsystem obj = new quizsystem():
obj.uelete(ueletequestions):
listBoxŵ.SelecteuInuex = listBoxŵ.SelecteuInuex += ŵ:
if (listBoxŵ.SelecteuInuex == listBoxŵ.Items.Count-ŵ)
{
buttonŵŴ.visible = false:
button8.visible = tiue:
}









00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page źŸ

//ÐFIF1F 0ROUPBOX------FOR IAS1 OUFS1ION ÐFIF1F ON ANO1HFR NFX1 BU11ON COÐF//

piivate voiu button8ŎClick(object senuei, EventAigs e)
{
stiing ueletequestions = Őuelete fiom auuquest wheie qno =ŏŐ + listBoxŵ.SelecteuItem + ŐŏŐ:
quizsystem obj = new quizsystem():
obj.uelete(ueletequestions):
if (NessageBox.Show(ŐAll the 0uestions has been ueleteu fiom uatabaseŐ + ŐōiōnŐ + Őpiess ok to pioceeu foi auu new entiies of
questionsŐ, ŐBelete CompleteŐ, NessageBoxButtons.0K) == BialogResult.0K)
{
gioupBoxŶ.visible = false:
gioupBoxŵ.visible = tiue:
}
}















00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page źŹ

CCLE SEACH {FM: Ŷŵ)
An option of uoogle seaich is auueu to help the teacheis. By clicking on seaich in main menu helps tab the inteinet
exploiei winuow appeais.















00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page źź

DELETE STUDENT LCIN FM:

]]DELETE DATA THUCH USENAME]]

piivate voiu buttonŵŎClick(object senuei, EventAigs e)
{
stiing uname = textBoxŶ.Text:
int x = Ź:

stiing select =Őselect * fiom loginŐ:
quizsystem ueleteloginobj = new quizsystem():
ueleteloginobj.selection(select, ŐloginŐ):
x = ueleteloginobj.ueletelogineiioichk(uname):
if (x == ŵ)
{
stiing uelete = Őuelete fiom login wheie name =ŏŐ + uname + ŐŏŐ:
ueleteloginobj.uelete(uelete):
NessageBox.Show(ŐRecoiu Bas Been Successfully BeleteuŐ, ŐSuccessŐ):
ueleteloginobj.conn.Close():
}
else if (x == Ŵ)
{
if (NessageBox.Show(ŐNake Suie 0seiname you enteieu is Coiiect.Ő + ŐōiōnŐ + ŐBo you wish to tiy again Ő, ŐIncoiiect CoueŐ,
NessageBoxButtons.YesNo) == BialogResult.Yes)
{
this.Activate():
textBoxŶ.Cleai():
textBoxŶ.Focus():
}
else
{
this.Close():
}
}
}

]]BACK BUTTN CDE]]

piivate voiu buttonŷŎClick(object senuei, EventAigs e)
{
this.Close():
}

00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page źŻ

EDIT QUESTINS FM {FM: ŵŴ)
This is a foim foi euiting questions foi piints uuiing the piinting iepoits to make the inteiface moie useis fiienuly.
















00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ź8

CDINC F FM:
//FÐI1 OUFS1ION SFSSION FORM//

//FÐI1 WUIZ 1I1IF FUN1ION-----FÐI1 BU11ON//

piivate voiu buttonźŎClick(object senuei, EventAigs e)
{
FoimŵŹ obj = new FoimŵŹ():
obj.Show():
}

//VIFW BU11ON--------FOR PRFVIOUS OUFS1ION VIFW//

piivate voiu buttonŹŎClick(object senuei, EventAigs e)
{
stiing tboxŵ = tbŵ.Text:
stiing tboxŶ = tbŶ.Text:
stiing tboxŷ = tbŷ.Text:

stiing tboxŹ = tbŹ.Text:

stiing tboxŻ = tbŻ.Text:

stiing tbox9 = tb9.Text:

stiing tboxŵŵ = tbŵŵ.Text:

stiing tboxŵŷ = tbŵŷ.Text:
int x = Ź:
stiing viewquest = Őselect * fiom auuquest wheie qno=ŏŐ + tboxŵ + ŐŏŐ:
quizsystem obj = new quizsystem():
obj.selection(viewquest, ŐauuquestŐ):
x = obj.viewquestioneioichek(tboxŵ):
if (x == ŵ)
{
tbŶ.Text = obj.questions|Ŵ]:
tbŷ.Text = obj.questions|ŵ]:
tbŹ.Text = obj.questions|Ŷ]:
tbŻ.Text = obj.questions|ŷ]:
tb9.Text = obj.questions|Ÿ]:
tbŵŵ.Text = obj.questions|Ź]:
tbŵŷ.Text = obj.questions|ź]:
}
if (x == Ŵ)
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ź9

{
NessageBox.Show(ŐThe 0uestion Numbei you enteieu uosent ExistŐ, ŐBenieuŐ):
tbŵ.Focus():
}
}

//FÐI1 OUFSI1ON FUNC1ION--------FÐI1 BU11ON//

piivate voiu buttonŸŎClick(object senuei, EventAigs e)
{

stiing questno = tbŵ.Text:
int x = Ź:
stiing euit = Őselect * fiom auuquest wheie qno=ŏŐ + questno + ŐŏŐ:
quizsystem cieateobj = new quizsystem():
cieateobj.selection(euit, ŐauuquestŐ):
x = cieateobj.euitquestioneiioichek(questno):
if (x == ŵ)
{
if (iauioButtonŵ.Checkeu || iauioButtonŶ.Checkeu || iauioButtonŷ.Checkeu || iauioButtonŸ.Checkeu || iauioButtonŹ.Checkeu)
{
stiing tboxŵ = tbŵ.Text:
stiing tboxŶ = tbŶ.Text:
stiing tboxŷ = tbŷ.Text:
stiing tboxŹ = tbŹ.Text:
stiing tboxŻ = tbŻ.Text:
stiing tbox9 = tb9.Text:
stiing tboxŵŵ = tbŵŵ.Text:
stiing tboxŵŷ = tbŵŷ.Text:
stiing euitauuquest = Őupuate auuquest set qstmt=ŏŐ + tboxŶ + Őŏ , ansŵ=ŏŐ + tboxŷ + Őŏ,ansŶ=ŏŐ + tboxŹ + Őŏ ,ansŷ=ŏŐ + tboxŻ +
Őŏ,ansŸ=ŏŐ + tbox9 + Őŏ,ansŹ=ŏŐ + tboxŵŵ + Őŏ,cictans=ŏŐ + tboxŵŷ + Őŏ wheie qno=ŏŐ + tboxŵ + ŐŏŐ:
cieateobj.upuate(euitauuquest):
NessageBox.Show(Ő0uestion is Nouifieu SuccessfullyŐ, ŐSuccessŐ):
iauioButtonŵ.Checkeu = false:
iauioButtonŶ.Checkeu = false:
iauioButtonŷ.Checkeu = false:
iauioButtonŸ.Checkeu = false:
iauioButtonŹ.Checkeu = false:
cieateobj.conn.Close():
}
else
{
NessageBox.Show(ŐNust Select the Coiiect Answei 0ptionŐ, ŐBenieuŐ):
}
}
else if (x == Ŵ)
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŻŴ

{
NessageBox.Show(ŐThe question which u tiying to euiu is not in the entiyŐ, ŐuenieuŐ):
}
}

//RAÐIOBU11ON CIICK FVFN1----------FOR CORRFC1 ANSWFR//

piivate voiu iauioButtonŵŎCheckeuChangeu(object senuei, EventAigs e)
{
tbŵŷ.Text = ŐAŐ:
}

piivate voiu iauioButtonŶŎCheckeuChangeu(object senuei, EventAigs e)
{
tbŵŷ.Text = ŐBŐ:
}

piivate voiu iauioButtonŷŎCheckeuChangeu(object senuei, EventAigs e)
{
tbŵŷ.Text = ŐCŐ:
}

piivate voiu iauioButtonŸŎCheckeuChangeu(object senuei, EventAigs e)
{
tbŵŷ.Text = ŐBŐ:
}

piivate voiu iauioButtonŹŎCheckeuChangeu(object senuei, EventAigs e)
{
tbŵŷ.Text = ŐEŐ:
}

piivate voiu buttonŷŎClick(object senuei, EventAigs e)
{
this.Close():
}

//NFX1 BU11ON---------1O AÐÐ NFW OUFS1ION//

piivate voiu buttonŵŎClick(object senuei, EventAigs e)
{
tiy
{
if (tbŵ.Text != ŐŐ && tbŶ.Text != ŐŐ && tbŷ.Text != ŐŐ && tbŹ.Text != ŐŐ && tbŻ.Text != ŐŐ && tb9.Text != ŐŐ && tbŵŵ.Text != ŐŐ)
{
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page Żŵ

if (iauioButtonŵ.Checkeu || iauioButtonŶ.Checkeu || iauioButtonŷ.Checkeu || iauioButtonŸ.Checkeu ||
iauioButtonŹ.Checkeu)
{

stiing tboxŵ = tbŵ.Text:
stiing tboxŶ = tbŶ.Text:
stiing tboxŷ = tbŷ.Text:
stiing tboxŹ = tbŹ.Text:
stiing tboxŻ = tbŻ.Text:
stiing tbox9 = tb9.Text:
stiing tboxŵŵ = tbŵŵ.Text:
stiing tboxŵŷ = tbŵŷ.Text:
stiing question = Őinseit into auuquest values(ŏŐ + tboxŵ + Őŏ , ŏŐ + tboxŶ + Őŏ,ŏŐ + tboxŷ + Őŏ,ŏŐ + tboxŹ + Őŏ,ŏŐ + tboxŻ + Őŏ,ŏŐ +
tbox9 + Őŏ,ŏŐ + tboxŵŵ + Őŏ,ŏŐ + tboxŵŷ + Őŏ)Ő:
quizsystem auuquest = new quizsystem():
auuquest.inseit(question):
NessageBox.Show(ŐNew 0uestion has been Auueu SuccessfullyŐ, ŐSuccessŐ):
auuquest.conn.Close():
iauioButtonŵ.Checkeu = false:
iauioButtonŶ.Checkeu = false:
iauioButtonŷ.Checkeu = false:
iauioButtonŸ.Checkeu = false:
iauioButtonŹ.Checkeu = false:
tbŵ.Focus():
tbŶ.Cleai():
tbŷ.Cleai():
tbŹ.Cleai():
tbŻ.Cleai():
tb9.Cleai():
tbŵŵ.Cleai():
tbŵŷ.Cleai():
}
else
{
NessageBox.Show(ŐNust Select the Coiiect Answei 0ptionŐ, ŐBenieuŐ):
}
}
else
{
NessageBox.Show(ŐNake Suie that all the iequiieu lines aie fullfilleuŐ, ŐAccess BenieuŐ):

tbŵ.Focus():
}

}
catch (Exception)
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŻŶ

{
NessageBox.Show(ŐThe 0uestion you enteieu is Alieauy ExistŐ, ŐBenieuŐ):
tbŵ.Cleai():
tbŵ.Focus():


}
}

}
}
















00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page Żŷ

EPTS
PAPE SH EPT {FM 8)
Following is the iepoit scieen maue foi teacheis, such as piint quiz anu papei show foi the puipose of piint iepoits.



















00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŻŸ

CDINC F FM:
//ANSWFR SHFF1 FORM COÐF-------PAPFR SHOW//

]]BACK BUTTN CDE]]

piivate voiu buttonŷŎClick(object senuei, EventAigs e)
{
this.Close():
}

]]PAPE SH THUCH STUENT LLN SEACH N THIS VIE BUTTN]]

piivate voiu buttonŵŎClick(object senuei, EventAigs e)
{
if (textBoxŵ.Text != ŐŐ)
{
BataSet us = new BataSetŶ():
0leBbConnection conn = new 0leBbConnection(ŐPioviuei=Niciosoft.Iet.0LEBB.Ÿ.Ŵ:Bata Souice=quizsystemŶŴŴŴ.mubŐ):
stiing sti = Őselect * fiom answeisheet wheie iolno =ŏŐ + textBoxŵ.Text + ŐŏŐ:
0leBbBataAuaptei ua = new 0leBbBataAuaptei(sti, conn):
ua.Fill(us, ŐansweisheetŐ):
BataTable ut = new BataTable():
answeisheet ciŵ = new answeisheet():
ciŵ.SetBataSouice(us.Tables|ŐansweisheetŐ]):
ciystalRepoitvieweiŵ.RepoitSouice = ciŵ:
}
else
{
NessageBox.Show(ŐNust entei the ioll noŐ, ŐBenieuŐ):
textBoxŵ.Cleai():
textBoxŵ.Focus():
}
}






00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŻŹ

ANSE SHEET EPT{FM ŷ)
This is an answei sheet foim maue foi teacheis to show in class to stuuents in soft foim as well as they can take piints
of answei sheets foi fuithei use.









FM CDINC:
//OFFIINF OUIZ PRIN1 RFPOR1 FORM//

//FOR FÐI1 OUIZ OUFS1IONS----------FÐI1 BU11ON//

piivate voiu buttonŵŎClick(object senuei, EventAigs e)
{
FoimŵŴ obj = new FoimŵŴ():
obj.Show():
}
]]BACK BUTN------CLSE THE IND]]

piivate voiu buttonŷŎClick(object senuei, EventAigs e)
{
this.Close():
}
00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page Żź

STUDENT ESULT DATA BASE FM {FM: ŶŶ)
This foim is ietiieving olu quizzes uata.
















00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page ŻŻ

CDINC F FM:
]] VIE BUTTN ---------- SEACHINC STUDENT QUIZ ESULT DATA ]]

piivate voiu buttonŵŎClick(object senuei, EventAigs e)
{
if (textBoxŵ.Text != ŐŐ)
{
BataSet us = new BataSetŷ():
0leBbConnection conn = new 0leBbConnection(ŐPioviuei=Niciosoft.Iet.0LEBB.Ÿ.Ŵ:Bata Souice=quizsystemŶŴŴŴ.mubŐ):
stiing sti = Őselect * fiom maiksheetub wheie qt =ŏŐ + textBoxŵ.Text + ŐŏŐ:
0leBbBataAuaptei ua = new 0leBbBataAuaptei(sti, conn):
ua.Fill(us, ŐmaiksheetubŐ):
BataTable ut = new BataTable():
stuuentiesultub ciŵ = new stuuentiesultub():
ciŵ.SetBataSouice(us.Tables|ŐmaiksheetubŐ]):
ciystalRepoitvieweiŵ.RepoitSouice = ciŵ:
}
else
{
NessageBox.Show(ŐNust entei the 0uiz TitleŐ, ŐBenieuŐ):
textBoxŵ.Cleai():
textBoxŵ.Focus():
}
}

]] BACK BUTTN---------- T CLSE THE IND ]]

piivate voiu buttonŷŎClick(object senuei, EventAigs e)
{
this.Close():
}


}
}



00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page Ż8

STUDENT SLVED SHEET FM {FM: Ŷŷ)
This foim is ietiieving pievious quizzes papei show iepoit.







00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page Ż9

CDINC F FM Ŷŷ:
]]S1UÐFN1 PAPFR SHOW ÐA1ABASF RFCORÐ FORM//
//VIFW BU11ON------------ 1O RF1RIFVF S1UÐFN1 PRFVIOUS PAPFR SHOW ÐA1ABASF//
piivate voiu buttonŵŎClick(object senuei, EventAigs e)
{
if (textBoxŵ.Text != ŐŐ || textBoxŶ.Text!=ŐŐ)
{
BataSet us = new BataSetŸ():
0leBbConnection conn = new 0leBbConnection(ŐPioviuei=Niciosoft.Iet.0LEBB.Ÿ.Ŵ:Bata Souice=quizsystemŶŴŴŴ.mubŐ):
stiing sti = Őselect * fiom answeisheetub wheie qt =ŏŐ + textBoxŵ.Text + Őŏ anu iolno=ŏŐ+textBoxŶ.Text+ŐŏŐ:
0leBbBataAuaptei ua = new 0leBbBataAuaptei(sti, conn):
ua.Fill(us, ŐansweisheetubŐ):
BataTable ut = new BataTable():
stuuentpsub ciŵ = new stuuentpsub():
ciŵ.SetBataSouice(us.Tables|ŐansweisheetubŐ]):
ciystalRepoitvieweiŵ.RepoitSouice = ciŵ:
}
else
{
NessageBox.Show(ŐNust entei the 0uiz Title anu Roll NoŐ, ŐBenieuŐ):
textBoxŵ.Cleai():
textBoxŵ.Focus():
}
}

]]BACK BU11ON-----------1O CIOSF 1HF WINÐOW//

piivate voiu buttonŷŎClick(object senuei, EventAigs e)
{
this.Close():
}
}
}



00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page 8Ŵ

MAK SHEET {FM ŶŴ)
Following mouule is useu as maik sheet to uisplay stuuent iesult.



















00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page 8ŵ

CDINC F THIS FM:

//S1UÐFN1 MARKSHFF1 RFPOR1 FROM COÐIN0//

]]VIE BUTTN FM HEE U CAN SEACH STUDENT MAK SHEET THUCH LLN]]

piivate voiu buttonŵŎClick(object senuei, EventAigs e)
{
if (textBoxŵ.Text != ŐŐ)
{
BataSet us = new BataSetŵ():

0leBbConnection conn = new 0leBbConnection(ŐPioviuei=Niciosoft.Iet.0LEBB.Ÿ.Ŵ:Bata Souice=quizsystemŶŴŴŴ.mubŐ):
stiing sti = Őselect * fiom maiksheet wheie iolno =ŏŐ + textBoxŵ.Text + ŐŏŐ:
0leBbBataAuaptei ua = new 0leBbBataAuaptei(sti, conn):
ua.Fill(us, ŐmaiksheetŐ):
BataTable ut = new BataTable():
maiksheet ciŵ = new maiksheet():

ciŵ.SetBataSouice(us.Tables|ŐmaiksheetŐ]):
ciystalRepoitvieweiŵ.RepoitSouice = ciŵ:
}
else
{
NessageBox.Show(ŐNust entei the ioll noŐ,ŐBenieuŐ):
textBoxŵ.Cleai():
textBoxŵ.Focus():
}
}

¡¡BACK B0TT0N¡¡

piivate voiu buttonŷŎClick(object senuei, EventAigs e)
{
this.Close():
}



00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page 8Ŷ

ACCESS DATABASE ECD SNAPSHTS

ADD QUESTIN IN DATABASE













00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page 8ŷ

ANSE SHEET DATASABE







LD QUIZZES SLVED SHEETS DATABASE







00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page 8Ÿ

CEATE QUIZ TITLE DATABASE







00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page 8Ź

LCIN DATABASE















00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page 8ź

MAK SHEET DATABASE















00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page 8Ż

LD QUIZZES MAKSHEETS DATABASE







00IZ NANAuENENT SYSTEN

INSTITUTE OF BUSINESS AND INFORMATION TECHNOLOGY
UNIVERSITY OF PUNJAB LAHORE

Page 88

CNCLUSIN:
We have tiieu to pioviueu an online anu offline solutions foi Teacheis anu stuuents. This
softwaie can easily be ueployeu in all euucation institutions foi the puipose of quiz
geneiation anu quiz taking system. We have maue this system usei fiienuly. It is a best
solution foi online anu offline 0uiz system fiom oui siue.

Sign up to vote on this title
UsefulNot useful