You are on page 1of 20

K.

G Pasindu Vidusara Ditech

Pearson Assured
DIPLOMA IN INFORMATION TECHNOLOGY
(ONLINE)
Assignment Cover Sheet

Assignment Topic Student Enrolment System


Final project
Documentation
Batch Ditec 166 Date Submitted

Marks Obtained
Reg No. Student Name Signature (To be filled by
the Assessor)

GAM/A- K.G Pasindu Vidusara Pasindu


015479

1
Final project
Documentation
Statement of Originality and Student Declaration

I hereby, declare that I know what plagiarism entails, namely to use another’s work and to present it as
my own without attributing the sources in the correct way. I further understand what it means to copy
another’s work.
1. I know that plagiarism is a punishable offence because it constitutes theft.
2. I understand the plagiarism and copying policy of the Edexcel UK.
3. I know what the consequences will be if I plagiarize or copy another’s work in any of the
assignments of this program.
4. I declare therefore that all work presented by me for every aspect of my program, will be my
own, and where I have made use of another’s work, I will attribute the source in the correct way.
5. I acknowledge that the attachment of this document signed or not, constitutes a binding
agreement between myself and Edexcel UK.

Reg No. Name Signature Date

015479 K.G Pasindu Vidusara Pasindu

6. I understand that my assignment will not be considered as submitted if this document is not
attached to the attachment.

2
Final project
Documentation
Content
1.Introduction..............................................................................................................................................6
1.1 Domain description...........................................................................................................................6
1.2 High Level Solutions Description........................................................................................................6
2.REQUIREMENTS........................................................................................................................................6
2.1 Functional Requirements...................................................................................................................6
2.2 Non-Functional Requirements...........................................................................................................7
3.Design.......................................................................................................................................................8
3.1 Design Interface.....................................................................................................................................8
3.1.1 Loging interface..........................................................................................................................8
3.1.2 Registration Interface.................................................................................................................8
3.2 Program Code Listing.........................................................................................................................9
3.2.1 Login Credentials........................................................................................................................9
3.2.2 button_OnClick_Register..........................................................................................................10
3.2.3 button_OnClick_Delete.............................................................................................................11
3.2.4 button_OnClick_Clear...............................................................................................................13
4.1Student Information Table...............................................................................................................18
4.1.1 Design.......................................................................................................................................18
4.1.2 Table data.................................................................................................................................18
5. system demonstrate the functions of the System................................................................................19
5.1 Login Form.......................................................................................................................................19
5.2 Student Information Form...............................................................................................................19
5.2.1 Insert.........................................................................................................................................19
5.2.3 Delete.......................................................................................................................................22
6.ER Diagram.............................................................................................................................................26
10. Student Enrolment System User Manual.............................................................................................32

3
Final project
Documentation
1.Introduction
1.1 Domain description
System can be used to enroll new students and to calculate course fee. The system also provides a facility
to delete existing student information. Staff members can login to the system and enroll students .

1.2 High Level Solutions Description


A standalone system to enroll students (developed by using C# Windows forms applications from Visual
Studio 2019 and also Guna UI plugin)

2.REQUIREMENTS
2.1 Functional Requirements
Login
Staff can login in order to enroll the students and to calculate the course fee (Click on Login button)

Register

 Can enroll a new student (Click on Insert button)


 When the Date of Birth is selected Age will be calculated
 Only students above 18 years can be enrolled into the system

Delete Student

 Delete an existing student information (Click on Delete button)

4
Final project
Documentation

3.Design
(To design I mainly used the Guna Ui plug in
and C# programming language in Visual studio
2019)

5
Final project
Documentation
3.1 Design Interface
3.1.1 Loging interface

6
Final project
Documentation
3.1.2 Registration Interface

3.2 Program Code Listing


3.2.1 Login Credentials

7
Final project
Documentation
3.2.2 button_OnClick_Register

private void guna2Button1_Click(object sender, EventArgs e)


