Beispiel #1
0
        private void SelectManager()
        {
            var managerId = GetParamGuid("g");

            if (!CheckParam(managerId))
            {
                return;
            }
            var info = reader.SelectManager(UserAccount.Account, managerId, GetIp(),
                                            UAFactory.Instance.IsTx);
            var sessionId = ShareUtil.GenerateComb().ToString();

            if (info.Code == (int)MessageCode.Success)
            {
                if (CheckLockState(info.Data.Manager.Idx))
                {
                    OutputHelper.Output(MessageCode.LoginOnlineLock);
                    return;
                }

                //写入登录信息
                var cookie = UAHelper.SetFormsAuthentication(UserAccount.Account, info.Data.Manager.Idx,
                                                             info.Data.Manager.Name, 1, sessionId);
                OnlineMgr.LoginSession(info.Data.Manager.Idx, sessionId);
                onlineClient.RiseOnlineTime(info.Data.Manager.Idx);
                info.Data.Cookie = cookie;
            }
            OutputHelper.Output(info);
        }