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

        //####################################END BUTTON btnClose EVENTS####################################

        //####################################BUTTON btnSearchAdditionalFee EVENTS####################################
        //event is raised when the the control is clicked
        private void btnSearchAdditionalFeeClick(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;

            try
            {
                using (AdditionalFeeSearchOnTextBoxList frmSearch = new AdditionalFeeSearchOnTextBoxList(_cashieringManager))
                {
                    frmSearch.AdoptGridSize = false;
                    frmSearch.ShowDialog(this);

                    if (frmSearch.HasSelected)
                    {
                        CommonExchange.StudentAdditionalFee studentAdditionalFeeTemp = _cashieringManager.GetDetailsAdditionalFee(frmSearch.PrimaryId);

                        _studentAdditionalFeeInfo.SchoolFeeParticularInfo.FeeParticularSysId =
                            studentAdditionalFeeTemp.SchoolFeeParticularInfo.FeeParticularSysId;
                        _studentAdditionalFeeInfo.SchoolFeeParticularInfo.ParticularDescription =
                            studentAdditionalFeeTemp.SchoolFeeParticularInfo.ParticularDescription;

                        this.lblParticularDescription.Text   = _studentAdditionalFeeInfo.SchoolFeeParticularInfo.ParticularDescription;
                        this.txtAdditionalPaymentAmount.Text = _studentAdditionalFeeInfo.Amount.ToString("N");

                        this.txtAdditionalPaymentAmount.Focus();
                        this.txtAdditionalPaymentAmount.Select();
                    }
                }
            }
            catch (Exception ex)
            {
                RemoteClient.ProcStatic.ShowErrorDialog(ex.Message, "Error Loading");
            }

            this.Cursor = Cursors.Arrow;
        }//-----------------------------
コード例 #2
0
        }//-----------------------

        //##################################END PICTUREBOX pbxChecked EVENTS######################################################

        //##################################BUTTON btnAdditionalFee EVENTS######################################################
        //event is raised when the picture box is clicked
        private void btnSearchAdditionalFeeClick(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;

            try
            {
                using (AdditionalFeeSearchOnTextBoxList frmSearch = new AdditionalFeeSearchOnTextBoxList(_cashieringManager))
                {
                    frmSearch.AdoptGridSize = false;
                    frmSearch.ShowDialog(this);

                    if (frmSearch.HasSelected)
                    {
                        _additionalFeeInfo = _cashieringManager.GetDetailsAdditionalFee(frmSearch.PrimaryId);

                        this.lblParticularDescription.Text = _additionalFeeInfo.SchoolFeeParticularInfo.ParticularDescription;

                        this.txtAmount.Focus();
                        this.txtAmount.Select();

                        this.ctlPayment.Enabled = this.pbxChecked.Enabled = this.btnRecord.Enabled = true;
                    }
                }
            }
            catch (Exception ex)
            {
                RemoteClient.ProcStatic.ShowErrorDialog(ex.Message, "Error Loading");
            }

            this.Cursor = Cursors.Arrow;
        }//---------------------
