C连连看登陆代码.docVIP

  • 3
  • 0
  • 约4.98千字
  • 约 4页
  • 2017-06-07 发布于重庆
  • 举报
C连连看登陆代码

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Data.OleDb; //using System.SqlConnection; //using System.SqlCommand; namespace LLKAN { public partial class Form1 : Form { //动态登陆 // public static Boolean access; // string connstring = Server=(local);Database=business;Integrated Security=SSPI;User ID=Employee;Password=nbyg; // public string SinSerch(string Sqlchar) // { // SqlConnection conn = new SqlConnection(connstring); // SqlCommand oprating = new SqlCommand(Sqlchar, conn); // try // { // conn.Open(); // return oprating.ExecuteScalar().ToString(); // } // catch // { // return null; // } // } public Form1() { InitializeComponent(); StartPosition = FormStartPosition.CenterScreen; } private void button1_Click(object sender, EventArgs e) { //DataBase Mydb = new DataBase(); //string Sqlchar = select count(*) from employee where Name= + textBox1.Text + and Password= + textBox2.Text + ; //try //{ //静态登陆 if (textBox1.Text == ) { MessageBox.Show(用户名不能为空!, 信息提示, MessageBoxButtons.OK, MessageBoxIcon.Information); } else if (textBox2.Text == ) { MessageBox.Show(密码不能为空!, 信息提示, MessageBoxButtons.OK, MessageBoxIcon.Information); textBox1.Text = ; } else if (textBox1.Text == abcd textBox2.Text == 12345) { frmMain f = new frmMain(); f.Show(); this.Hide(); } else if (textBox1.Text != abcd |

文档评论(0)

1亿VIP精品文档

相关文档