Beispiel #1
0
        private void imgback_Click(object sender, EventArgs e)
        {
            this.Close();
            DashBoard frmDashBoard = new DashBoard();

            frmDashBoard.Show();
        }
Beispiel #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         string       query = "select * from tblUser where username='******'and password='******'";
         DBConnection db    = new DBConnection();
         DataTable    dt    = db.GetData(query);
         if (dt.Rows.Count > 0)
         {
             DashBoard frmDashBoard = new DashBoard();
             frmDashBoard.user_id = Convert.ToInt32(dt.Rows[0]["user_id"]);
             frmDashBoard.Show();
         }
         else
         {
             MessageBox.Show("username and password not Exists");
         }
         txtpassword.Text = string.Empty;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }