找传奇、传世资源到传世资源站!

简单学生图书管理系统

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

string learnid, lpassword;
                    bool flag = false;
                    learnid = textBox1.Text.Trim();
                    lpassword = textBox2.Text.Trim();
                    SqlConnection conn = new SqlConnection("data source=FJ-PC\\SQLEXPRESS;uid=jzx;pwd=neso;database=library");
                    conn.Open();
                    string sqlstring = "select learnid,lpassword from StudentInfo where learnid='" learnid "'and lpassword='" lpassword "'";
                    SqlCommand comm = new SqlCommand(sqlstring, conn);
                    SqlDataReader thisReader = comm.ExecuteReader();                    while (thisReader.Read())
                    {
                        if ((thisReader.GetValue(0).ToString().Trim()) == learnid.ToString().Trim())
                        {
                            if ((thisReader.GetValue(1).ToString().Trim()) == lpassword.ToString().Trim())
                            {
                                flag = true;   
                            }             
                        }    
                    }
                    conn.Close();

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复