public void queryCardType(int cardType) { VipSoft.BLL.CardType ctBll = new VipSoft.BLL.CardType(); VipSoft.Model.CardType ctModel = ctBll.GetModel(cardType); this.IsExpenseGoods.Checked = ctModel.IsExpenseGoods; this.IsExpensePoint.Checked = ctModel.IsExpensePoint; this.IsPointAuto.Checked = ctModel.IsPointAuto; this.id.Text = ctModel.ID.ToString(); }
private void save_Click(object sender, EventArgs e) { if (this.id.Text != null && this.id.Text != "") { VipSoft.BLL.CardType ctBll = new VipSoft.BLL.CardType(); VipSoft.Model.CardType ctModel = ctBll.GetModel(int.Parse(this.id.Text)); ctModel.IsPointAuto = this.IsPointAuto.Checked == true ? true : false; ctModel.IsExpensePoint = this.IsExpensePoint.Checked == true ? true : false; ctModel.IsExpenseGoods = this.IsExpenseGoods.Checked == true ? true : false; if (ctBll.Update(ctModel)) { MessageBox.Show("保存成功!"); } } else { MessageBox.Show("请先选择卡类型!"); } }