コード例 #3
0
        }//---------------------

        //##################################END BUTTON btnAdditionalFee EVENTS######################################################

        //##################################BUTTON btnRecord EVENTS######################################################
        //event is raised when the picture box is clicked
        private void btnRecordClick(object sender, EventArgs e)
        {
            try
            {
                Boolean hasInserted = false;

                for (Int32 x = 0; x < this.dgvList.Rows.Count; x++)
                {
                    if ((Boolean)this.dgvList.Rows[x].Cells[0].Value)
                    {
                        _cashieringManager.InsertAdditionalFeeCached(this.dgvList.Rows[x].Cells["sysid_enrolmentlevel"].Value.ToString(),
                                                                     _additionalFeeInfo.SchoolFeeParticularInfo.FeeParticularSysId, _additionalFeeInfo.Amount, _additionalFeeInfo.Remarks);

                        hasInserted = true;
                    }
                }

                if (this.ValidateControls(hasInserted))
                {
                    String strMsg = "Are you sure you want to record the new students additional fee?";

                    DialogResult msgResult = MessageBox.Show(strMsg, "Confirm Record", MessageBoxButtons.YesNo, MessageBoxIcon.Question,
                                                             MessageBoxDefaultButton.Button1);

                    if (msgResult == DialogResult.Yes)
                    {
                        strMsg = "The students additional fee has been successfully recorded.";

                        this.Cursor = Cursors.WaitCursor;

                        _cashieringManager.InsertStudentAdditionalFee(_userInfo);

                        this.Cursor = Cursors.Arrow;

                        MessageBox.Show(strMsg, "Success", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);

                        _hasRecorded = true;

                        this.ResetQuery();

                        this.lblParticularDescription.Text = "-";
                        this.txtAmount.Text = String.Empty;
                        this.txtAdditionalFeeRemarks.Clear();

                        this.btnRecord.Enabled = false;

                        _additionalFeeInfo = new CommonExchange.StudentAdditionalFee();

                        _cashieringManager.ClearCachedData();
                    }
                }
            }
            catch (Exception ex)
            {
                RemoteClient.ProcStatic.ShowErrorDialog(ex.Message, "Error Recording");
            }
        }//--------------------
コード例 #4
0
        //###############################################CLASS MultipleAdditionalPaymentCreate EVENTS##################################################
        //event is raised when the class is loaded
        private void ClassLoad(object sender, EventArgs e)
        {
            dgvList.DataSource = _cashieringManager.StudentTableFormatIsForApply;
            RemoteClient.ProcStatic.SetDataGridViewColumns(dgvList, false);

            _additionalFeeInfo     = new CommonExchange.StudentAdditionalFee();
            _additionalFeeInfoTemp = (CommonExchange.StudentAdditionalFee)_additionalFeeInfo.Clone();

            this.ctlPayment.SchoolYearComboBox.Enabled = false;
            this.ctlPayment.DisableMoveCapability();

            _cashieringManager.InitializeSchoolYearCombo(this.ctlPayment.SchoolYearComboBox);
            _cashieringManager.InitializeCourseCheckedListBox(this.ctlPayment.CourseCheckedListBox);
            _cashieringManager.InitializeYearLevelCheckedListBox(this.ctlPayment.YearLevelCheckedListBox);

            this.ctlPayment.Select();
            this.ctlPayment.SetFocusOnSearchTextBox();
        }//------------------
コード例 #5
0
        }//-------------------

        //event is raised when the selected index is changed
        private void ctlPaymentOnSemesterSelectedIndexChanged()
        {
            _dateStart = _cashieringManager.GetSemesterDateStart(_cashieringManager.GetSemesterSystemId(this.ctlPayment.SchoolYearComboBox.SelectedIndex,
                                                                                                        this.ctlPayment.SemesterComboBox.SelectedIndex)).ToShortDateString() + " 12:00:00 AM";
            _dateEnd = _cashieringManager.GetSemesterDateEnd(_cashieringManager.GetSemesterSystemId(this.ctlPayment.SchoolYearComboBox.SelectedIndex,
                                                                                                    this.ctlPayment.SemesterComboBox.SelectedIndex)).ToShortDateString() + " 11:59:59 PM";

            _additionalFeeInfo = new CommonExchange.StudentAdditionalFee();
            this.lblParticularDescription.Text = "-";
            this.txtAmount.Clear();
            this.txtAdditionalFeeRemarks.Clear();

            this.ShowSearchResultDialog();

            if (this.ctlPayment.IsForApply)
            {
                this.IsRecordLocked();
            }
        }//----------------------
