Ejemplo n.º 1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            var login = textbox2.Text;
            var pass  = textbox1.Text;
            var user  = avtorizationControl.Avtorize(login, pass);

            if (user.Role == (int)Role.trener)
            {
                Trener_Panel winTool = new Trener_Panel(user);
                winTool.Owner = this;
                winTool.Show();
                mainwindow.Visibility = Visibility.Hidden;
            }
            else if (user.Role == (int)Role.admin)
            {
                AdminPanel winTool = new AdminPanel(user);
                winTool.Owner = this;
                winTool.Show();
                mainwindow.Visibility = Visibility.Hidden;
            }
            else if (user.Role == (int)Role.client)
            {
                ClientPanel winTool = new ClientPanel(user);
                winTool.Owner = this;
                winTool.Show();
                mainwindow.Visibility = Visibility.Hidden;
            }
            else
            {
                label1.Visibility = Visibility.Visible;
                label1.Content    = "ошибка";
            }
        }
Ejemplo n.º 2
0
 public Admin(int UserID_)
 {
     InitializeComponent();
     UserID = UserID_;
     mainpanel.Hide();
     ClientPanel.Hide();
     choosepanel.Show();
 }
Ejemplo n.º 3
0
 private void Admin_Load(object sender, EventArgs e)
 {
     UpdateCouch();
     UpdateClients();
     UpdateWorker();
     choosepanel.Show();
     mainpanel.Hide();
     ClientPanel.Hide();
 }
Ejemplo n.º 4
0
 private void gunaButton14_Click(object sender, EventArgs e)
 {
     mainpanel.Hide();
     ClientPanel.Show();
     choosepanel.Hide();
     UpdateWorker();
     gunaButton20.Visible = true;
     gunaButton19.Visible = true;
     gunaButton18.Visible = true;
     gunaButton8.Visible  = false;
     gunaButton9.Visible  = false;
     gunaButton10.Visible = false;
     gunaButton5.Visible  = false;
     gunaButton6.Visible  = false;
     gunaButton7.Visible  = false;
 }
Ejemplo n.º 5
0
 private void gunaButton3_Click(object sender, EventArgs e)
 {
     UpdateTranings();
     choosepanel.Hide();
     ClientPanel.Show();
     mainpanel.Hide();
     gunaButton20.Visible = false;
     gunaButton19.Visible = false;
     gunaButton18.Visible = false;
     gunaButton8.Visible  = false;
     gunaButton9.Visible  = false;
     gunaButton10.Visible = false;
     gunaButton5.Visible  = false;
     gunaButton6.Visible  = false;
     gunaButton7.Visible  = false;
     gunaButton21.Visible = true;
 }
Ejemplo n.º 6
0
        private void gunaButton22_Click(object sender, EventArgs e)
        {
            choosepanel.Hide();
            ClientPanel.Hide();
            mainpanel.Show();
            openChildForm(new About());
            gunaButton20.Visible = false;
            gunaButton19.Visible = false;
            gunaButton18.Visible = false;
            gunaButton21.Visible = false;

            gunaButton8.Visible  = false;
            gunaButton9.Visible  = false;
            gunaButton10.Visible = false;
            gunaButton5.Visible  = false;
            gunaButton6.Visible  = false;
            gunaButton7.Visible  = false;
        }
Ejemplo n.º 7
0
        private void UserButton_Click(object sender, EventArgs e)
        {
            ClientPanel.Show();
            UpdateClients();
            mainpanel.Hide();
            gunaButton8.Visible  = false;
            gunaButton9.Visible  = false;
            gunaButton10.Visible = false;
            choosepanel.Hide();
            gunaButton20.Visible = false;
            gunaButton19.Visible = false;
            gunaButton18.Visible = false;
            gunaButton21.Visible = false;

            gunaButton5.Visible = true;
            gunaButton6.Visible = true;
            gunaButton7.Visible = true;
        }
Ejemplo n.º 8
0
        private void loginButton(object sender, EventArgs e)
        {
            String login    = textBox1.Text;
            String password = textBox2.Text;

            Models.logButton.Buttons loginToPanel = new Models.logButton.Buttons();
            Boolean status = loginToPanel.loginButton(login, password);

            if (status == true)
            {
                this.Hide();
                ClientPanel clntPanel = new ClientPanel(login);
                clntPanel.Show();
            }
            else
            {
                MessageBox.Show("Wrong email or password. \n If you don't have account please register.", "Information about Login.", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Ejemplo n.º 9
0
 private void pictureBox1_Click(object sender, EventArgs e)
 {
     mainpanel.Hide();
     choosepanel.Show();
     ClientPanel.Hide();
 }
Ejemplo n.º 10
0
 protected void MenuClientButton_Click(object sender, EventArgs e)
 {
     ClientPanel.PanelAction();
 }