Пример #1
0
        }//--------------------

        //####################################END CLASS StudentScholarship EVENTS####################################

        //##################################BUTTON btnSearchStudent EVENTS##########################################################
        //event is raised when the control is clicked
        private void btnSearchStudentClick(object sender, EventArgs e)
        {
            using (StudentSearch frmSearch = new StudentSearch(_userInfo, _scholarshipManager, false, false))
            {
                frmSearch.ShowDialog(this);

                if (frmSearch.HasSelected)
                {
                    if (this.pbxStudent.Image != null)
                    {
                        this.pbxStudent.Image.Dispose();
                        this.pbxStudent.Image = null;
                    }

                    GC.SuppressFinalize(this);
                    GC.Collect();

                    _studentInfo = _scholarshipManager.GetDetailsStudentInformation(_userInfo, frmSearch.PrimaryId, Application.StartupPath, true);

                    this.lblStdFirstName.Text = _studentInfo.PersonInfo.FirstName;
                    this.lblStdLastName.Text  = _studentInfo.PersonInfo.LastName;
                    this.lblStdStudentId.Text = _studentInfo.StudentId;
                    this.lblMiddleName.Text   = _studentInfo.PersonInfo.MiddleName;

                    _studentScholarshipInfo.StudentEnrolmentLevelInfo.EnrolmentLevelSysId = _scholarshipManager.GetEnrolmentLevelSysId(_studentInfo.StudentSysId);

                    if (!String.IsNullOrEmpty(_studentInfo.PersonInfo.FilePath))
                    {
                        this.pbxStudent.Image = Image.FromFile(_studentInfo.PersonInfo.FilePath);
                    }
                }
            }
        }//---------------------------------
Пример #2
0
        }//--------------------

        //event is raised whe  the conrol is couble clicked
        private void _frmStudentScholarshipSearchOnDoubleClickEnter(string id)
        {
            try
            {
                using (StudentScholarshipUpdate frmUpdate = new StudentScholarshipUpdate(_userInfo,
                                                                                         _scholarshipManager.GetDetailsStudentInformation(_userInfo, _frmStudentScholarshipSearch.PrimaryId, Application.StartupPath, false),
                                                                                         _scholarshipManager.GetDetailsStudentScholarshipInformation(_frmStudentScholarshipSearch.PrimaryId), _scholarshipManager, _isRecordLocked))
                {
                    frmUpdate.ShowDialog(this);

                    if (frmUpdate.HasUpDated || frmUpdate.HasDeleted)
                    {
                        this.ShowSearchResultDialog();
                    }
                }
            }
            catch (Exception ex)
            {
                RemoteClient.ProcStatic.ShowErrorDialog(ex.Message, "Error Loading");
            }
        }