public void Update(String fromCurrencyCode, String currencyName, Int32 fiscalperiodNo, Decimal exchangeRate)
        {
            FinanceExchangeRateGW.Update(fiscalperiodNo, fromCurrencyCode, "RMB", exchangeRate);
            DataRow drCurrent = this[fiscalperiodNo, fromCurrencyCode];

            drCurrent["ExchangeRate"] = exchangeRate;
            drCurrent["Currency"]     = currencyName;
        }
        public void Insert(String fromCurrencyCode, String currencyName, Int32 FiscalperiodNo, Decimal ExchangeRate)
        {
            FinanceExchangeRateGW.Insert(FiscalperiodNo, fromCurrencyCode, "RMB", ExchangeRate);
            DataRow row = Table.NewRow();

            row["FiscalPeriod"]     = FiscalperiodNo;
            row["FromCurrencyCode"] = fromCurrencyCode;
            row["ToCurrencyCode"]   = "RMB";
            row["Currency"]         = currencyName;
            row["Catalog"]          = 1;
            row["ExchangeRate"]     = ExchangeRate;
            Table.Rows.Add(row);
        }
Example #3
0
        public DollarExchangeRateForm()
        {
            InitializeComponent();
            DataSet   ds    = FinanceExchangeRateGW.findFiscalPeriodAll();
            DataTable table = ds.Tables[0];

            for (int i = 0; i < table.Rows.Count; i++)
            {
                cbAccountPeroid.Properties.Items.Add(table.Rows[i]["FiscalperiodNo"]);
            }
            ds    = CurrencyGW.GetFixed("fixed");
            table = ds.Tables[0];
            for (int i = 0; i < table.Rows.Count; i++)
            {
                cbCurrency.Properties.Items.Add(new GrpCurrency(Convert.ToInt32(table.Rows[i]["Id"]), table.Rows[i]["CurrencyCode"].ToString(), table.Rows[i]["CurrencyNo"].ToString(), table.Rows[i]["Currency"].ToString(), Convert.ToBoolean(table.Rows[i]["Fixed"])));
            }
            tFinance_USDexchangerate        = new DollarExchangeRateTM(FinanceExchangeRateGW.FindToRMB(DollarExchangeRateTM.TableName));
            grdcntrlExchangeRate.DataSource = tFinance_USDexchangerate.Table;
        }
 public void Delete(String fromCurrencyCode, Int32 fiscalperiodNo)
 {
     FinanceExchangeRateGW.Delete(fiscalperiodNo, fromCurrencyCode, "RMB");
     Table.Rows.Remove(this[fiscalperiodNo, fromCurrencyCode]);
 }