コード例 #1
0
        } //-------------------------------------------

        //############################################END BUTTON btnSearchSubject EVENTS#################################################

        //###############################################BUTTON btnSearchEmployee EVENTS#####################################################
        //event is raised when the button is clicked
        private void btnSearchEmployeeClick(object sender, EventArgs e)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;

                using (EmployeeSearchOnTextboxList frmSearch = new EmployeeSearchOnTextboxList(_userInfo, _specialManager))
                {
                    frmSearch.AdoptGridSize = true;
                    frmSearch.ShowDialog(this);

                    if (frmSearch.HasSelected)
                    {
                        _employeeInfo = _specialManager.GetDetailsByEmployeeIdEmployeeInformation(frmSearch.PrimaryId);

                        _specialInfo.EmployeeSysId = _employeeInfo.EmployeeSysId;

                        lblEmployeeId.Text   = _employeeInfo.EmployeeId;
                        lblEmployeeName.Text = _employeeInfo.PersonInfo.LastName.ToUpper() + ", " + _employeeInfo.PersonInfo.FirstName + " " +
                                               _employeeInfo.PersonInfo.MiddleName;
                        lblEmployeeStatus.Text = _employeeInfo.SalaryInfo.EmployeeStatusInfo.StatusDescription + ", " +
                                                 _employeeInfo.SalaryInfo.EmploymentTypeInfo.TypeDescription;
                        lblEmployeeDepartmentName.Text = _employeeInfo.SalaryInfo.DepartmentInfo.DepartmentName;
                    }

                    _specialManager.SetSelectedDataTableToNull();
                }
            }
            catch (Exception ex)
            {
                RemoteClient.ProcStatic.ShowErrorDialog(ex.Message, "Error Loading Subject Search Module");
            }
            finally
            {
                this.Cursor = Cursors.Arrow;
            }
        } //---------------------------------------