}//--------------------- //##################################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"); } }//--------------------