protected void btnSubmit_Click(object sender, EventArgs e) { if (Session["ZT_ADMIN"] == null) { Response.Redirect("Login.aspx"); } else { if (Request["LiuYanID"] + "" == "") { Response.Redirect("RightsWarn.aspx"); } else { try { WebProject.BLL.BaseData.ZT_COM_LiuYan bll_LiuYan = new WebProject.BLL.BaseData.ZT_COM_LiuYan(); WebProject.Model.BaseData.ZT_COM_LiuYan model_LiuYan = bll_LiuYan.GetModel(Int32.Parse(Request["LiuYanID"].ToString())); model_LiuYan.Reply = this.txtReply.Text.Trim(); model_LiuYan.ReplyTime = DateTime.Now; model_LiuYan.LastUpdateBy = SessionUtil.GetAdminSession().AdminNo; model_LiuYan.LastUpdateDate = DateTime.Now; bll_LiuYan.Update(model_LiuYan); LogManage.WriteLog(Request.UserHostAddress, "留言管理", "回复留言", "成功", "回复主题:" + model_LiuYan.MainInfo + ", 操作人:" + SessionUtil.GetAdminSession().AdminNo); MessageBox.ShowAndRedirect(this, "回复留言成功!", "LiuYanList.aspx"); } catch { Response.Redirect("RightsWarn.aspx"); } } } }
protected void btnIsIndex_Click(object sender, EventArgs e) { if (Session["ZT_ADMIN"] == null) { Response.Redirect("Login.aspx"); } else { try { WebProject.BLL.BaseData.ZT_COM_LiuYan bll_LiuYan = new WebProject.BLL.BaseData.ZT_COM_LiuYan(); WebProject.Model.BaseData.ZT_COM_LiuYan model_LiuYan = bll_LiuYan.GetModel(Int32.Parse(Request["LiuYanID"].ToString())); model_LiuYan.IsIndex = "1"; model_LiuYan.LastUpdateBy = SessionUtil.GetAdminSession().AdminNo; model_LiuYan.LastUpdateDate = DateTime.Now; bll_LiuYan.Update(model_LiuYan); MessageBox.ShowAndRedirect(this, "设为审核通过成功!", "LiuYanList.aspx"); } catch { Response.Redirect("RightsWarn.aspx"); } } }