private void buttonLogin_Click(object sender, EventArgs e)
        {
            string typedLogin = "";
            string typedPassword = "";
            if (textBoxLogin.Text == "" || textBoxPassword.Text == "")
            {
                MessageBox.Show("Заповніть всі поля");
                return;
            }
            else
            {
                typedLogin = textBoxLogin.Text;
                typedPassword = textBoxPassword.Text;

                bool logedIn = false;
                foreach (var user in carshop_db.Instance.Users)
                {
                    if (typedLogin.Equals(user.name) && typedPassword.Equals(user.password))
                    {

                        if (user.userType == "admin")
                        {
                            Form admf = new FormAdmin();
                            admf.Show();
                            Hide();
                        }
                        if (user.userType == "secretary")
                        {
                            Form admf = new FormSecretary();
                            admf.Show();
                            Hide();
                        }
                        if (user.userType == "seller")
                        {
                            FormSales fs = new FormSales("seller");
                            fs.Show();
                            Hide();
                        }

                        logedIn = true;
                        break;
                    }
                }

                if(!logedIn)
                    MessageBox.Show("Ім'я або пароль введені неправлиьно");
            }
        }
 private void buttonAllsales_Click(object sender, EventArgs e)
 {
     FormSales fs = new FormSales("admin");
     fs.Show();
     Close();
 }
 private void buttonAllSales_Click(object sender, EventArgs e)
 {
     FormSales fs = new FormSales("secretary");
     fs.Show();
     Close();
 }