Académique Documents
Professionnel Documents
Culture Documents
Part 2
Demo Projects
• Adding class with business logic to windows form application and using
it in application
• Using following controls:
o Labels
o Textboxes
o Buttons
o Group-box
Bhushan Mulmule
bhushan.mulmule@gmail.com
www.dotnetvideotutorial.com
Project 1: Employee Salary Calculation
Object Oriented Approach
Note: Instead of using variables to save data (as in previous example) here we will
write class Employee with required fields and then will save data in the object of
Employee class
7 Labels:
3 Textboxes:
These are output labels
Name: txtEmpNo,
txtName, txtBasicSalary AutoSize: False
BackColor: White
BorderStyle: FixedSingle
Text: Blank
4 Group boxes:
class Employee
{
public int EmpNo { get; set; }
public string Name { get; set; }
public float BasicSalary { get; set; }
public float HRA { get; set; }
public float TA { get; set; }
public float DA { get; set; }
public float PF { get; set; }
public float TDS { get; set; }
public float GrossSalary { get; set; }
public float NetSalary { get; set; }
www.dotnetvideotutorial.com
Step 3: Add event handlers for buttons
• Write code for New and Exit button and run the project
To Do:
Convert Student Progress Report project (refer part 1) using object oriented
approach (Write Student class)
www.dotnetvideotutorial.com