以下是引用片段:
代码如下: if (DataBase.Get_Table("select * from 用户信息 where 用户名='" + txtYHM.Text + "'").Rows.Count > 0) { Page.ClientScr用户名已经存在,请重试!'>"); return; } string YesOrNo = ""; if (this.RadioButtonList1.Items[0].Selected) { YesOrNo = "是"; } else { YesOrNo = "否"; } DataBase.ExecSql("INSERT INTO [用户信息] ( [用户名] ,[密码] ,[地址] ,[注册时间] ,[用户介绍] ,[手机] ,[座机] ,[姓名] ,[是否中介]) VALUES ('" + txtYHM.Text + "','" + txtMM.Text + "','" + txtDZ.Text + "','" + DateTime.Now.ToShortDateString() + "','" + txtYHJS.Text + "','" + txtSJ.Text + "','" + txtZJ.Text + "','" + txtXM.Text + "','"+YesOrNo+"')"); Session["UserName"]=txtYHM.Text; Page.ClientScript."info", "<('注册完成!');window.='User/AdminMain.aspx'>");
|