private void grdLookUpEditCreditAccount_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            if (e.Button.Index.Equals(1))
            {
                var frmDetail = new FrmXtraAccountDetail();
                frmDetail.ActionMode = TSD.Enum.ActionModeEnum.AddNew;
                if (frmDetail.ShowDialog() == DialogResult.OK)
                {
                    _accountsPresenter.DisplayActive();

                    var lstAccounts = grdLookUpEditCreditAccount.Properties.DataSource as List <AccountModel>;
                    if (lstAccounts != null)
                    {
                        grdLookUpEditCreditAccount.EditValue = lstAccounts.OrderByDescending(o => o.AccountId).First().AccountCode;
                    }
                }
            }
        }
        private void grdLookUpCapitalAccount_Properties_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            if (e.Button.Kind == DevExpress.XtraEditors.Controls.ButtonPredefines.Plus)
            {
                using (var frmDetail = new FrmXtraAccountDetail())
                {
                    frmDetail.ActionMode = ActionModeEnum.AddNew;
                    if (frmDetail.ShowDialog() == DialogResult.OK)
                    {
                        _accountsPresenter.DisplayActive();

                        var lstDetails = grdLookUpCapitalAccount.Properties.DataSource as List <AccountModel>;
                        if (lstDetails != null)
                        {
                            grdLookUpCapitalAccount.EditValue = lstDetails.OrderByDescending(o => o.AccountId).FirstOrDefault().AccountCode;
                        }
                    }
                }
            }
        }
        private void grdLockUpAccountID_Properties_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            if (e.Button.Kind == DevExpress.XtraEditors.Controls.ButtonPredefines.Plus)
            {
                using (var frmAccount = new FrmXtraAccountDetail())
                {
                    frmAccount.ActionMode = ActionModeEnum.AddNew;

                    if (frmAccount.ShowDialog() == DialogResult.OK)
                    {
                        if (frmAccount.DialogResult == DialogResult.OK)
                        {
                            _accountsPresenter.DisplayActive();

                            var lstAccount = (List <AccountModel>)grdLockUpAccountID.Properties.DataSource;
                            if (lstAccount != null && lstAccount.Count > 0)
                            {
                                AccountCode = lstAccount.OrderByDescending(o => o.AccountId).FirstOrDefault().AccountCode;
                            }
                        }
                    }
                }
            }
        }