private void backToolStripMenuItem_Click(object sender, EventArgs e)
 {
     this.Hide();
     if (adminFrom != null)
     {
         adminFrom.Show();
     }
     else if (managerFrom != null)
     {
         managerFrom.Show();
     }
 }
Esempio n. 2
0
 private void backToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (post.Equals("Manager"))
     {
         mf.Show();
         this.Hide();
     }
     else
     {
         adminFrom.Show();
         this.Hide();
     }
 }
 private void backToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (post.Equals("Admin"))
     {
         adminFrom.Show();
         this.Hide();
     }
     else
     {
         ManagerFrom managerFrom = new ManagerFrom();
         managerFrom.Show();
         this.Hide();
     }
 }
Esempio n. 4
0
        private void logInButton_Click(object sender, EventArgs e)
        {
            LoginService loginService = new LoginService();
            bool         result       = loginService.Login(userNameTextBox.Text, passwordTextBox.Text);

            if (result)
            {
                if (loginService.GetPost(userNameTextBox.Text).Equals("Admin"))
                {
                    MessageBox.Show("Login Successfully");
                    string post = "Admin";
                    adminFrom = new AdminFrom(this, userNameTextBox.Text, post);
                    adminFrom.Show();
                    this.Hide();
                }
                else if (loginService.GetPost(userNameTextBox.Text).Equals("Manager"))
                {
                    MessageBox.Show("Login Successfully");
                    string post = "Manager";
                    mf = new ManagerFrom(this, userNameTextBox.Text, post);
                    mf.Show();
                    this.Hide();
                }
                else if (loginService.GetPost(userNameTextBox.Text).Equals("Waiter"))
                {
                    string post = "Waiter";
                    MessageBox.Show("Login Successfully");
                    wf = new WaiterFrom(this, userNameTextBox.Text, post);
                    wf.Show();
                    this.Hide();
                }
            }
            else
            {
                checkLabel.Visible = true;
                return;
            }
        }
 private void backToolStripMenuItem_Click(object sender, EventArgs e)
 {
     managerFrom.Show();
     this.Hide();
 }