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(); } }
public static void SetTenantId(int tenantId) { HttpContext.Current.Session["TenantId"] = tenantId; SiteInfo.Reflesh(); }
public static void SetTenantId(int tenantId) { Set("TenantId", tenantId); SiteInfo.Reflesh(); }