LeaveWordBack.aspx.cs
资源名称:yjal.rar [点击查看]
上传用户:shjujing
上传日期:2022-07-28
资源大小:11244k
文件大小:2k
源码类别:
Email客户端
开发平台:
Visual C++
- using System;
- using System.Data;
- using System.Configuration;
- using System.Collections;
- using System.Web;
- using System.Web.Security;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.WebControls.WebParts;
- using System.Web.UI.HtmlControls;
- using System.Data.SqlClient;
- public partial class Module_ProRes_LeaveWordBack : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- string id=Request["ID"].ToString();
- this.labMan.Text = Session["UserName"].ToString();
- string cmdtxt = "SELECT * FROM tb_LeaveWord WHERE ID='"+id+"'";
- SqlData da = new SqlData();
- SqlCommand Com = new SqlCommand(cmdtxt,da.ExceCon());
- SqlDataReader dr = Com.ExecuteReader();
- dr.Read();
- if (dr.HasRows)
- {
- this.txtSubject.Text = dr["LeaveSubject"].ToString();
- }
- dr.Close();
- }
- protected void btnOK_Click(object sender, EventArgs e)
- {
- SqlData da = new SqlData();
- string cmdtxt = "INSERT INTO tb_FeedBack(FeedBackSubject,UserName,FeedBackTime,Content,LeaveWordID)";
- cmdtxt += "VALUES('"+this.txtSubject.Text+"','"+Session["UserName"].ToString()+"','"+DateTime.Now+"'";
- cmdtxt +=",'"+this.txtContent.Text+"','"+Convert.ToInt32(Request["ID"].ToString())+"')";
- //Response.Write(cmdtxt);
- //Response.End();
- if (da.ExceSQL(cmdtxt))
- {
- Response.Write("<script language=javascript>alert('操作成功!');location='LeaveWord.aspx'</script>");
- }
- else
- {
- Response.Write("<script language=javascript>alert('操作失败!')</script>");
- }
- }
- }