示例#1
0
        //获取用户权限职责
        private void GetUserDspInfo()
        {
            //加密
            Encryption4Net.Encryption encryption = new Encryption4Net.Encryption();
            string inputPsw = encryption.EnCode(ui.UserPwd);

            ui.UserPwd = inputPsw;
            encryption = null;

            listCheckUesrInfo = LoginClient.Current.CheckUserInfo(ui);


            if (listCheckUesrInfo.Count == 0)
            {
                MessageBox.Show("用户名或密码不存在!");
            }
            else
            {
                ListmenuItem = GetItems(listCheckUesrInfo[0].menuitem);
                listCheckUesrInfo[0].menuitem = ListmenuItem.ToArray <MenuItem>();
                MainWindow mw = new MainWindow();
                mw.ui = listCheckUesrInfo[0];
                mw.Show();
                CloseAction.Invoke();
            }
        }
示例#2
0
        private bool CheckLogin()
        {
            //加密
            Encryption4Net.Encryption encryption = new Encryption4Net.Encryption();
            string inputPsw = encryption.EnCode(ui.UserPwd);

            ui.UserPwd = inputPsw;
            encryption = null;

            listCheckUesrInfo = LoginClient.Current.CheckUserInfo(ui);

            if (listCheckUesrInfo.Count == 0)
            {
                MessageBox.Show("用户名或密码不存在!");
                return(false);
            }
            return(true);
        }