private static void SetIdentityConnectionString(IPrincipal principal)
        {
            ConnectionStringNames obj = new ConnectionStringNames();
            var claimIdentity         = principal as ClaimsPrincipal;

            if (claimIdentity.HasClaim(x => x.Type == "SchoolCode"))
            {
                string schoolCode = claimIdentity.Claims.Where(x => x.Type.Equals("SchoolCode")).FirstOrDefault().Value;
                obj.GetConnectionStringName(schoolCode);
            }
        }
Beispiel #2
0
        private void ReloadConnectionStrings()
        {
            //Take care of variables
            ConnectionStringNames.Clear();
            foreach (var connStr in testCaseCollectionManager.ConnectionStringNames)
            {
                ConnectionStringNames.Add(connStr);
            }

            if (ConnectionStringSelectedIndex < 0 && ConnectionStringNames.Count > 0)
            {
                ConnectionStringSelectedIndex = 0;
            }
        }