示例#1
0
 public static void Set(int tenantId, int userId)
 {
     HttpContext.Current.Session["TenantId"] = tenantId;
     HttpContext.Current.Session["RdsUser"]  =
         Rds.ExecuteTable(statements: Rds.SelectUsers(
                              column: Rds.UsersColumn().UserId().DeptId(),
                              where : Rds.UsersWhere().UserId(userId)))
         .AsEnumerable()
         .Select(dataRow => new RdsUser()
     {
         DeptId = dataRow.Int("DeptId"),
         UserId = dataRow.Int("UserId")
     })
         .FirstOrDefault();
     if (!SiteInfo.TenantCaches.ContainsKey(TenantId()))
     {
         SiteInfo.Reflesh();
     }
 }
示例#2
0
 public static void SetTenantId(int tenantId)
 {
     HttpContext.Current.Session["TenantId"] = tenantId;
     SiteInfo.Reflesh();
 }
示例#3
0
 public static void SetTenantId(int tenantId)
 {
     Set("TenantId", tenantId);
     SiteInfo.Reflesh();
 }