"'and " + "f_password='"+ textBox2.Text.Trim() + "'"; mycommand.Connection = myconnection;
SqlDataReader dr = mycommand.ExecuteReader(); while (dr.Read()) {
http://www.77cn.com.cnERID = dr[0].ToString(); }
if (http://www.77cn.com.cnERID != null) {
this.Close(); owner.Opacity = 1; } else {
MessageBox.Show("密码和用户输入有错误!"); } }
catch (SqlException se) {
MessageBox.Show("出现错误!" + se.Message); } }
private void button2_Click(object sender, EventArgs e) {
this.Close(); owner.Opacity = 0; }
private void label1_Click(object sender, EventArgs e) {
this.Close(); } }
}
主界面代码:
using System;
using System.Collections.Generic; using http://www.77cn.com.cnponentModel; using System.Data; using System.Drawing; using System.Text;
using System.Windows.Forms; using System.Data.SqlClient;