private void saveBtn_Click(object sender, EventArgs e) { VipSoft.BLL.MoneyRule mrBll = new BLL.MoneyRule(); MoneyRule mrModel = new MoneyRule(); mrModel.Name = this.f_name.Text.ToString(); mrModel.OneHourMoney = decimal.Parse(this.f_1hour.Text); mrModel.SecondHourMoney = decimal.Parse(this.f_2hour.Text); mrModel.ThirdHourMoney = decimal.Parse(this.f_3hour.Text); mrModel.ThanTime = int.Parse(this.f_thantime.Text); if (this.currentId == 0) { mrBll.Add(mrModel); MessageBox.Show("新增消费规则成功!"); BindList(); } else { mrModel.ID = this.currentId; mrBll.Update(mrModel); MessageBox.Show("修改消费规则成功!"); BindList(); } }