SourceCode/jiouosdp/Controllers/Bases/BaseController.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using RFrameGenerate.BLL;
using RFrameGenerate.Common;
using RFrameGenerate.Model;
using System.Web.Param;
namespace jiouosdp.Controllers
{
public class BaseController : Controller
{
#region 登录和注销
/// <summary>
/// 用户登录
/// </summary>
/// <param name="userGuid"></param>
/// <param name="Application"></param>
public void SignIn(Guid userGuid, Guid smerchantGuid,string appid, string userName, bool ismerchant, HttpApplicationStateBase Application)
{
Application.Lock();
Hashtable hOnline = (Hashtable)Application["Online"];
if (hOnline == null)
{
hOnline = Hashtable.Synchronized(new Hashtable());
Application["Online"] = hOnline;
}
Application.UnLock();
if (CurrentManage.ApplicationSignOutSwitch)
{//多人登录时,第一次登录的失效,这里仅考虑两个人登录
IDictionaryEnumerator idE = hOnline.GetEnumerator();
while (idE.MoveNext())
{
if (idE.Value != null && idE.Value.ToString().ToLower().Equals(userGuid.ToString().ToLower()))
{
hOnline[idE.Key] = "_repetition_";
break;
}
}
}
//设置当前Session
CurrentUser.SetMerchant(ismerchant);
CurrentUser.SetSMerchantGuid(smerchantGuid);
CurrentUser.SetMerchantGuid(smerchantGuid);
CurrentUser.SetAppID(appid);
CurrentUser.SetCurrUser(userName, userGuid);
//设置Application
hOnline[Session.SessionID] = userGuid;
}
/// <summary>
/// 用户注销
/// </summary>
后面还有 43 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。