Beispiel #1
0
        private void BacktoHome_Click(object sender, EventArgs e)
        {
            switch (Account.AccountType)
            {
            case 1:
                Account.AccountType = 1;
                OrganizerAdminHome Orgadmin = new OrganizerAdminHome();
                Orgadmin.Tag = this;
                Orgadmin.Show(this);
                Hide();
                break;

            case 2:
                Account.AccountType = 2;
                OrgnaizerEmpHome OrgEmp = new OrgnaizerEmpHome();
                OrgEmp.Tag = this;
                OrgEmp.Show(this);
                Hide();
                break;

            case 3:

                Account.AccountType = 3;
                AdminHome admin = new AdminHome();
                admin.Tag = this;
                admin.Show(this);
                Hide();
                break;
            }
        }
Beispiel #2
0
        //  Account acc = new Account();
        private void btnLogin_Click(object sender, EventArgs e)
        {
            int slected_index = comboBox1.SelectedIndex;

            int UId;


            Account account = new Account();


            if (account.CheckUserExists(txtUserName.Text, txtPassord.Text, slected_index, out UId) != 0)
            {
                Account.AccountId = UId;
                switch (slected_index)
                {
                case 0:
                    Account.AccountType = 0;
                    AudienceHome aud = new AudienceHome();
                    aud.Tag = this;
                    aud.Show(this);
                    Hide();

                    break;

                case 1:
                    Account.AccountType = 1;
                    OrganizerAdminHome Orgadmin = new OrganizerAdminHome();
                    Orgadmin.Tag = this;
                    Orgadmin.Show(this);
                    Hide();
                    break;

                case 2:
                    Account.AccountType = 2;
                    OrgnaizerEmpHome OrgEmp = new OrgnaizerEmpHome();
                    OrgEmp.Tag = this;
                    OrgEmp.Show(this);
                    Hide();
                    break;

                case 3:

                    Account.AccountType = 3;
                    AdminHome admin = new AdminHome();
                    admin.Tag = this;
                    admin.Show(this);
                    Hide();
                    break;

                default:
                    MessageBox.Show("something went wrong");
                    break;
                }
            }
            else
            {
                MessageBox.Show("Invalid Username or password");
            }
        }
Beispiel #3
0
        private void BacktoHome_clcik(object sender, EventArgs e)
        {
            switch (Account.AccountType)
            {
            case 1:
                OrganizerAdminHome Orgadmin = new OrganizerAdminHome();
                Orgadmin.Tag = this;
                Orgadmin.Show(this);
                Hide();
                break;

            case 2:
                OrgnaizerEmpHome OrgEmp = new OrgnaizerEmpHome();
                OrgEmp.Tag = this;
                OrgEmp.Show(this);
                Hide();
                break;
            }
        }