0% found this document useful (0 votes)
32 views

Student Training Institute: Source Code

This document contains the source code for a C# application that manages a student training institute database. It allows users to view, add, update, and delete student and trainer records from databases tables. The code includes methods for authenticating admin logins, loading and filtering database records into grids, and handling user input to modify data in the databases.

Uploaded by

Muqaddas Pervez
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

Student Training Institute: Source Code

This document contains the source code for a C# application that manages a student training institute database. It allows users to view, add, update, and delete student and trainer records from databases tables. The code includes methods for authenticating admin logins, loading and filtering database records into grids, and handling user input to modify data in the databases.

Uploaded by

Muqaddas Pervez
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 25

Student Training Institute

Source Code:-

using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Assignment_3
{
/// <summary>

/// </summary>
public partial class MainWindow : Window
{
bool check = false;
TraningInstitute__dbmsEntities db = new TraningInstitute__dbmsEntities();
public MainWindow()
{
InitializeComponent();
var std = from s in db.Students //Assign Students data in database
select new
{
firstName = s.FirstName,
lastName = s.LastNmae,
dateofBirth = s.DateofBirth,
registrationNo = s.RegistrationNo,
photo = s.Photo,
code = s.Phone_Code,
contactNo = s.ContactNo,
address = s.Address,
email = s.Email

};
this.stdgrid.ItemsSource = std.ToList();// attach data to grid from
database

var trainer = from t in db.Trainers


select new
{
firstName = t.FirstName,
lastName = t.LastName,
designation = t.Designation,
department = t.Department,
photo = t.Photo,
code = t.Phone_code,
contactno = t.ContactNo,
address = t.Address,
email = t.Email

};
this.trainerGrid.ItemsSource = trainer.ToList();

var cource = from c in db.Courses


select new
{
code = c.Code,
title = c.Title,
description = c.Description

};
this.course_grid.ItemsSource = cource.ToList();

private void login_click(object sender, RoutedEventArgs e)

// login Account for Admin


{
if (this.textboxuser.Text == "Muqaddas" && this.textboxpass.Password ==
"1234")
{
login_Grid.Visibility = Visibility.Hidden; // show and hide
statement
selection_Grid.Visibility = Visibility.Visible;
}
else
{
MessageBox.Show("Invalid Username or Password, Try Again!!");
this.textboxuser.Text = "";
this.textboxpass.Password = "";

}
}
private void student_entity_Click(object sender, RoutedEventArgs e)
{
selection_Grid.Visibility = Visibility.Hidden;
// btn for show and Hide grids
Student_Grid.Visibility = Visibility.Visible;

private void trainer_entity_Click(object sender, RoutedEventArgs e)


// btn for show and Hide grids
{
selection_Grid.Visibility = Visibility.Hidden;
Trainer_Grid.Visibility = Visibility.Visible;
}

private void AddStudent_btn_Click(object sender, RoutedEventArgs e)


{
if (check == false)
{
MessageBox.Show("Add photo to the form");
}
else
{
Student stdobj = new Student() // Make Student Object to add ew
record
{
FirstName = this.fname_txtbox_std.Text,
LastNmae = this.lname_txtbox_std.Text,
DateofBirth = Convert.ToDateTime(DoB_txtbox.Text),
RegistrationNo = this.regNo_txtbox.Text,
Phone_Code = this.code_txtbox_std.Text,
ContactNo = this.contact_txtbox_std.Text,
Address = this.address_txtbox_std.Text,
Email = this.email_txtbox_std.Text,
Photo = this.img_dp.Source.ToString()

};

db.Students.Add(stdobj);
this.fname_txtbox_std.Clear(); // clear fields
this.lname_txtbox_std.Clear();
this.DoB_txtbox.Clear();
this.regNo_txtbox.Clear();
this.code_txtbox_std.Clear();
this.contact_txtbox_std.Clear();
this.address_txtbox_std.Clear();
this.email_txtbox_std.Clear();
check = false;
this.img_dp.Width = 0;
db.SaveChanges();
}
}
private void UpgradeStudent_btn_Click(object sender, RoutedEventArgs e)
// upgrade record of student
{
var result = from std in db.Students
where std.Id == updatedkey
select std;

Student obj = result.SingleOrDefault();


if (obj != null)
{
obj.FirstName = this.fname_txtbox_std.Text;
obj.LastNmae = this.lname_txtbox_std.Text;
obj.DateofBirth = Convert.ToDateTime(DoB_txtbox.Text);
obj.RegistrationNo = this.regNo_txtbox.Text;
obj.Phone_Code = this.code_txtbox_std.Text;
obj.ContactNo = this.contact_txtbox_std.Text;
obj.Address = this.address_txtbox_std.Text;
obj.Email = this.email_txtbox_std.Text;
obj.Photo = this.img_dp.Source.ToString();

db.SaveChanges(); // statement to see changes in grid


}
this.fname_txtbox_std.Clear();
this.lname_txtbox_std.Clear();
this.DoB_txtbox.Clear();
this.regNo_txtbox.Clear();
this.contact_txtbox_std.Clear();
this.code_txtbox_std.Clear();
this.address_txtbox_std.Clear();
this.email_txtbox_std.Clear();
this.img_select.Width = 0;
this.img_dp.Width = 0;

}
private int updatedkey = 0;

private void stdgrid_SelectionChanged(object sender,


SelectionChangedEventArgs e)

if (this.stdgrid.SelectedIndex >= 0 && this.stdgrid.SelectedItems.Count


>= 0)
{
if (this.stdgrid.SelectedItems[0].GetType() == typeof(Student)) //as
we select data from grid so it is not pure tye of student so this condition is used
{
Student std = (Student)this.stdgrid.SelectedItems[0];
if (std.Photo == null)
{
MessageBox.Show("Add Photo in form");
}
else {
string source = (img_select.Source + " ").ToString(); //
convert image source into string
if (source == " ")
{
std.Photo = img_dp.Source.ToString();
}
else
{
std.Photo = img_select.Source.ToString();
}

this.fname_txtbox_std.Text = std.FirstName; // to show all


data in textbox as we select the record in grid
this.lname_txtbox_std.Text = std.LastNmae;
this.DoB_txtbox.Text = std.DateofBirth.ToString();
this.regNo_txtbox.Text = std.RegistrationNo;
this.code_txtbox_std.Text = std.Phone_Code;
this.contact_txtbox_std.Text = std.ContactNo;
this.address_txtbox_std.Text = std.Address;
this.email_txtbox_std.Text = std.Email;
// source=std.Photo;
this.updatedkey = std.Id;
}

img_select.Width = 200;

}
}

private void DeleteStudent_btn_Click(object sender, RoutedEventArgs


e)
// delete record from grid and database
{
var result = from std in db.Students
where std.Id == updatedkey
select std;

Student obj = result.SingleOrDefault();


if (obj != null)
{
db.Students.Remove(obj);
this.fname_txtbox_std.Clear();
this.lname_txtbox_std.Clear();
this.DoB_txtbox.Clear();
this.regNo_txtbox.Clear();
this.code_txtbox_std.Clear();
this.contact_txtbox_std.Clear();
this.address_txtbox_std.Clear();
this.email_txtbox_std.Clear();
this.img_dp.Width = 0;
this.img_select.Width = 0;
db.SaveChanges();
}

private void loadStudent_btn_Click(object sender, RoutedEventArgs e)


// load database to see the changes
{
var std = from s in db.Students
select s;

this.stdgrid.ItemsSource = std.ToList();
this.stdgrid.Columns[10].Visibility = Visibility.Hidden;
}

private void loadTrainer_btn_Click(object sender, RoutedEventArgs e)


{
var trainer = from t in db.Trainers
select t;

this.trainerGrid.ItemsSource = trainer.ToList();
this.trainerGrid.Columns[11].Visibility = Visibility.Hidden;

private void AddTrainer_btn_Click(object sender, RoutedEventArgs e)


{
Trainer Tobj = new Trainer()
{
FirstName = this.fname_txtbox_trainer.Text,
LastName = this.lname_txtbox_trainer.Text,
Designation = this.designation_txtbox.Text,
Department = this.dept_txtbox.Text,
Phone_code = this.code_txtbox_trainer.Text,
ContactNo = this.contact_txtbox_trainer.Text,
Address = this.address_txtbox_trainer.Text,
Email = this.email_txtbox_trainer.Text,
Salary = Convert.ToDecimal(salaray_txtbox.Text),
Photo = this.img_dp1.Source.ToString()
};
db.Trainers.Add(Tobj);
this.fname_txtbox_trainer.Clear();
this.lname_txtbox_trainer.Clear();
this.designation_txtbox.Clear();
this.dept_txtbox.Clear();
this.contact_txtbox_trainer.Clear();
this.code_txtbox_trainer.Clear();
this.address_txtbox_trainer.Clear();
this.email_txtbox_trainer.Clear();
this.salaray_txtbox.Clear();
this.img_dp1.Width = 0;
db.SaveChanges();

private void UpgradeTrainer_btn_Click(object sender, RoutedEventArgs e)


{

var result = from trainer in db.Trainers


where trainer.Id == updatedkey
select trainer;

Trainer obj = result.SingleOrDefault();


if (obj != null)
{
obj.FirstName = this.fname_txtbox_trainer.Text;
obj.LastName = this.lname_txtbox_trainer.Text;
obj.Designation = this.designation_txtbox.Text;
obj.Department = this.dept_txtbox.Text;
obj.Phone_code = this.code_txtbox_trainer.Text;
obj.ContactNo = this.contact_txtbox_trainer.Text;
obj.Address = this.address_txtbox_trainer.Text;
obj.Email = this.email_txtbox_trainer.Text;
obj.Photo = this.img_dp1.Source.ToString();

db.SaveChanges();
}
this.fname_txtbox_trainer.Clear();
this.lname_txtbox_trainer.Clear();
this.designation_txtbox.Clear();
this.dept_txtbox.Clear();
this.contact_txtbox_trainer.Clear();
this.code_txtbox_trainer.Clear();
this.address_txtbox_trainer.Clear();
this.email_txtbox_trainer.Clear();
this.salaray_txtbox.Clear();
this.img_select1.Width = 0;
this.img_dp1.Width = 0;
}
private void DeleteTrainer_btn_Click(object sender, RoutedEventArgs e)
{
var result = from trainer in db.Trainers
where trainer.Id == updatedkey
select trainer;

Trainer obj = result.SingleOrDefault();


if (obj != null)
{
db.Trainers.Remove(obj);
this.fname_txtbox_trainer.Clear();
this.lname_txtbox_trainer.Clear();
this.designation_txtbox.Clear();
this.dept_txtbox.Clear();
this.contact_txtbox_trainer.Clear();
this.code_txtbox_trainer.Clear();
this.address_txtbox_trainer.Clear();
this.email_txtbox_trainer.Clear();
this.salaray_txtbox.Clear();
this.img_dp1.Width = 0;
this.img_select1.Width = 0;

db.SaveChanges();

}
}

private void trainerGrid_SelectionChanged(object sender,


SelectionChangedEventArgs e)
{
if (this.trainerGrid.SelectedIndex >= 0 &&
this.trainerGrid.SelectedItems.Count >= 0)
{
if (this.trainerGrid.SelectedItems[0].GetType() == typeof(Trainer))
{
Trainer trainer = (Trainer)this.trainerGrid.SelectedItems[0];
if (trainer.Photo == null)
{
MessageBox.Show("Add Photo in form");
}
else
{
string source = (img_select1.Source + " ").ToString(); //
convert image source into string
if (source == " ")
{
trainer.Photo = img_dp1.Source.ToString();
}
else
{
trainer.Photo = img_select1.Source.ToString();
}

this.fname_txtbox_trainer.Text = trainer.FirstName;
this.lname_txtbox_trainer.Text = trainer.LastName;
this.designation_txtbox.Text = trainer.Designation;
this.dept_txtbox.Text = trainer.Department;
this.salaray_txtbox.Text = trainer.Salary.ToString();
this.address_txtbox_trainer.Text = trainer.Address;
this.email_txtbox_trainer.Text = trainer.Email;
this.code_txtbox_trainer.Text = trainer.Phone_code;
this.contact_txtbox_trainer.Text = trainer.ContactNo;
this.updatedkey = trainer.Id;
}
img_select1.Width = 200;

}
}
}

private void cources_entity_Click(object sender, RoutedEventArgs e)


{
selection_Grid.Visibility = Visibility.Hidden;
course_Grid.Visibility = Visibility.Visible;
}

private void std_Addimg_btn_Click(object sender, RoutedEventArgs e)


{

OpenFileDialog openFile = new OpenFileDialog(); // to open and read files


openFile.Filter =
"All supported graphics|*.jpg;*.jpeg;*.png|" +
"JPEG (*.jpg;*.jpeg)|*.jpg;*.jpeg|" +
"Portable Network Graphic (*.png)|*.png";
openFile.FilterIndex = 1;

if (openFile.ShowDialog() == true)
this.img_dp.Source = new BitmapImage(new Uri(openFile.FileName));
img_dp.Width = 200;
img_select.Width = 0;
check = true;

private void Add_img_trainer_btn_Click(object sender, RoutedEventArgs


e)
{
OpenFileDialog openFile = new OpenFileDialog(); // to open and read files
openFile.Filter =
"All supported graphics|*.jpg;*.jpeg;*.png|" +
"JPEG (*.jpg;*.jpeg)|*.jpg;*.jpeg|" +
"Portable Network Graphic (*.png)|*.png";
openFile.FilterIndex = 1;

if (openFile.ShowDialog() == true)
this.img_dp1.Source = new BitmapImage(new Uri(openFile.FileName));
img_dp1.Width = 200;
img_select1.Width = 0;
//check = true;
}

private void loadCources_btn_Click(object sender, RoutedEventArgs e)


{
var course = from c in db.Courses
select c;

this.course_grid.ItemsSource = course.ToList();
//this.course_grid.Columns[4].Visibility = Visibility.Hidden;
this.course_grid.Columns[5].Visibility = Visibility.Hidden;
this.course_grid.Columns[6].Visibility = Visibility.Hidden;

private void AddCources_btn_Click(object sender, RoutedEventArgs e)


{
Course Cobj = new Course()
{

Code = this.code_txtbox.Text,
Title = this.title_txtbox.Text,
Description = this.description_txtbox.Text

};

db.Courses.Add(Cobj);
this.code_txtbox.Clear();
this.title_txtbox.Clear();
this.description_txtbox.Clear();
db.SaveChanges();
}
private void UpdateCources_btn_Click(object sender, RoutedEventArgs
e)
{
var result = from course in db.Courses
where course.Id == updatedkey
select course;

Course obj = result.SingleOrDefault();


if (obj != null)
{
obj.Code = this.code_txtbox.Text;
obj.Title = this.title_txtbox.Text;
obj.Description = this.description_txtbox.Text;
db.SaveChanges();
}
this.code_txtbox.Clear();
this.title_txtbox.Clear();
this.description_txtbox.Clear();

private void DeleteCources_btn_Click(object sender, RoutedEventArgs e)


{
var result = from course in db.Courses
where course.Id == updatedkey
select course;

Course obj = result.SingleOrDefault();


if (obj != null)
{
db.Courses.Remove(obj);
this.code_txtbox.Clear();
this.title_txtbox.Clear();
this.description_txtbox.Clear();
db.SaveChanges();
}
}

private void course_grid_SelectionChanged(object sender,


SelectionChangedEventArgs e)
{
if (this.course_grid.SelectedIndex >= 0 &&
this.course_grid.SelectedItems.Count >= 0)
{
if (this.course_grid.SelectedItems[0].GetType() == typeof(Course))
{
Course course = (Course)this.course_grid.SelectedItems[0];
this.code_txtbox.Text = course.Code;
this.title_txtbox.Text = course.Title;
this.description_txtbox.Text = course.Description;

this.updatedkey = course.Id;
}
}
}

private void Manage_Std_Course_Click(object sender, RoutedEventArgs


e)
{
course_Grid.Visibility = Visibility.Hidden;
std_cource_grid.Visibility = Visibility.Visible;
List<string> regno = new List<string>(); // to show students in combo box
var result = from s in db.Students
select s;

foreach (var item in result)


{
regno.Add(item.RegistrationNo);

}
this.RegNo_Combo.ItemsSource = regno;
List<string> coursecode = new List<string>();// show courses in listbox
var res = from c in db.Courses
select c;

foreach (var item in res)


{
coursecode.Add(item.Code);

this.CourseCode_listbox.ItemsSource = coursecode;

var query = from s in db.Students // query to show record in data


grid
join sc in db.Student_Course on s.Id equals sc.C_StudentID
join c in db.Courses on sc.CourseID equals c.Id
select new
{
StudentID=sc.C_StudentID,
Student_RegNo = s.RegistrationNo,
Student_Name= s.FirstName+ " "+s.LastNmae,
sc.CourseID,
Course_Title=c.Title,
Course_Code=c.Code

};
this.std_cource_Grid.ItemsSource = query.ToList();

List<string> regnostd = new List<string>(); // query to show those


students who are not taking any course
var Studentsnot = from s in db.Students
from sc in s.Student_Course.DefaultIfEmpty()
select new
{
s.RegistrationNo,
s.Id,
sc.CourseID
};
foreach (var item in Studentsnot)
{
if (item.CourseID == null) {
regnostd.Add(item.RegistrationNo); }
}

this.unassigned_regno_listbox.ItemsSource = regnostd.ToList();
}

private void Register_course_std_Click(object sender, RoutedEventArgs


e)
{

string combo_regno = RegNo_Combo.SelectedItem.ToString();


string listbox_code = CourseCode_listbox.SelectedItem.ToString();
int selected_courseID=0;
int selected_regnoID=0;

var SelectedRegno = from r in db.Students // assigning courses to


students in database
select r;

foreach (var item in SelectedRegno)


{
if (combo_regno == item.RegistrationNo)
{
selected_regnoID = item.Id;
}
}

var SelectedCode = from c in db.Courses


select c;

foreach (var item in SelectedCode)


{
if (listbox_code == item.Code)
{
selected_courseID = item.Id;
}

}
Student_Course obj = new Student_Course();
obj.CourseID = selected_courseID;
obj.C_StudentID = selected_regnoID;
db.Student_Course.Add(obj);
db.SaveChanges();

}
private void Load_course_std_btn_Click(object sender, RoutedEventArgs
e)
{
var query = from s in db.Students // load btn to see the changes in data
grid
join sc in db.Student_Course on s.Id equals sc.C_StudentID
join c in db.Courses on sc.CourseID equals c.Id
select new
{
StudentID = sc.C_StudentID,
Student_RegNo = s.RegistrationNo,
Student_Name = s.FirstName + " " + s.LastNmae,
sc.CourseID,
Course_Title = c.Title,
Course_Code = c.Code

};
this.std_cource_Grid.ItemsSource = query.ToList();

List<string> regnostd = new List<string>();


var Studentsnot = from s in db.Students
from sc in s.Student_Course.DefaultIfEmpty()
select new
{
s.RegistrationNo,
s.Id,
sc.CourseID

};
foreach (var item in Studentsnot)
{
if (item.CourseID == null)
{
regnostd.Add(item.RegistrationNo);
}
}

this.unassigned_regno_listbox.ItemsSource = regnostd.ToList();

private void Manage_Trainer_Course_Click(object sender,


RoutedEventArgs e)
{
course_Grid.Visibility = Visibility.Hidden;
Trainer_Course_Grid.Visibility = Visibility.Visible;
List<string> trainers_List = new List<string>();//show teacher info in
combobox
var result = from t in db.Trainers
select t;

foreach (var item in result)


{
trainers_List.Add(item.Id+" "+ item.FirstName+" "+ item.LastName);

}
this.Trainer_Combo.ItemsSource = trainers_List;

List<string> courses = new List<string>();// show courses in listbox


var res = from c in db.Courses
select c;

foreach (var item in res)

{
if(item.TrainerID==null)
courses.Add(item.Code);

this.Trainer_Course_listbox.ItemsSource = courses;

List<string> trainersinfo = new List<string>(); //Show Trainers who have


not assigned any course in List Box
var Trainers_not_assigned = from t in db.Trainers
from c in t.Courses.DefaultIfEmpty()
select new
{
Trainer_Name=t.FirstName+ " "+t.LastName,
Trainer_ID=c.TrainerID,
Course_Title=c.Title

};
foreach (var item in Trainers_not_assigned)
{
if (item.Trainer_ID.Equals(null))
{
trainersinfo.Add(item.Trainer_ID.ToString()+"
"+item.Trainer_Name);
}
}
this.unassigned_trainer_listbox.ItemsSource = trainersinfo.ToList();

var query = from t in db.Trainers // to show data in data grid


join c in db.Courses on t.Id equals c.TrainerID
select new
{
TrainerID = t.Id,
Trainer_Name = t.FirstName + " " + t.LastName,
Course_Title = c.Title,
Course_Code = c.Code

};
this.TranerCourse_grid.ItemsSource = query.ToList();

private void Register_course_Trainer_Click(object sender, RoutedEventArgs e) //


assign courses to Trainers
{

string combo_trainerinfo = Trainer_Combo.SelectedItem.ToString();


string listbox_course = Trainer_Course_listbox.SelectedItem.ToString();
int splid_TrainerID = 0;

string[] splitid = combo_trainerinfo.Split();

foreach (string item in splitid)


{
splid_TrainerID = int.Parse(item);
break;
}

var SelectedCode = from c in db.Courses


select c;

foreach (var item in SelectedCode)


{
if (listbox_course == item.Code)
{
item.TrainerID = splid_TrainerID;
break;
}

}
db.SaveChanges();
}
private void Load_course_trainer_btn_Click(object sender,
RoutedEventArgs e)
{

var query = from t in db.Trainers


join c in db.Courses on t.Id equals c.TrainerID
select new
{
TrainerID = c.TrainerID,
Trainer_Name = t.FirstName + " " + t.LastName,
Course_Title = c.Title,
Course_Code = c.Code

};
this.TranerCourse_grid.ItemsSource = query.ToList();

List<string> courses = new List<string>();// Show courses in listbox


var res = from c in db.Courses
select c;

foreach (var item in res)

{
if (item.TrainerID == null)
courses.Add(item.Code);

this.Trainer_Course_listbox.ItemsSource = courses;

List<string> trainersinfo = new List<string>(); // show data in data


grid
var Trainers_not_assigned = from t in db.Trainers
from c in t.Courses.DefaultIfEmpty()
select new
{
Trainer_Name = t.FirstName + " " +
t.LastName,
Trainer_ID = c.TrainerID,
Course_Title = c.Title

};
foreach (var item in Trainers_not_assigned)
{
if (item.Trainer_ID.Equals(null))
{
trainersinfo.Add(item.Trainer_ID.ToString() + " " +
item.Trainer_Name);
}
}

this.unassigned_trainer_listbox.ItemsSource = trainersinfo.ToList();

private void back_click(object sender, RoutedEventArgs e)


{
this.Student_Grid.Visibility = Visibility.Hidden;
this.selection_Grid.Visibility = Visibility.Visible;
}

private void back_trainer_btn_Click(object sender, RoutedEventArgs e)


{
this.trainerGrid.Visibility = Visibility.Hidden;
this.selection_Grid.Visibility = Visibility.Visible;
}

private void back_course_btn_Click(object sender, RoutedEventArgs e)


{
this.course_Grid.Visibility = Visibility.Hidden;
this.selection_Grid.Visibility = Visibility.Visible;
}

private void back_std_course(object sender, RoutedEventArgs e)


{
this.std_cource_grid.Visibility = Visibility.Hidden;
this.course_Grid.Visibility = Visibility.Visible;
}

private void Clear_click(object sender, RoutedEventArgs e)


{
this.fname_txtbox_std.Clear();
this.lname_txtbox_std.Clear();
this.DoB_txtbox.Clear();
this.regNo_txtbox.Clear();
this.contact_txtbox_std.Clear();
this.code_txtbox_std.Clear();
this.address_txtbox_std.Clear();
this.email_txtbox_std.Clear();
this.img_select.Width = 0;
this.img_dp.Width = 0;

private void clear_trainer_Click(object sender, RoutedEventArgs e)


{
this.fname_txtbox_trainer.Clear();
this.lname_txtbox_trainer.Clear();
this.designation_txtbox.Clear();
this.dept_txtbox.Clear();
this.contact_txtbox_trainer.Clear();
this.code_txtbox_trainer.Clear();
this.address_txtbox_trainer.Clear();
this.email_txtbox_trainer.Clear();
this.salaray_txtbox.Clear();
this.img_select1.Width = 0;
this.img_dp1.Width = 0;

}
}
ScreenShots:-
ERD Diagram
Student Record
Trainer Record
Course Record
Assign Courses to Students
Assign Courses to Trainers

You might also like