예제 #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text.Trim() == "")
     {
         MessageBox.Show("请输入类型", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         textBox1.Focus();
     }
     else if (fbll.addType(textBox1.Text.Trim()))
     {
         combobox.DataSource  = fbll.initShouZhiType();
         combobox.ValueMember = "proj_name";
         this.Dispose();
     }
 }
예제 #2
0
        private void EditCount_Load(object sender, EventArgs e)
        {
            //初始化收支类型
            combShouZhiType.DataSource   = fbll.initShouZhiType();
            combShouZhiType.ValueMember  = "proj_name";
            dateTimePicker1.CustomFormat = "yyyy年MM月dd日 hh:mm";
            dateTimePicker1.Format       = DateTimePickerFormat.Custom;

            dateTimePicker1.Value = count.Count_data;
            combType.Text         = count.Count_type;
            combShouZhiType.Text  = count.Count_proj;
            txtMoney.Text         = count.Count_money.ToString();
            txtRemark.Text        = count.Count_remark;
        }
예제 #3
0
 private void Edit_Load(object sender, EventArgs e)
 {
     dateTimePicker1.CustomFormat = "yyyy年MM月dd日 hh:mm dddd";
     dateTimePicker1.Format       = DateTimePickerFormat.Custom;
     //初始化收支类型
     comShouZhiType.DataSource  = fbll.initShouZhiType();
     comShouZhiType.ValueMember = "proj_name";
     if (combType.Items.Count > 0)
     {
         combType.SelectedIndex = 0;
     }
     if (comShouZhiType.Items.Count > 0)
     {
         comShouZhiType.SelectedIndex = 0;
     }
 }