private bool DoEdit(int id) { BLL.common_examination bll = new BLL.common_examination(); Model.common_examination model = bll.GetModel(this.id); model.group_id = (int)EnumCollection.examination_group.心理测试; model.name = Convert.ToString(txtname.Text); model.parent_id = this.chapter; model.nums = 0; model.score = 0; model.info = this.txtinfo.Text.Trim(); model.descript = this.txtdescript.Text.Trim(); model.qrcode = "/QrCode.aspx?type=quest&id=" + id; model.add_time = System.DateTime.Now; if (bll.Update(model)) { AddAdminLog(EnumCollection.ActionEnum.Modify.ToString(), "修改问卷信息,主键:" + id); //记录日志 return(true); } else { return(false); } }
//保存 protected void btnSubmit_Click(object sender, EventArgs e) { ChkAdminLevel("_ybd_common_examination", EnumCollection.ActionEnum.Modify.ToString()); //检查权限 BLL.common_examination bll = new BLL.common_examination(); Model.common_examination model = bll.GetModel(this.id); model.group_id = Convert.ToInt32(txtgroup_id.Text); model.name = Convert.ToString(txtname.Text); model.parent_id = Convert.ToInt32(txtparent_id.Text); model.nums = Convert.ToInt32(txtnums.Text); model.score = Convert.ToInt32(txtscore.Text); model.info = Convert.ToString(txtinfo.Text); model.descript = Convert.ToString(txtdescript.Text); model.qrcode = Convert.ToString(txtqrcode.Text); model.add_time = Convert.ToDateTime(txtadd_time.Text); if (bll.Update(model)) { AddAdminLog(EnumCollection.ActionEnum.Modify.ToString(), "修改试卷信息信息,主键:" + id); //记录日志 JscriptMsg("修改试卷信息信息成功!", "Manage.aspx"); } else { JscriptMsg("保存过程中发生错误!", ""); } }
private void BindInfo() { BLL.common_examination bll = new BLL.common_examination(); Model.common_examination model = bll.GetModel(this.id); if (model == null) { JscriptMsg("信息不存在或已被删除!", "back"); return; } txtgroup_id.Text = model.group_id + ""; txtname.Text = model.name + ""; txtparent_id.Text = model.parent_id + ""; txtnums.Text = model.nums + ""; txtscore.Text = model.score + ""; txtinfo.Text = model.info + ""; txtdescript.Text = model.descript + ""; txtqrcode.Text = model.qrcode + ""; txtadd_time.Text = model.add_time + ""; }
private void ShowInfo(int _id) { BLL.common_examination bll = new BLL.common_examination(); Model.common_examination model = bll.GetModel(this.id); if (model == null) { JscriptMsg("信息不存在或已被删除!", "back"); return; } if (model == null) { JscriptMsg("信息不存在或已被删除!", "back"); return; } txtname.Text = model.name + ""; txtnums.Text = model.nums + ""; txtscore.Text = model.score + ""; }
private bool DoEdit(int id) { BLL.common_examination bll = new BLL.common_examination(); Model.common_examination model = bll.GetModel(this.id); model.group_id = (int)EnumCollection.examination_group.课堂作业; model.name = Convert.ToString(txtname.Text); model.parent_id = this.chapter; model.nums = Convert.ToInt32(txtnums.Text); model.score = Convert.ToInt32(txtscore.Text); model.qrcode = "/QrCode.aspx?type=test&id=" + id; model.add_time = System.DateTime.Now; if (bll.Update(model)) { addRow = model.id; AddAdminLog(EnumCollection.ActionEnum.Modify.ToString(), "修改课堂作业信息,主键:" + id); //记录日志 return(true); } else { return(false); } }