コード例 #1
0
        private void UpdateLabelContracts()
        {
            if (ClientPayments.ClientContractTable.Rows.Count >= 1)
            {
                foreach (DataRow Row in ClientPayments.ClientContractTable.Rows)
                {
                    if (Row["CurrencyTypeID"].ToString() == "1")
                    {
                        ClientPayments.SummMoneyEURContracts();
                        CurrencyContractLabel.Text = "Евро";
                        SumContractLabel.Text      = ClientPayments.CostEUR.ToString("N", nfi1);
                    }

                    if (Row["CurrencyTypeID"].ToString() == "2")
                    {
                        ClientPayments.SummMoneyUSDContracts();
                        CurrencyContractLabel.Text = "Доллар";
                        SumContractLabel.Text      = ClientPayments.CostUSD.ToString("N", nfi1);
                    }

                    if (Row["CurrencyTypeID"].ToString() == "3")
                    {
                        ClientPayments.SummMoneyRURContracts();
                        CurrencyContractLabel.Text = "Рубль(RUR)";
                        SumContractLabel.Text      = ClientPayments.CostRUR.ToString("N", nfi1);
                    }

                    if (Row["CurrencyTypeID"].ToString() == "5")
                    {
                        ClientPayments.SummMoneyBYRContracts();
                        CurrencyContractLabel.Text = "Рубль(BYN)";
                        SumContractLabel.Text      = ClientPayments.CostBYR.ToString("N", nfi1);
                    }
                }
            }
        }