}//----------------------------------

        //this procedure will insert chart of account information
        public void InsertChartOfAccounts(CommonExchange.SysAccess userInfo, CommonExchange.ChartOfAccount chartOfAccount)
        {
            using (RemoteClient.RemCntAccountingManager remClient = new RemoteClient.RemCntAccountingManager())
            {
                remClient.InsertChartOfAccounts(userInfo, ref chartOfAccount);
            }

            if (_chartOfAccountsTable != null)
            {
                DataRow newRow = _chartOfAccountsTable.NewRow();

                newRow["sysid_account"]                  = chartOfAccount.AccountSysId;
                newRow["account_code"]                   = chartOfAccount.AccountCode;
                newRow["account_name"]                   = chartOfAccount.AccountName;
                newRow["is_debit_side_increase"]         = chartOfAccount.IsDebitSideIncrease;
                newRow["is_active_account"]              = chartOfAccount.IsActiveAccount;
                newRow["accounting_category_id"]         = chartOfAccount.AccountingCategoryInfo.AccountingCategoryId;
                newRow["category_description"]           = chartOfAccount.AccountingCategoryInfo.CategoryDescription;
                newRow["sysid_account_summary"]          = chartOfAccount.SummaryAccount.AccountSysId;
                newRow["account_code_summary"]           = chartOfAccount.SummaryAccount.AccountCode;
                newRow["account_name_summary"]           = chartOfAccount.SummaryAccount.AccountName;
                newRow["is_debit_side_increase_summary"] = chartOfAccount.SummaryAccount.IsDebitSideIncrease;
                newRow["is_active_account_summary"]      = chartOfAccount.SummaryAccount.IsActiveAccount;
                newRow["accounting_category_id_summary"] = chartOfAccount.SummaryAccount.AccountingCategoryInfo.AccountingCategoryId;
                newRow["category_description_summary"]   = chartOfAccount.SummaryAccount.AccountingCategoryInfo.CategoryDescription;

                _chartOfAccountsTable.Rows.Add(newRow);
            }
        }//------------------
        }//-------------------------

        //this procedure will select chart of accounts
        public void SelectChartOfAccountsArrangedList(CommonExchange.SysAccess userInfo, String queryString,
                                                      String summaryAccount, String accountingCategoryIdList, Boolean isActiveAccount)
        {
            using (RemoteClient.RemCntAccountingManager remClient = new RemoteClient.RemCntAccountingManager())
            {
                _chartOfAccountsTable = remClient.SelectChartOfAccounts(userInfo, queryString, summaryAccount, accountingCategoryIdList, isActiveAccount);
            }
        }//------------------------
        }//---------------------

        //this function will determine if the account code already exist
        public Boolean IsExistsAccountCodeChartOfAccount(CommonExchange.SysAccess userInfo, String accountSysId, String accountCode, String summaryAccount)
        {
            Boolean isExist = false;

            using (RemoteClient.RemCntAccountingManager remClient = new RemoteClient.RemCntAccountingManager())
            {
                isExist = remClient.IsExistsAccountCodeChartOfAccount(userInfo, accountSysId, accountCode, summaryAccount);
            }

            return(isExist);
        }//--------------------
        }//---------------------

        //this function will determine if the accounting category is valid for summary account
        public Boolean IsValidCategoryBySummaryAccountChartOfAccount(CommonExchange.SysAccess userInfo, String accountingCategoryId, String summaryAccount)
        {
            Boolean isValid = false;

            using (RemoteClient.RemCntAccountingManager remClient = new RemoteClient.RemCntAccountingManager())
            {
                isValid = remClient.IsValidCategoryBySummaryAccountChartOfAccount(userInfo, accountingCategoryId, summaryAccount);
            }

            return(isValid);
        }//---------------------
        }//------------------------

        //this function will get details of each chart of account information
        public CommonExchange.ChartOfAccount GetDetailsChartOfAccount(CommonExchange.SysAccess userInfo, String accountSysId)
        {
            CommonExchange.ChartOfAccount chartOfAccountInfo = new CommonExchange.ChartOfAccount();

            using (RemoteClient.RemCntAccountingManager remClient = new RemoteClient.RemCntAccountingManager())
            {
                chartOfAccountInfo = remClient.SelectBySysIDAccountChartOfAccounts(userInfo, accountSysId);
            }

            return(chartOfAccountInfo);
        }//---------------------
        }//---------------------------

        //this procedure will initialize class
        private void InitializeClass(CommonExchange.SysAccess userInfo)
        {
            //get the server date and time
            using (RemoteClient.RemCntBaseManager remClient = new RemoteClient.RemCntBaseManager())
            {
                _serverDateTime = remClient.GetServerDateTime(userInfo);
            }//---------------------

            //get class Data Set
            using (RemoteClient.RemCntAccountingManager remClient = new RemoteClient.RemCntAccountingManager())
            {
                _classDataSet = remClient.GetDataSetForAccounting(userInfo);
            } //--------------------
        }     //---------------------------
        }//------------------

        //this procedure will update chart of account information
        public void UpdateChartOfAccounts(CommonExchange.SysAccess userInfo, CommonExchange.ChartOfAccount chartOfAccount)
        {
            using (RemoteClient.RemCntAccountingManager remClient = new RemoteClient.RemCntAccountingManager())
            {
                remClient.UpdateChartOfAccounts(userInfo, chartOfAccount);
            }

            if (_chartOfAccountsTable != null)
            {
                Int32 index = 0;

                foreach (DataRow accountRow in _chartOfAccountsTable.Rows)
                {
                    if (String.Equals(chartOfAccount.AccountSysId, RemoteServerLib.ProcStatic.DataRowConvert(accountRow, "sysid_account", String.Empty)))
                    {
                        DataRow editRow = _chartOfAccountsTable.Rows[index];

                        editRow.BeginEdit();

                        editRow["sysid_account"]                  = chartOfAccount.AccountSysId;
                        editRow["account_code"]                   = chartOfAccount.AccountCode;
                        editRow["account_name"]                   = chartOfAccount.AccountName;
                        editRow["is_debit_side_increase"]         = chartOfAccount.IsDebitSideIncrease;
                        editRow["is_active_account"]              = chartOfAccount.IsActiveAccount;
                        editRow["accounting_category_id"]         = chartOfAccount.AccountingCategoryInfo.AccountingCategoryId;
                        editRow["category_description"]           = chartOfAccount.AccountingCategoryInfo.CategoryDescription;
                        editRow["sysid_account_summary"]          = chartOfAccount.SummaryAccount.AccountSysId;
                        editRow["account_code_summary"]           = chartOfAccount.SummaryAccount.AccountCode;
                        editRow["account_name_summary"]           = chartOfAccount.SummaryAccount.AccountName;
                        editRow["is_debit_side_increase_summary"] = chartOfAccount.SummaryAccount.IsDebitSideIncrease;
                        editRow["is_active_account_summary"]      = chartOfAccount.SummaryAccount.IsActiveAccount;
                        editRow["accounting_category_id_summary"] = chartOfAccount.SummaryAccount.AccountingCategoryInfo.AccountingCategoryId;
                        editRow["category_description_summary"]   = chartOfAccount.SummaryAccount.AccountingCategoryInfo.CategoryDescription;

                        editRow.EndEdit();

                        break;
                    }

                    index++;
                }
            }
        }//---------------------