コード例 #6
0
        //####################################CLASS StudentAdditionalFee EVENTS####################################
        //event is raised when the class is loaded
        private void ClassLoad(object sender, EventArgs e)
        {
            _studentInfo = new CommonExchange.Student();

            _studentInfo = _cashieringManager.GetDetailsStudentInformation(_userInfo, _index, Application.StartupPath.ToString());

            this.Text = "  " + RemoteClient.ProcStatic.GetCompleteNameMiddleInitial(_studentInfo.PersonInfo.LastName,
                                                                                    _studentInfo.PersonInfo.FirstName, _studentInfo.PersonInfo.MiddleName);

            _studentAdditionalFeeInfo     = _cashieringManager.GetDetailsStudentAdditionalFeeByStudent(_index);
            _studentAdditionalFeeInfoTemp = (CommonExchange.StudentAdditionalFee)_studentAdditionalFeeInfo.Clone();

            this.lblParticularDescription.Text   = _studentAdditionalFeeInfo.SchoolFeeParticularInfo.ParticularDescription;
            this.txtAdditionalPaymentAmount.Text = _studentAdditionalFeeInfo.Amount.ToString("N");
            this.txtAdditionalFeeRemarks.Text    = _studentAdditionalFeeInfo.Remarks;

            this.txtAdditionalPaymentAmount.Focus();

            this.IsRecordLocked();
        }//----------------
コード例 #7
0
        }//------------------------

        //event is raised when the mode is changed
        private void ctlPaymentOnModeOptionCheckedChanged(bool forApply)
        {
            this.gbxAdditionalPayment.Visible = this.btnRecord.Visible = this.ctlPayment.IsForApply ? true : false;

            _errProvider.SetError(this.lblParticularDescription, "");
            _errProvider.SetError(this.txtAmount, "");
            _errProvider.SetError(this.pbxChecked, "");

            _additionalFeeInfo = new CommonExchange.StudentAdditionalFee();

            this.txtAmount.Text = String.Empty;
            this.lblParticularDescription.Text = "-";

            if (!String.IsNullOrEmpty(this.ctlPayment.GetSearchString))
            {
                this.ShowSearchResultDialog();
            }

            _selected = 0;

            this.lblSelected.Text = _selected.ToString();

            _dateStart = _dateEnd = String.Empty;

            this.ctlPayment.SemesterComboBox.Items.Clear();

            _cashieringManager.InitializeSchoolYearCombo(this.ctlPayment.SchoolYearComboBox);

            if (this.ctlPayment.IsForApply)
            {
                this.pbxChecked.Visible            = true;
                this.gbxAdditionalPayment.Location = new Point(9, 64);
                this.gbxData.Location = new Point(9, 205);
                this.gbxData.Size     = new Size(590, 481);
                this.dgvList.Location = new Point(6, 40);
                this.dgvList.Size     = new Size(578, 405);

                this.ctlPayment.SchoolYearComboBox.Enabled = false;

                this.pbxUnlock.Visible           = this.pbxLocked.Visible = this.lblStatus.Visible = this.lblLine.Visible =
                    this.lblTextSelected.Visible = this.lblSelected.Visible = true;

                this.dgvList.DataSource = null;

                dgvList.DataSource = _cashieringManager.StudentTableFormatIsForApply;
                RemoteClient.ProcStatic.SetDataGridViewColumns(dgvList, false);
            }
            else
            {
                this.pbxChecked.Visible = false;

                this.gbxData.Location = new Point(9, 64);
                this.gbxData.Size     = new Size(590, 625);
                this.dgvList.Location = new Point(6, 14);
                this.dgvList.Size     = new Size(578, 580);

                this.ctlPayment.SchoolYearComboBox.Enabled = true;

                this.pbxUnlock.Visible           = this.pbxLocked.Visible = this.lblStatus.Visible = this.lblLine.Visible =
                    this.lblTextSelected.Visible = this.lblSelected.Visible = false;

                this.dgvList.DataSource = null;

                dgvList.DataSource = _cashieringManager.StudentTableFormatIsForViewing;
                RemoteClient.ProcStatic.SetDataGridViewColumns(dgvList, false);
            }
        }//---------------------