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

        //####################################END BUTTON btnUpdateAdditionalPayment EVENTS####################################

        //####################################BUTTON btnDeleteAdditionalPayment EVENTS####################################
        //event is raised when the the control is clicked
        private void btnDeleteAdditionalPaymentClick(object sender, EventArgs e)
        {
            try
            {
                if (this.ValidateControls())
                {
                    String strMsg = "Are you sure you want to delete the student additional payment?";

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

                    if (msgResult == DialogResult.Yes)
                    {
                        strMsg = "The student additional payment has been successfully deleted.";

                        this.Cursor = Cursors.WaitCursor;

                        _cashieringManager.DeleteStudentAdditionalFee(_userInfo, _studentAdditionalFeeInfo, true);

                        this.Cursor = Cursors.Arrow;

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

                        _hasDeleted = true;

                        _hasUpdatedForClosing = true;

                        this.Close();
                    }
                }
            }
            catch (Exception ex)
            {
                RemoteClient.ProcStatic.ShowErrorDialog(ex.Message, "Error Recording");
            }
        }//---------------------------