Пример #1
0
 //登录操作
 private void btndeng_Click(object sender, EventArgs e)
 {
     if (CheckInput())
     {
         try
         {
             conn.Open();
             string     sql   = "select count(*) from dbo.denglumima where adminNo='" + this.txtzhang.Text + "' and adminpwd='" + this.txtmima.Text + "'";
             SqlCommand com   = new SqlCommand(sql, conn);
             int        count = (int)com.ExecuteScalar();
             if (count > 0)
             {
                 this.Hide();
                 chaxun a = new chaxun();
                 a.Show();
             }
             else
             {
                 MessageBox.Show("登陆失败!", "操作提示");
                 this.txtzhang.Clear();
                 this.txtmima.Clear();
             }
         }
         catch (Exception ex)
         {
             Console.WriteLine(ex);
         }
         finally
         {
             conn.Close();
         }
     }
 }
Пример #2
0
        private void 歌曲管理ToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            chaxun S = new chaxun();

            S.Show();
        }