Beispiel #1
0
        private void formContainer_Shown(object sender, EventArgs e)
        {
            formLogin formLgn = new formLogin(Model);

            formLgn.ShowDialog();


            switch (Model.getUserTypeForCurrentuser())
            {
            case "Manager":
                formManager form1 = new formManager(this, Model);     // All forms get passed the formContainer and a reference to the model object.
                this.Text  = this.Text + "-Manager";
                form1.Dock = DockStyle.Fill;
                form1.Show();
                break;

            case "Sales":
                formSales form2 = new formSales(this, Model);    // All forms get passed the formContainer and a reference to the model object.
                this.Text  = this.Text + "-Sales";
                form2.Dock = DockStyle.Fill;
                form2.Show();
                break;

            case "Production":
                formOperator form3 = new formOperator(this, Model);     // All forms get passed the formContainer and a reference to the model object.
                this.Text  = this.Text + "-Production";
                form3.Dock = DockStyle.Fill;
                form3.Show();
                break;
            }
        }
Beispiel #2
0
        private void formContainer_Shown(object sender, EventArgs e)
        {
            formLogin formLgn = new formLogin(model);

            formLgn.ShowDialog();

            //MessageBox.Show("Here");
            switch (model.CurrentUser.UserType)
            {
            case "Manager":
                formManager form1 = new formManager(this, model);
                //formAddUser form1 = new formAddUser(this, model);
                this.Text  = this.Text + "-Manager";
                form1.Dock = DockStyle.Fill;
                form1.Show();
                break;

            case "Sales":
                formSales form2 = new formSales(this, model);
                this.Text  = this.Text + "-Sales";
                form2.Dock = DockStyle.Fill;
                form2.Show();
                break;

            case "Production":
                formOperator form3 = new formOperator(this, model);
                this.Text  = this.Text + "-Production";
                form3.Dock = DockStyle.Fill;
                form3.Show();
                break;
            }
        }