コード例 #1
0
 private void AddBT_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(DescriptionTB.Text) && string.IsNullOrEmpty(ValueTB.Text))
     {
         MessageBox.Show("You need to fill the boxes!");
     }
     else
     {
         float  value       = float.Parse(ValueTB.Text);
         string date        = this.dateTimePicker1.Value.ToString();
         string description = DescriptionTB.Text;
         bm.AddConstantIncome(date, description, value);
         MessageBox.Show("ConstantIncome is added!");
         DescriptionTB.Text = "";
         ValueTB.Text       = "";
     }
 }