}//---------------------------- //###########################################END TEXTBOX txtSearch EVENTS##################################################### //###########################################BUTTON btnShowResult EVENTS##################################################### //event is raised when the control is clicked private void btnShowResultClick(object sender, EventArgs e) { this.Cursor = Cursors.WaitCursor; String accountCreditList = String.Empty; if (_accountCreditSysIdList.Length >= 2) { accountCreditList = _accountCreditSysIdList.ToString().Substring(0, _accountCreditSysIdList.Length - 2); } if (this.chkIncludeDate.Checked) { String dateStart, dateEnd = String.Empty; dateStart = this.dtpStart.Value.ToShortDateString() + " 12:00:00 AM"; dateEnd = this.dtpEnd.Value.ToShortDateString() + " 11:59:59 PM"; if (DateTime.Compare(DateTime.Parse(dateStart), DateTime.Parse(dateEnd)) < 0) { _cashieringManager.InitializeCashReceiptQueryListView(this.lsvCashReceiptQuery, _userInfo, this.txtSearch.Text, dateStart, dateEnd, accountCreditList); } else { MessageBox.Show("Date start must me greater than date end.", "Invalid Input", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { _cashieringManager.InitializeCashReceiptQueryListView(this.lsvCashReceiptQuery, _userInfo, this.txtSearch.Text, String.Empty, String.Empty, accountCreditList); } this.Cursor = Cursors.Arrow; }//----------------------------