用户注册
//注册用户验证
public void regist()
{
string userName = Txt_userName.Text.Trim();
string passWord = Txt_passWord.Text.Trim();
try
{
if (userName != "" && passWord != "")
{
SqlConnection cn = new SqlConnection(cnstr);
cn.Open();
string sql = "insert into Table_login values('" + userName + "','" + passWord + "')";
SqlCommand cmd = new SqlCommand(sql, cn);
int count = cmd.ExecuteNonQuery();
if (count > 0)
{
MessageBox.Show("注册成功!", "提示");
resetTxt();
}
else
MessageBox