コード例 #1
0
ファイル: Form1.cs プロジェクト: RedMaus/C-application
        private void button1_Click(object sender, EventArgs e)
        {
            User _new = new User();

            switch (_new.Authethification(textBox1.Text, textBox2.Text))
            {
            case "admin":

                Admin frm = new Admin(Convert.ToInt32(textBox2.Text));
                frm.Show();
                this.Hide();

                break;

            case "employer":
                this.Hide();
                Employer frm1 = new Employer(Convert.ToInt32(textBox2.Text));
                frm1.Show();

                break;

            case "manager":
                this.Hide();
                Manager frm2 = new Manager(Convert.ToInt32(textBox2.Text));
                frm2.Show();

                break;

            case "":
                MessageBox.Show("incorect id or FIO", "ERROR");
                break;
            }
        }