예제 #1
0
        private void btnBack_Click(object sender, EventArgs e)
        {
            LibrarianDashBoard frm = new LibrarianDashBoard();

            frm.Show();
            this.Close();
        }
예제 #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     rs1 = new OleDbDataAdapter("Select * From Accounts Where Username = '******' and Password= '******'", con1);
     dt  = new DataTable();
     rs1.Fill(dt);
     if (dt.Rows.Count == 1)
     {
         string Type = dt.Rows[0][2].ToString();
         if (Type == "Librarian")
         {
             MessageBox.Show("Welcome Librarian");
             LibrarianDashBoard frm = new LibrarianDashBoard();
             frm.Show();
             this.Hide();
         }
         else if (Type == "Borrower")
         {
             string Type1 = dt.Rows[0][2].ToString();
             MessageBox.Show("Welcome Borrower");
             BorrowertDashBoard frm = new BorrowertDashBoard();
             frm.Show();
             this.Hide();
         }
     }
     else
     {
         MessageBox.Show("Incorrect Username or Password");
     }
 }