示例#1
0
文件: MainForm.cs 项目: wyntung/MES
        private void InitMainMenu()
        {
            menuItemS1.Visible = true;
            menuItemP1.Visible = true;
            LoginForm loginForm = new LoginForm(mainConnection);

        }
示例#2
0
 public void RecieveLoginForm(LoginForm loginForm)
 {
     this.loginForm = loginForm;
 }
示例#3
0
文件: MainForm.cs 项目: wyntung/MES
        //
        //登陆
        //
        public void LogInOut()
        {
            GetConfig();
            GetCurrentFlow(dataSet);
            GetSqlConnection(dataSet);

            global = new Global(mainConnection);
            //
            //显示登陆界面
            //
            LoginForm loginForm = new LoginForm(mainConnection);
            if (loginForm.ShowDialog(this) == DialogResult.OK)
            {
                loginUserInfo.userBarCode = loginForm.strUserName;
                loginUserInfo.userID = global.GetUserID(loginUserInfo.userBarCode);
                loginUserInfo.roleID = global.GetRoleID(loginUserInfo.userBarCode);
                if (global.IsFlowUser(loginUserInfo.userBarCode, curFlowConfig.flowName))
                {
                    global.InsertLoginRecord(loginUserInfo.userID, "登录", DateTime.Now.ToString(), statusBarPanel8.Text, "成功");
                    statusBarPanel4.Text = loginForm.strUserName;
                    statusBarPanel6.Text = DateTime.Now.ToString();

                    InitialLoginInMainMenu();
                }
                else
                {
                    global.InsertLoginRecord(loginUserInfo.userID, "登录", DateTime.Now.ToString(), curFlowConfig.flowName, "失败");
                }

            }
            else
            {

            }

        }
示例#4
0
 public void RecieveLoginForm(LoginForm loginForm)
 {
     _loginForm = loginForm;
 }