private void btOk_Click_1(object sender, EventArgs e) { string findSql = "select * from DT_students where stunum = '" + tBun.Text + "'"; SqlHelp sqlHelper = new SqlHelp(); if (tBpw.Text.Trim() != tBrpw.Text.Trim()) { wrong1(); } if (cbCg.Text == "" || tBjl.Text == "" || cbMj.Text == "" || tBpw.Text == "" || tBrpw.Text == "" || tBun.Text == "" || tbDobd.Text == "" || tbDobm.Text == "" || tbDobn.Text == "" || tbName.Text == "" || tbNp.Text == "") { wrong3(); } else if (sqlHelper.SqlServerRecordCount(findSql) > 0) { wrong2(); } else { Close(); Usernum = tBun.Text; Username = tbName.Text; Password = tBpw.Text; State = tBjl.Text; College = cbCg.Text; Major = cbMj.Text; Place = tbNp.Text; dateofbirth = tbDobn.Text + "/" + tbDobm.Text + "/" + tbDobd.Text; userManage a = new userManage(); a.ShowDialog(); } }
private void 用户管理mToolStripMenuItem_Click(object sender, EventArgs e) { if (i == 0) { MessageBox.Show("请先完成注册或登录!"); } else { userManage a = new userManage(); a.ShowDialog(); } }