Exemplo n.º 1
0
        private void next_Click(object sender, EventArgs e)
        {
            TataUsaha tu = new TataUsaha();
            IdenWalidanStatusTinggal wali = new IdenWalidanStatusTinggal();

            tu.AbrirFormEnPanel(wali);
            tu.Show();
        }
Exemplo n.º 2
0
        private void next_Click(object sender, EventArgs e)
        {
            TataUsaha tu   = new TataUsaha();
            IdenGuru  guru = new IdenGuru();

            tu.AbrirFormEnPanel(guru);
            tu.Show();
        }
Exemplo n.º 3
0
        private async void  btnLogin_Click(object sender, EventArgs e)
        {
            try
            {
                Connection  db     = new Connection();
                var         result = db.client.Get("Login/users/");
                List <User> users  = result.ResultAs <List <User> >();
                int         role   = 0;
                int         grade  = 0;

                foreach (User user in users)
                {
                    if (user != null)
                    {
                        if (userLogin.Text.Equals(user.username) && passLogin.Text.Equals(user.password))
                        {
                            role  = user.role;
                            grade = user.kelas;
                        }
                    }
                }

                switch (role)
                {
                case 1:
                    GuruKelas kelas = new GuruKelas(grade);
                    kelas.Show();
                    this.Hide();
                    break;

                case 2:
                    GuruAgama_OlahRaga agama = new GuruAgama_OlahRaga();
                    agama.Show();
                    this.Hide();
                    break;

                case 3:
                    KepalaSekolah kepsek = new KepalaSekolah();
                    kepsek.Show();
                    this.Hide();
                    break;

                case 4:
                    TataUsaha tu = new TataUsaha();
                    tu.Show();
                    this.Hide();
                    break;
                }
            }
            catch
            {
                MessageBox.Show("There is a problem with internet connection!");
            }
        }