Ejemplo n.º 1
0
        }//---------------------

        //this function will get details of each account summary information
        public CommonExchange.SummaryAccount GetDetailsSummaryOfAccount(String accountSysId)
        {
            CommonExchange.SummaryAccount summaryAccountInfo = new CommonExchange.SummaryAccount();

            if (_chartOfAccountsTable != null)
            {
                String    strFilter = "sysid_account = '" + accountSysId + "'";
                DataRow[] selectRow = _chartOfAccountsTable.Select(strFilter);

                foreach (DataRow accountRow in selectRow)
                {
                    summaryAccountInfo.AccountCode  = RemoteServerLib.ProcStatic.DataRowConvert(accountRow, "account_code", String.Empty);
                    summaryAccountInfo.AccountName  = RemoteServerLib.ProcStatic.DataRowConvert(accountRow, "account_name", String.Empty);
                    summaryAccountInfo.AccountSysId = RemoteServerLib.ProcStatic.DataRowConvert(accountRow, "sysid_account", String.Empty);
                    summaryAccountInfo.AccountingCategoryInfo.AccountingCategoryId =
                        RemoteServerLib.ProcStatic.DataRowConvert(accountRow, "accounting_category_id", String.Empty);
                    summaryAccountInfo.AccountingCategoryInfo.CategoryDescription =
                        RemoteServerLib.ProcStatic.DataRowConvert(accountRow, "category_description", String.Empty);
                    summaryAccountInfo.IsDebitSideIncrease = RemoteServerLib.ProcStatic.DataRowConvert(accountRow, "is_debit_side_increase", false);
                    summaryAccountInfo.IsActiveAccount     = RemoteServerLib.ProcStatic.DataRowConvert(accountRow, "is_active_account", false);

                    break;
                }
            }

            return(summaryAccountInfo);
        }//---------------------
Ejemplo n.º 2
0
        }//-------------------

        //##################################END BUTTON btnSearchSummaryAccount EVENTS##########################################################

        //##################################BUTTON btnClearSummaryAccount EVENTS##########################################################
        //event is raised when the control is clicked
        private void btnClearSummaryAccountClick(object sender, EventArgs e)
        {
            String strMsg = "Are you sure you want to delete the summary account information?";

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

            if (msgResult == DialogResult.Yes)
            {
                strMsg = "The summary account information has been successfully deleted.";

                CommonExchange.SummaryAccount summaryAccountInfo = new CommonExchange.SummaryAccount();

                _chartOfAccountInfo.SummaryAccount = summaryAccountInfo;

                this.AssignControlValues();

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