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

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

        //###########################################LISTVIEW lsbBankDeposit EVENTS#####################################################
        //event is raised when the control is clicked
        private void lsvBankDepositsMouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                if ((this.lsvBankDeposits.Items.Count > 0 && this.lsvBankDeposits.FocusedItem != null) && this.lsvBankDeposits.GetItemAt(e.X, e.Y) != null)
                {
                    String dateStart, dateEnd = String.Empty;

                    dateStart = this.dtpStart.Value.ToShortDateString() + " 12:00:00 AM";
                    dateEnd   = this.dtpEnd.Value.ToShortDateString() + " 11:59:59 PM";

                    String accountSysId = this.lsvBankDeposits.GetItemAt(e.X, e.Y).SubItems[5].Text;

                    if (!String.IsNullOrEmpty(accountSysId))
                    {
                        using (BreakDownBankDepositUpdate frmUpdate = new BreakDownBankDepositUpdate(_userInfo,
                                                                                                     _cashieringManager.GetDetailsBreakDownBankDepositInformation(accountSysId), _cashieringManager, dateStart, dateEnd))
                        {
                            frmUpdate.ShowDialog(this);

                            if (frmUpdate.HasUpdated || frmUpdate.HasDeleted)
                            {
                                this.SearchForCashReciptDetails(dateStart, dateEnd);
                            }
                        }
                    }
                }
            }
        }//------------------