日期:2014-05-16  浏览次数:20840 次

请求老师帮我看下代码哪里错了
 protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request.QueryString["id"] != null)
                {
                    int nid = int.Parse(Request.QueryString["id"].ToString());
                    SqlConnection conn = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["ApplicationServices"].ConnectionString);

                    SqlCommand cmd = new SqlCommand("select AJTJ.AJID,AJTJ.AJNAME,AJTJ.AJTEX,AJTJ.AJYJ from AJTJ,Tongyishifoubiao where AJTJ.AJID = Tongyishifoubiao.AJID and AJTJ.AJID = " + nid, conn);
                    conn.Open();
                    SqlDataReader dr = cmd.ExecuteReader();
                    while (dr.Read())
                    {

                        this.TextBox1.Text = Convert.ToString(dr["AJTJ.AJID"]);
                        this.TextBox2.Text = Convert.ToString(dr["AJTJ.AJNAME"]);
                        this.TextBox3.Text = Convert.ToString(dr["AJTJ.AJTEX"]);
                        this.TextBox4.Text = Convert.ToString(dr["AJTJ.AJYJ"]);
                        Response.Write("<table><tr><td> 部门</td><td >是否同意</td><td >意见</td></tr>");
                        Response.Write("<tr>");
                        Response.Write("<td>" + dr["Tongyishifoubiao.Department"].ToString() + "</td>");
                        Response.Write("<td>" + dr["Tongyishifoubiao.Xuanze"].ToString() + "</td>");
      &