コード例 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (MainClass.checkControls(leftpanel).Count == 0)
            {
                if (RetrivalData.ValidUser(textBox1.Text, passTxt.Text))
                {
                    if (RetrivalData.ROLE == "admin")
                    {
                        adminHomeScreenWindow hs = new adminHomeScreenWindow();
                        MainClass.showWindow(hs, this, MDI.ActiveForm);
                    }
                    else if (RetrivalData.ROLE == "Chef")
                    {
                        HomeScreen2 hs = new HomeScreen2

                                             ();
                        MainClass.showWindow(hs, this, MDI.ActiveForm);
                    }
                }
                else
                {
                }
            }
            else
            {
                MessageBox.Show("Please enter all required fields");
            }
        }
コード例 #2
0
        public override void button6_Click(object sender, EventArgs e)
        {
            HomeScreen2 hs = new HomeScreen2();

            MainClass.showWindow(hs, this, MDI.ActiveForm);
        }