private void ShowInfo(int _id) { tbl_Seckill bll = new tbl_Seckill(); bll.GetModel(_id); this.txt_time1.Value = bll.StartTime.ToString(); this.txt_time2.Value = bll.EndTime.ToString(); this.txttitle.Text = bll.Name; this.pid.SelectedValue = bll.ProductID.ToString(); this.text_num.Value = bll.LimitQTY.ToString(); }
private bool DoEdit(int _id) { bool result = false; tbl_Seckill bll = new tbl_Seckill(); bll.GetModel(_id); bll.StartTime = Convert.ToDateTime(txt_time1.Value.Trim()); bll.EndTime = Convert.ToDateTime(txt_time2.Value.Trim()); bll.Name = this.txttitle.Text.Trim(); bll.LimitQTY = Convert.ToInt32(this.text_num.Value.Trim()); bll.ProductID = Convert.ToInt32(this.pid.SelectedValue.ToString()); if (bll.Update()) { // mym.AddAdminLog("修改", "修改商品类别:" + txttitle.Text); //记录日志 result = true; } return(result); }