/// /////////////////////////////////////////////////////////////////////////////////////////////////////////

        public void InitializeGUI(TFrmAPMain AMainForm)
        {
            FMainForm = AMainForm;

            TFrmPetraUtils utils = FMainForm.GetPetraUtilsObject();

            utils.SetStatusBarText(grdInvoices, Catalog.GetString("Double-click an invoice to see full details"));
            utils.SetStatusBarText(btnReverseTagged, Catalog.GetString("Click to reverse the tagged items that have already been posted"));
            utils.SetStatusBarText(btnTagAll, Catalog.GetString("Click to tag all the displayed items"));
            utils.SetStatusBarText(btnUntagAll, Catalog.GetString("Click to un-tag all the displayed items"));
            utils.SetStatusBarText(chkToggleFilter, Catalog.GetString("Click to show/hide the Filter/Find panel"));
        }
        private void FocusedRowChanged(System.Object sender, SourceGrid.RowEventArgs e)
        {
            DataRowView[] SelectedGridRow = grdPayments.SelectedDataRowsAsDataRowView;

            if (SelectedGridRow.Length >= 1)
            {
                FSelectedPaymentRow = (AccountsPayableTDSAApPaymentRow)SelectedGridRow[0].Row;

                if (!FSelectedPaymentRow.IsSupplierKeyNull())
                {
                    AApSupplierRow supplier = TFrmAPMain.GetSupplier(FMainDS.AApSupplier, FSelectedPaymentRow.SupplierKey);
                    txtCurrency.Text = supplier.CurrencyCode;

                    if (FCurrencyTable != null)
                    {
                        ACurrencyRow row = (ACurrencyRow)FCurrencyTable.Rows.Find(supplier.CurrencyCode);
                        txtTotalAmount.CurrencyCode = row.CurrencyCode;
                        txtAmountToPay.CurrencyCode = row.CurrencyCode;
                    }

/*
 *                  decimal CurrentRate = TExchangeRateCache.GetDailyExchangeRate(supplier.CurrencyCode,
 *                      FLedgerRow.BaseCurrency,
 *                      DateTime.Today,
 *                      false);
 */
                    txtExchangeRate.NumberValueDecimal = FSelectedPaymentRow.ExchangeRateToBase;
                    cmbPaymentType.SetSelectedString(supplier.PaymentType);

                    if (txtCurrency.Text == FLedgerRow.BaseCurrency)
                    {
                        txtExchangeRate.Enabled       = false;
                        btnLookupExchangeRate.Enabled = false;
                    }
                    else
                    {
                        txtExchangeRate.Enabled       = true;
                        btnLookupExchangeRate.Enabled = true;
                    }
                }

                cmbBankAccount.SetSelectedString(FSelectedPaymentRow.BankAccount, -1);

                FMainDS.AApDocumentPayment.DefaultView.RowFilter = AccountsPayableTDSAApDocumentPaymentTable.GetPaymentNumberDBName() +
                                                                   " = " + FSelectedPaymentRow.PaymentNumber.ToString();

                grdDocuments.DataSource = new DevAge.ComponentModel.BoundDataView(FMainDS.AApDocumentPayment.DefaultView);
                grdDocuments.Refresh();
                grdDocuments.Selection.SelectRow(1, true);
                FocusedRowChangedDetails(null, null);
            }
        }
示例#3
0
        /// /////////////////////////////////////////////////////////////////////////////////////////////////////////


        public void InitializeGUI(TFrmAPMain AMainForm)
        {
            FMainForm = AMainForm;

            TFrmPetraUtils utils = FMainForm.GetPetraUtilsObject();

            utils.SetStatusBarText(grdSuppliers, Catalog.GetString("Double-click a supplier to see the transaction history"));
            utils.SetStatusBarText(btnCreateCreditNote, Catalog.GetString("Click to create a credit note for the selected supplier"));
            utils.SetStatusBarText(btnCreateInvoice, Catalog.GetString("Click to create an invoice for the selected supplier"));
            utils.SetStatusBarText(btnEditDetails, Catalog.GetString("Click to edit the details for the selected supplier"));
            utils.SetStatusBarText(btnNewSupplier, Catalog.GetString("Click to create a new supplier"));
            //utils.SetStatusBarText(btnSupplierTransactions, Catalog.GetString("Click to view the transaction history for the selected supplier"));
            utils.SetStatusBarText(chkToggleFilter, Catalog.GetString("Click to show/hide the Filter/Find panel"));
        }
        /// /////////////////////////////////////////////////////////////////////////////////////////////////////////


        public void InitializeGUI(TFrmAPMain AMainForm)
        {
            FMainForm = AMainForm;

            TFrmPetraUtils utils = FMainForm.GetPetraUtilsObject();
            utils.SetStatusBarText(grdSuppliers, Catalog.GetString("Double-click a supplier to see the transaction history"));
            utils.SetStatusBarText(btnCreateCreditNote, Catalog.GetString("Click to create a credit note for the selected supplier"));
            utils.SetStatusBarText(btnCreateInvoice, Catalog.GetString("Click to create an invoice for the selected supplier"));
            utils.SetStatusBarText(btnEditDetails, Catalog.GetString("Click to edit the details for the selected supplier"));
            utils.SetStatusBarText(btnNewSupplier, Catalog.GetString("Click to create a new supplier"));
            //utils.SetStatusBarText(btnSupplierTransactions, Catalog.GetString("Click to view the transaction history for the selected supplier"));
            utils.SetStatusBarText(chkToggleFilter, Catalog.GetString("Click to show/hide the Filter/Find panel"));
        }
        /// /////////////////////////////////////////////////////////////////////////////////////////////////////////

        public void InitializeGUI(TFrmAPMain AMainForm)
        {
            FMainForm = AMainForm;

            TFrmPetraUtils utils = FMainForm.GetPetraUtilsObject();
            utils.SetStatusBarText(grdInvoices, Catalog.GetString("Double-click an invoice to see full details"));
            utils.SetStatusBarText(btnApproveTagged, Catalog.GetString("Click to approve all the tagged items"));
            utils.SetStatusBarText(btnPayTagged, Catalog.GetString("Click to pay or part pay all the tagged items"));
            utils.SetStatusBarText(btnPostTagged, Catalog.GetString("Click to post all the tagged items"));
            utils.SetStatusBarText(btnReverseTagged, Catalog.GetString("Click to reverse the tagged items that have already been posted"));
            utils.SetStatusBarText(btnTagAll, Catalog.GetString("Click to tag all the displayed items"));
            utils.SetStatusBarText(btnUntagAll, Catalog.GetString("Click to un-tag all the displayed items"));
            utils.SetStatusBarText(chkToggleFilter, Catalog.GetString("Click to show/hide the Filter/Find panel"));
        }