コード例 #1
0
ファイル: ManageBookings.cs プロジェクト: krabby-k/C-sharp
        private void btn_canc_Click_1(object sender, EventArgs e)
        {
            welcomeAdmin w = new welcomeAdmin();

            this.Close();
            w.Show();
        }
コード例 #2
0
 private void btn_login_Click(object sender, EventArgs e)
 {
     if (txt_pass.Text == "" || txt_user.Text == "")
     {
         MessageBox.Show("Enter Username and Password", "Invalid", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     else
     {
         string    un = txt_user.Text;
         string    pw = txt_pass.Text;
         DataTable tb = cs.getUser(new SqlCommand("select * from AdminUser where Username='******' and Password='******'"));
         if (tb.Rows.Count > 0)
         {
             welcomeAdmin main = new welcomeAdmin();
             this.Hide();
             main.Show();
         }
         else
         {
             MessageBox.Show("Invalid Login details", "Invalid", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     txt_pass.Clear();
     txt_user.Clear();
 }