2.2 创建数据库
3、界面设计
3.1 登陆界面
amespace 图书管理系统
{
publicpartialclassForm1 : Form
{
public Form1<>
{
InitializeComponent<>;
}
publicstaticForm fm = null;
privatestaticint ErrorTimes = 0;
privatevoid button3_Click<object sender, EventArgs e>
{
this.Close<>;
}
privatevoid textBox1_TextChanged<object sender, EventArgs e>
{
}
privatevoid button1_Click<object sender, EventArgs e>
{
if <textBox1.Text == "" || textBox2.Text == "">
{ MessageBox.Show<"提示:请输入用户名和密码!", "警告">; }
SqlConnection conn =
newSqlConnection<"Server=PC_201402131602;Integrated
Security=true;DataBase=图书管理系统">;
conn.Open<>;
SqlCommand cmd = newSqlCommand<"select * from Table_1 where id='" +
textBox1.Text.Trim<> + "' and us='" + textBox2.Text.Trim<> + "'", conn>;
SqlDataReader sdr = cmd.ExecuteReader<>;
1 / 16
评论0
最新资源