1. 程式人生 > >5日站立會議

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();
}