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

        //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);
            }
        }//------------------
Exemple #2
0
        //###############################################CLASS ChartOfAccount EVENTS##################################################
        //event is raised when the class is loaded
        protected virtual void ClassLoad(object sender, EventArgs e)
        {
            _chartOfAccountInfo = new CommonExchange.ChartOfAccount();

            _chartOfAccountManager.InitializeAccountCategoryComboBox(this.cboAccountCategory);

            _chartOfAccountInfo.IsActiveAccount = true;
        }//--------------------
        }//------------------------

        //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);
        }//---------------------
Exemple #4
0
        public ChartOfAccountUpdate(CommonExchange.SysAccess userInfo, CommonExchange.ChartOfAccount chartOfAccountInfo, ChartOfAccountLogic chartOfAccountManager)
            : base(userInfo, chartOfAccountManager)
        {
            this.InitializeComponent();

            _chartOfAccountInfo     = chartOfAccountInfo;
            _tempChartOfAccountInfo = (CommonExchange.ChartOfAccount)chartOfAccountInfo;

            this.FormClosing     += new FormClosingEventHandler(ClassClossing);
            this.btnClose.Click  += new EventHandler(btnCloseClick);
            this.btnUpdate.Click += new EventHandler(btnUpdateClick);
        }
        }//------------------------

        //###########################################END BUTTON btnPrint EVENTS#####################################################

        #endregion

        #region Programmer's Defined Void Procedures
        //this procedure will show the search credit Entry
        private void ShowSearchCreditEntry(Boolean allowMultipleInsert)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;

                using (ChartOfAccountSearchedOnTextBoxList frmSearch = new ChartOfAccountSearchedOnTextBoxList(_userInfo, _cashieringManager))
                {
                    frmSearch.PrimaryIndex        = 4;
                    frmSearch.AdoptGridSize       = false;
                    frmSearch.AllowMultipleInsert = allowMultipleInsert;
                    frmSearch.ShowAllowMultipleInsert(true);
                    frmSearch.ShowDialog(this);

                    if (frmSearch.HasSelected)
                    {
                        _chartOfAccountInfo = _cashieringManager.GetChartOfAccountInformation(frmSearch.PrimaryId);

                        _accountCreditSysIdList += _chartOfAccountInfo.AccountSysId + ", ";

                        this.txtCreditEntry.Text += (!String.IsNullOrEmpty(_chartOfAccountInfo.AccountSysId) ? _chartOfAccountInfo.AccountName : String.Empty) + ", ";

                        _chartOfAccountInfo = new CommonExchange.ChartOfAccount();

                        allowMultipleInsert = frmSearch.AllowMultipleInsert;
                    }
                    else
                    {
                        allowMultipleInsert = false;
                    }
                }

                this.Cursor = Cursors.Arrow;
            }
            catch (Exception ex)
            {
                RemoteClient.ProcStatic.ShowErrorDialog(ex.Message, "Error Loading");
            }

            if (allowMultipleInsert)
            {
                this.ShowSearchCreditEntry(allowMultipleInsert);
            }
        }//----------------------------------
        }//------------------

        //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++;
                }
            }
        }//---------------------
        //###########################################Class CashReceiptQueryReportControl EVENTS#####################################################
        //event is raised when the class is loaded
        private void ClassLoad(object sender, EventArgs e)
        {
            _chartOfAccountInfo = new CommonExchange.ChartOfAccount();

            this.txtSearch.Focus();
        }//---------------------------