Exemplo n.º 1
0
        private void backBtn_Click(object sender, EventArgs e)
        {
            Receptionist R = new Receptionist();

            R.Show();
            this.Hide();
        }
Exemplo n.º 2
0
 private void btnHome_Click(object sender, EventArgs e)
 {
     if (UserType == "Admin")
     {
         AdminHome A = new AdminHome();
         A.name = this.name;
         A.type = this.type;
         A.Show();
         this.Hide();
     }
     else if (UserType == "Receptionist")
     {
         Receptionist receptionist = new Receptionist();
         receptionist.Show();
         this.Hide();
     }
 }
Exemplo n.º 3
0
        private void loginBtn_Click(object sender, EventArgs e)
        {
            DataTable table1 = DataAccess.LoadData("select * from [Hotel_Management].[dbo].[UserLogin] where userID = '" + loginusername.Text + "' AND password = '******'");


            if (table1.Rows.Count != 1)
            {
                MessageBox.Show("wrong user Id or Password");

                loginusername.Clear();
                loginpassword.Clear();
                return;
            }


            type = table1.Rows[0]["type"].ToString();


            if (type == "Admin")
            {
                AdminHome A = new AdminHome();
                A.name = loginusername.Text;
                A.type = this.type;
                A.Show();
                this.Hide();
            }

            else if (type == "Receptionist")
            {
                Receptionist c = new Receptionist();
                c.name = loginusername.Text;
                c.type = this.type;
                c.Show();
                this.Hide();
            }
        }