Exemple #1
0
        private bool loginProcess()
        {
            labelMessage.Text = "";

            if (textBoxMemberCode.Text == null || textBoxMemberCode.Text == "")
            {
                labelMessage.Text      = "社員番号が入力されていません!";
                labelMessage.ForeColor = Color.Red;
                //MessageBox.Show("ログイン名を入力してください");
                return(false);
            }

            //#######################################
            // Super User
            if (textBoxMemberCode.Text == rootUser)
            {
                hp = new HumanProperty();
                if (formMenuDataMnt == null || formMenuDataMnt.IsDisposed)
                {
                    hp.MemberName   = rootUser;
                    formMenuDataMnt = new FormMenuDataMnt(hp);
                    formMenuDataMnt.Show();
                }
            }
            //#######################################
            return(true);
        }
Exemple #2
0
        private void button_Click(object sender, EventArgs e)
        {
            Button btn = (Button)sender;

            // Login->当Menu の順に処理される時

            switch (btn.Name)
            {
            case "buttonWeb":
                System.Diagnostics.Process.Start("http://server-ma/CostVolumeOptW/Form/Login");
                break;

            case "buttonPlan":
                if (formMenuEstPlan == null || formMenuEstPlan.IsDisposed)
                {
                    formMenuEstPlan = new FormMenuEstPlan(hp);
                    formMenuEstPlan.Show();
                }
                else
                {
                    MessageBox.Show(MsgAlready);
                }
                break;

            case "buttonVol":
                if (formMenuCostVol == null || formMenuCostVol.IsDisposed)
                {
                    formMenuCostVol = new FormMenuCostVol(hp);
                    formMenuCostVol.Show();
                }
                else
                {
                    MessageBox.Show(MsgAlready);
                }
                break;

            case "buttonOs":
                if (formMenuOutsource == null || formMenuOutsource.IsDisposed)
                {
                    formMenuOutsource = new FormMenuOutsource(hp);
                    formMenuOutsource.Show();
                }
                else
                {
                    MessageBox.Show(MsgAlready);
                }
                break;

            case "buttonInfo":
                if (formMenuInfo == null || formMenuInfo.IsDisposed)
                {
                    formMenuInfo = new FormMenuInfo(hp);
                    formMenuInfo.Show();
                }
                else
                {
                    MessageBox.Show(MsgAlready);
                }
                break;

            case "buttonSyo":
                if (formMenuSYO == null || formMenuSYO.IsDisposed)
                {
                    formMenuSYO = new FormMenuSYO(hp);
                    formMenuSYO.Show();
                }
                else
                {
                    MessageBox.Show(MsgAlready);
                }
                break;

            default:
                if (formMenuDataMnt == null || formMenuDataMnt.IsDisposed)
                {
                    formMenuDataMnt = new FormMenuDataMnt(hp);
                    formMenuDataMnt.Show();
                }
                else
                {
                    MessageBox.Show(MsgAlready);
                }
                break;
            }
        }