Beispiel #1
0
 private void btnCancel_Click(object sender, EventArgs e)
 {
     if (ViewAll.LoginInfo.UserRole == "T")
     {
         this.Close();
         ViewAll openViewAll = new ViewAll();
         openViewAll.Show();
     }
     else if (ViewAll.LoginInfo.UserRole == "TG")
     {
         this.Close();
         TourGuide_ManageCreateTour openManageTour = new TourGuide_ManageCreateTour();
         openManageTour.Show();
     }
 }
Beispiel #2
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            this.Hide();
            Login openLoginForm = new Login();

            openLoginForm.ShowDialog();
            if (LoginInfo.UserRole == "TG")
            {
                this.Hide();
                TourGuide_ManageCreateTour openTourGuide = new TourGuide_ManageCreateTour();
                openTourGuide.Show();
            }
            else if (LoginInfo.UserRole == "S")
            {
                this.Hide();
                SysAdmin_ManageUserTour openSystemAdmin = new SysAdmin_ManageUserTour();
                openSystemAdmin.Show();
            }
            else if (LoginInfo.UserRole == "T")
            {
                ViewAll openViewAllForm = new ViewAll();
                openViewAllForm.Show();
            }
        }