private void ShowInfo(int _id) { BLL.member_level bll = new BLL.member_level(); Model.member_level model = bll.GetModel(_id); txtName.Text = model.name; txtAmount.Text = model.amount.ToString(); txtAddTime.Text = model.add_time.Value.ToString("yyyy-MM-dd HH:mm:ss"); }
private bool DoEdit(int _id) { bool result = false; BLL.member_level bll = new BLL.member_level(); Model.member_level model = bll.GetModel(_id); model.name = txtName.Text.Trim(); model.amount = Utils.StrToDecimal(txtAmount.Text, 0); model.add_time = Utils.StrToDateTime(txtAddTime.Text.Trim()); if (bll.Update(model)) { AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改会员级别:" + model.name); //记录日志 result = true; } return(result); }