5日站立会议

public partial class Form新建账目 : Form
{
public Form新建账目()
{
InitializeComponent();
}
bool flag = false;
private void button8_Click(object sender, EventArgs e)
{
Test._f.Close();
}

private void button7_Click(object sender, EventArgs e)
{
Form功能选择 f = new Form功能选择();
f.Show();
flag = true;
this.Close();
}
double sum = 0;
int count = 0;
private void button1_Click(object sender, EventArgs e)
{
try
{
sum += Convert.ToDouble(textBox2.Text);
}
catch (Exception)
{
MessageBox.Show("当前账目无法成功加入,请重新输入项目!!!");
textBox1.Clear();
textBox2.Clear();
comboBox1.Text = "";
textBox1.Focus();
return;
}
listBox1.Items.Add(textBox1.Text + "\t" + comboBox1.SelectedItem.ToString() + "\t" + textBox2.Text);

count++;
textBox3.Text = count.ToString();
textBox4.Text = sum.ToString();

textBox1.Clear();
textBox2.Clear();
comboBox1.Text = "";
textBox1.Focus();
}

猜你喜欢

转载自www.cnblogs.com/chenchen21/p/10072935.html