Money去哪了- 每日站立会议

textBox1.Text = Convert.ToString(listView1.Items.Count); //刷新金额求和

double MoneySum = 0;

for (int i = 0; i <= listView1.Items.Count - 1; i++)

{

ListViewItem Item = listView1.Items[i]; MoneySum += Convert.ToDouble(Item.SubItems[2].Text); } textBox2.Text = Convert.ToString(MoneySum);

//刷新消费情况总和

textBox3.Text = "0";

textBox4.Text = "0";

textBox5.Text = "0";

textBox6.Text = "0";

textBox7.Text = "0";

textBox8.Text = "0";

for (int i = 0; i <= listView1.Items.Count - 1; i++)

{

ListViewItem Item = listView1.Items[i]; if (listView1.Items[i].SubItems[1].Text == "日常用品")

textBox3.Text = (Convert.ToDouble(textBox3.Text) + Convert.ToDouble(listView1.Items[i].SubItems[2].Text)).ToString(); if (listView1.Items[i].SubItems[1].Text == "学习用品") textBox4.Text = (Convert.ToDouble(textBox4.Text) + Convert.ToDouble(listView1.Items[i].SubItems[2].Text)).ToString(); if (listView1.Items[i].SubItems[1].Text == "话费") textBox5.Text = (Convert.ToDouble(textBox5.Text) + Convert.ToDouble(listView1.Items[i].SubItems[2].Text)).ToString(); if (listView1.Items[i].SubItems[1].Text == "饮食") textBox6.Text = (Convert.ToDouble(textBox6.Text) + Convert.ToDouble(listView1.Items[i].SubItems[2].Text)).ToString(); if (listView1.Items[i].SubItems[1].Text == "衣服") textBox7.Text = (Convert.ToDouble(textBox7.Text) + Convert.ToDouble(listView1.Items[i].SubItems[2].Text)).ToString(); if (listView1.Items[i].SubItems[1].Text == "其他") textBox8.Text = (Convert.ToDouble(textBox8.Text) + Convert.ToDouble(listView1.Items[i].SubItems[2].Text)).ToString(); } }

posted @ 2018-12-09 21:50  阿木啊vov  阅读(121)  评论(0编辑  收藏  举报