Expand|Select|Wrap|Line Numbers
- Private Sub cmdEdit_Click(Index As Integer)
- txtFullname.Enabled = True
- txtAddress.Enabled = True
- txtArea.Enabled = True
- txtPostcode.Enabled = True
- txtContactno.Enabled = True
- txtPos.Enabled = True
- txtSalary.Enabled = True
- End Sub
- Private Sub cmdExit_Click(Index As Integer)
- counter = EmployeeCollection.Count
- Dim forcounter As Integer
- Open "c:\temp\Storage.txt" For Output As #1
- For forcounter = 1 To EmployeeCollection.Count
- Print #1, """" & EmployeeCollection.Item(forcounter).Fullname & """,";
- Print #1, EmployeeCollection.Item(forcounter).Address & ",";
- Print #1, EmployeeCollection.Item(forcounter).Area & ",";
- Print #1, EmployeeCollection.Item(forcounter).Postcode & ",";
- Print #1, EmployeeCollection.Item(forcounter).Contactno & ",";
- Print #1, EmployeeCollection.Item(forcounter).Pos & ",";
- Print #1, EmployeeCollection.Item(forcounter).Salary
- Next
- Close #1
- End
- End Sub
- Private Sub cmdFirst_Click(Index As Integer)
- txtEmployeeno.Text = 1
- txtFullname.Text = EmployeeCollection.Item(1).Fullname
- txtAddress.Text = EmployeeCollection.Item(1).Address
- txtArea.Text = EmployeeCollection.Item(1).Area
- txtPostcode.Text = EmployeeCollection.Item(1).Postcode
- txtContactno.Text = EmployeeCollection.Item(1).Contactno
- txtPos.Text = EmployeeCollection.Item(1).Pos
- txtSalary.Text = EmployeeCollection.Item(1).Salary
- cmdP.Enabled = False
- cmdNext.Enabled = True
- If counter - 1 < 1 Then
- MsgBox ("First Record")
- End If
- End Sub
- Private Sub cmdsave_Click(Index As Integer)
- Set Employee = New clsEmployee
- Employee.Fullname = txtFullname.Text
- Employee.Address = txtAddress.Text
- Employee.Area = txtArea.Text
- Employee.Postcode = txtPostcode.Text
- Employee.Contactno = txtContactno.Text
- Employee.Pos = txtPos.Text
- Employee.Salary = txtSalary.Text
- txtFullname.Enabled = False
- txtAddress.Enabled = False
- txtArea.Enabled = False
- txtPostcode.Enabled = False
- txtContactno.Enabled = False
- txtPos.Enabled = False
- txtSalary.Enabled = False
- EmployeeCollection.Add Employee
- txtEmployeeno.Text = EmployeeCollection.Count
- Set Employee = Nothing
- End Sub
Really greatfull for n e help
yamasassy