protected void Button1_Click(object sender, EventArgs e) { string sqla = "select classid from tb_user where ID=" + Session["userid"].ToString(); string menid = HXD.DBUtility.SQLHelper.ExecuteScalar(sqla).ToString(); string yy_nameid = this.Select1.Value; //预约的老师编号 string yy_name = this.Select1.Name; //预约的老师名字 string yy_time = Text_time.Value; //预约时间 string username = Session["AdminManage"].ToString(); //预约人 string userphone = this.userphone.Text; //预约人联系方式 string content = this.usercontent.Text; //咨询的问题 string uid = Session["userid"].ToString(); //cid 1=测评 2=预约 3=辅导 4=消息 string sql = "insert into tb_U_Message (zxs_id,zxs_name,yy_time,Name,Tel,Content,classid,uid,state,cid)values('" + yy_nameid + "','" + yy_name + "','" + yy_time + "','" + username + "','" + userphone + "','" + content + "','" + menid + "','" + uid + "','0','2')"; HXD.DBUtility.SQLHelper.ExecuteScalar(sql); LoginCheck.Sendmsg(menid, yy_nameid, "您有一个新的预约,请及时<a href=\"fd_gt.aspx\">查看</a>。"); StringDeal.Alter("预约成功!请耐心等待。", "zx_list.aspx"); }