private void btnEmpList_Click(object sender, EventArgs e) { frmEmployeeList frmList = new frmEmployeeList(); frmList.IsList = true; frmList.ShowDialog(); if (!frmList.IsListCancel) { Employee objEmp = new Employee(); objEmp = EmployeeManager.GetItem(frmList.DBID); objVisitorGP.EmployeeID = objEmp.DBID; objVisitorGP.ToMeet = objEmp.Initials; objVisitorGP.EmpDept = objEmp.DeptName; objVisitorGP.EmpMobile = objEmp.MobileNo; lblToMeet.Text = objVisitorGP.ToMeet; lblEmpDept.Text = objVisitorGP.EmpDept; lblEmpContact.Text = objVisitorGP.EmpMobile; SendKeys.Send("{TAB}"); } frmList.Dispose(); }
private void btnEmployeeList_Click(object sender, EventArgs e) { frmEmployeeList frmList = new frmEmployeeList(); frmList.IsList = true; frmList.ShowDialog(); if (!frmList.IsListCancel) { objAppoint.EmployeeID = frmList.DBID; objAppoint.EmpName = frmList.Initials; objAppoint.EmpDept = frmList.DeptName; lblToMeet.Text = objAppoint.EmpName; lblDepartment.Text = objAppoint.EmpDept; SendKeys.Send("TAB"); } frmList.Dispose(); }