} //----------------------------------

        //this procedure shows the view update subject information
        private void ShowUpdateSubjectDialog(String id)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;

                using (SubjectUpdate frmUpdate = new SubjectUpdate(_userInfo, _courseManager.GetDetailsSubjectInformation(id), _courseManager))
                {
                    _frmClassroomSearch.WindowState = FormWindowState.Minimized;

                    frmUpdate.ShowDialog(this);

                    if (frmUpdate.HasUpdated)
                    {
                        this.ShowSearchResultDialog(true);
                    }

                    _frmClassroomSearch.WindowState = FormWindowState.Normal;
                }
            }
            catch (Exception ex)
            {
                RemoteClient.ProcStatic.ShowErrorDialog(ex.Message, "Error Loading Update Subject Information Module");
            }
            finally
            {
                this.ctlManager.SetFocusOnSearchTextBox();

                this.Cursor = Cursors.Arrow;
            }
        } //----------------------------------
Exemple #2
0
        } //-----------------------------------

        //#############################################END DATAGRIDVIEW dgvList EVENTS###############################################

        //###########################################LINKBUTTON lnkAdd EVENTS########################################################
        //event is raised when the link is clicked
        private void lnkAddLinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            using (PrerequisiteSearchOnTextboxList frmSearch = new PrerequisiteSearchOnTextboxList(_userInfo, _courseManager,
                                                                                                   _subjectInfo.DepartmentInfo.DepartmentId))
            {
                frmSearch.ShowDialog(this);

                if (frmSearch.HasSelected)
                {
                    if (_courseManager.IsExistsPrerequisiteSubject(frmSearch.PrimaryId))
                    {
                        String strMsg = "The selected subject is already in the pre-requisite list.";

                        MessageBox.Show(strMsg, "Duplicate Entry", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }
                    else if (String.Equals(_subjectInfo.SubjectSysId, frmSearch.PrimaryId))
                    {
                        String strMsg = "Cannot add the selected subject in the pre-requisite list.";

                        MessageBox.Show(strMsg, "Entry Denied", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }
                    else
                    {
                        this.dgvList.DataSource = _courseManager.AddPrerequisiteSubject(_courseManager.GetDetailsSubjectInformation(frmSearch.PrimaryId));
                    }
                }
            }
        }//---------------------------