【发布时间】:2018-07-10 20:03:52
【问题描述】:
你好,我想在这段代码的datagridview中添加数值数据;
int tsp;
double mf, tcp, interest, disc;
int a, b;
double MP;
if (comboBox1.Text == "Deferred Cash Payment in 2 years at 0% interest")
{
a = int.Parse(textBox3.Text);
b = int.Parse(textBox4.Text);
tsp = a * b;
mf = tsp * 0.07;
tcp = mf + tsp;
label8.Text = tcp.ToString("₱000,000.00");
MP = tcp / 24;
MP变量有数据;我想用 24 行的循环语句在 datagridview 中显示它。我想要这样的输出:
例如
Days Amount
1 10,000
2 10,000
3 10,000
4 10,000
5 10,000
..
24 10,000
【问题讨论】:
-
你的问题是什么?
-
不是个好主意
if (comboBox1.Text == "Deferred Cash Payment in 2 years at 0% interest"),最好获取每行的组合索引或标签。 -
我如何在 datagridview 中获得此天数 1 10,000 2 10,000 3 10,000 4 10,000 5 10,000 .. 24 10,000
-
我想这可能对你有帮助:stackoverflow.com/questions/3923082/…
标签: c#