{

conn();

int age = DateTime.Today.Year - guna2DateTimePicker1.Value.Year;


int Rno, cnum;

txtAge.Text = age.ToString();
if (age >= 14)

{
if (int.TryParse(registern.Text, out Rno) && (txtSn.Text.Length > 0) &&
int.TryParse(txtMobile.Text, out cnum) && int.TryParse(txtAge.Text, out cnum) &&
txtSemester.SelectedIndex > -1)
{
conn();

try
{

string gender = radioMale.Checked ? "Male" : "Female";

string query_insert = "INSERT INTO Student VALUES('" +


registern.Text + "','" + txtSn.Text + "','" + gender + "','" +
guna2DateTimePicker1.Value+ "', '" + txtAge.Text + "','" + txtMobile.Text + "','" +
txtSemester.Text + "')";

SqlCommand cmnd = new SqlCommand(query_insert, sqlCon);


cmnd.ExecuteNonQuery();

MessageBox.Show("Data Saved", "Success", MessageBoxButtons.OK,


MessageBoxIcon.Information);
MessageBox.Show("Student inserted succesfully!!!", "Register
student", MessageBoxButtons.OK, MessageBoxIcon.Information);

}
catch (Exception ex)
{
MessageBox.Show("Database error:" + ex.Message.ToString());

8
Final project
Documentation
}

else
{
MessageBox.Show("Complete the missing Data", "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}

else
{
MessageBox.Show("Cannot Enroll-bellow 18 years", "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error);

3.2.4 button_OnClick_ClearFields
To clear all the input fields.

private void clear()


{
registern.Clear();
txtSn.Clear();
txtMobile.Clear();
txtAge.Clear();
guna2DateTimePicker1.CustomFormat = " ";
guna2DateTimePicker1.Format = DateTimePickerFormat.Custom;
txtSemester.SelectedIndex = -1;

}
private void label5_Click(object sender, EventArgs e)
{
clear();
}

3.2.7 Delete

try
{

9
Final project
Documentation
conn();

sql = "select * from Student where RegisterN ='" + registern.Text + "'";


sqlCom = new SqlCommand(sql, sqlCon);
sqlDr = sqlCom.ExecuteReader();
try
{

bool isSearchok = false;


while (sqlDr.Read())
{
isSearchok = true;

if (isSearchok)
{

isSearchok = false;

try
{

string deleteSql = "delete from Student where RegisterN='" +


registern.Text + "'";

DialogResult dialogresault = MessageBox.Show("Are you sure


you want to remove this student", "Delete", MessageBoxButtons.YesNo,
MessageBoxIcon.Warning);
if (dialogresault == DialogResult.Yes)
{

conn();
SqlCommand cmnd = new SqlCommand(deleteSql, sqlCon);
cmnd.ExecuteNonQuery();

MessageBox.Show(" Student Deleted Successfully !!!",


"Delete", MessageBoxButtons.OK, MessageBoxIcon.Information);

registern.Clear();

}
else if (dialogresault == DialogResult.No)
{

10
Final project
Documentation
}

}
catch (Exception ex)
{
MessageBox.Show("Can't delete application", "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error);

}
finally
{
closeCon();
}

}
else
{

MessageBox.Show("Registration number is not found!!!", "Delete",


MessageBoxButtons.OK, MessageBoxIcon.Warning);
}

catch (Exception ex)


{
MessageBox.Show("Error" + ex);
}

finally
{
closeCon();
}

4 Database
4.1Student Information Table
4.1.1 Design

11
Final project
Documentation

4.1.2 Table data


Sample data

12
Final project
Documentation

13
Final project
Documentation
5. System demonstrate the functions of the System

5.2 Student Registration Form


5.2.1 Insert

14
Final project
Documentation

15
Final project
Documentation
5.2.3 Delete

6.Testing
Te Test Expected result Actual Result Pass/ Rema

16
Final project
Documentation
st Fail rks
Id
1 Login No massage Pass
username as shown just go to
Pasindu the registration
Vidusara form
and
password as
pasi@123

2 Login A message is Pass


username as displayed as
“Pasindu “The user Name
Vidusara” or Password you
and entered is
password as incorrect”
“pasi123”

6 Registering A message is Pass


student displayed as
below18 “Cannot enrol -
years Below 18 years”

7 Registering Messages are Pass


a student displayed as
with all “Student Inserted
complete successfully!!”

10 Delete A message is Pass


student displayed as
“Are you sure
you want to
remove this
student”

17
Final project
Documentation

7.ER Diagram

RegNo SName Age

Student
DOB Gender

CEI(Course)

TelNo

11. Student Enrolment System User Manual

18
Final project
Documentation
 Username and password should be ”Pasindu Vidusara” and”pasi@123”
respectively.
 Registration Number is compulsory and it should be an integer value
 Date of birth should be selected from the Date Time picker calendar, then the age
of the student will be auto calculated and students under 18 years cannot be able to
enroll.
 Gender should be selected
 Contact Number should not exceed 10 integer values.
 Course should be selected.
 To insert a new student detail in to the data base “Insert” button should be clicked.
 To delete an existing student information from the data base “Delete” button
should be clicked after entering the corresponding Registration number of the
student data needed to be deleted.
 To ready for a new enrolment “Clear Fields” button should be clicked.

Th
an Speciall
y I want
19
to give
my

You might also like