private void Login_Click()
        {
            if (loginbl.ReadConfig() == false)
            {
                //起動時エラー    DB接続不可能
                this.Close();
                System.Environment.Exit(0);
            }
            //  if (!String.IsNullOrWhiteSpace(txtOperatorCD.Text))
            if (ErrorCheck())
            {
                //共通処理 受取パラメータ、接続情報
                //コマンドライン引数より情報取得
                //Iniファイルより情報取得
                if (loginbl.ReadConfig() == false)
                {
                    //起動時エラー    DB接続不可能
                    this.Close();
                    System.Environment.Exit(0);
                }

                try
                {
                    var mse = loginbl.MH_Staff_LoginSelect(GetInfo());
                    if (mse.Rows.Count > 0)
                    {
                        if (mse.Rows[0]["MessageID"].ToString() == "Allow")
                        {
                            if (loginbl.Check_RegisteredMenu(GetInfo()).Rows.Count > 0)
                            {
                                var mseinfo = loginbl.M_Staff_InitSelect(GetInfo());
                                Capitalsports_MainMenu menuForm = new Capitalsports_MainMenu(GetInfo().StaffCD, mseinfo);
                                this.Hide();
                                menuForm.ShowDialog();
                                this.Close();
                            }
                            else
                            {
                                loginbl.ShowMessage("S018");
                                txtOperatorCD.Select();
                            }
                        }
                        else
                        {
                            loginbl.ShowMessage(mse.Rows[0]["MessageID"].ToString());
                            txtOperatorCD.Select();
                        }
                    }
                    else
                    {
                        loginbl.ShowMessage("E101");
                        txtOperatorCD.Select();
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }
        private void Login_Click()
        {
            if (loginbl.ReadConfig() == false)
            {
                //起動時エラー    DB接続不可能
                this.Close();
                System.Environment.Exit(0);
            }

            if (!String.IsNullOrWhiteSpace(txtOperatorCD.Text))
            {
                if (loginbl.ReadConfig() == false)
                {
                    //起動時エラー    DB接続不可能
                    this.Close();
                    System.Environment.Exit(0);
                }
                var mse = loginbl.MH_Staff_LoginSelect(GetInfo());
                if (mse.Rows.Count > 0)
                {
                    if (mse.Rows[0]["MessageID"].ToString() == "Allow")
                    {
                        if (loginbl.Check_RegisteredMenu(GetInfo()).Rows.Count > 0)
                        {
                            var mseinfo = loginbl.M_Staff_InitSelect(GetInfo());
                            HapoStore_MainMenu hapomainmenu = new HapoStore_MainMenu(GetInfo().StaffCD, mseinfo);
                            this.Hide();
                            hapomainmenu.ShowDialog();
                            this.Close();
                        }
                        else
                        {
                            loginbl.ShowMessage("S018");
                            txtOperatorCD.Select();
                        }
                    }
                    else
                    {
                        loginbl.ShowMessage(mse.Rows[0]["MessageID"].ToString());
                        txtOperatorCD.Select();
                    }
                }
                else
                {
                    loginbl.ShowMessage("E101");
                    txtOperatorCD.Select();
                }
            }
            else
            {
                loginbl.ShowMessage("E101");
                txtOperatorCD.Focus();
            }
        }
Esempio n. 3
0
        private void Login_Click()
        {
            if (loginbl.ReadConfig() == false)
            {
                //起動時エラー    DB接続不可能
                this.Close();
                System.Environment.Exit(0);
            }
            if (ErrorCheck())
            {
                //共通処理 受取パラメータ、接続情報
                //コマンドライン引数より情報取得
                //Iniファイルより情報取得
                if (loginbl.ReadConfig() == false)
                {
                    //起動時エラー    DB接続不可能
                    this.Close();
                    System.Environment.Exit(0);
                }

                var mse = loginbl.MH_Staff_LoginSelect(GetInfo());
                if (mse.Rows.Count > 0)
                {
                    if (mse.Rows[0]["MessageID"].ToString() == "Allow")
                    {
                        if (loginbl.Check_RegisteredMenu(GetInfo()).Rows.Count > 0)
                        {
                            var       mseinfo  = loginbl.M_Staff_InitSelect(GetInfo());
                            Main_Menu menuForm = new Main_Menu(GetInfo().StaffCD, mseinfo);
                            this.Hide();
                            menuForm.ShowDialog();
                            this.Close();
                        }
                        else
                        {
                            loginbl.ShowMessage("S018");
                            txtOperatorCD.Select();
                        }
                    }
                    else
                    {
                        loginbl.ShowMessage(mse.Rows[0]["MessageID"].ToString());
                        txtOperatorCD.Select();
                    }
                }
                else
                {
                    loginbl.ShowMessage("E101");
                    txtOperatorCD.Select();
                }
            }
        }
Esempio n. 4
0
 private void Login_Click()
 {
     if (loginbl.ReadConfig() == false)
     {
         this.Close();
         System.Environment.Exit(0);
     }
     if (ErrorCheck())
     {
         if (loginbl.ReadConfig() == false)
         {
             this.Close();
             System.Environment.Exit(0);
         }
         var mse = loginbl.MH_Staff_LoginSelect(GetInfo());
         if (mse.Rows.Count > 0)
         {
             if (mse.Rows[0]["MessageID"].ToString() == "Allow")
             {
                 if (loginbl.Check_RegisteredMenu(GetInfo()).Rows.Count > 0)
                 {
                     var             mseinfo  = loginbl.M_Staff_InitSelect(GetInfo());
                     Tennic_MainMenu menuForm = new Tennic_MainMenu(GetInfo().StaffCD, mseinfo);
                     this.Hide();
                     menuForm.ShowDialog();
                     this.Close();
                 }
                 else
                 {
                     loginbl.ShowMessage("S018");
                     txtOperatorCD.Select();
                 }
             }
             else
             {
                 loginbl.ShowMessage(mse.Rows[0]["MessageID"].ToString());
                 txtOperatorCD.Select();
             }
         }
         else
         {
             loginbl.ShowMessage("E101");
             txtOperatorCD.Select();
         }
     }
 }