Beispiel #1
0
        public List <ClientApplicationDataEntity> ClientApplicationDataAdapt(DataTable dt)
        {
            List <ClientApplicationDataEntity> results = new List <ClientApplicationDataEntity>();

            foreach (DataRow rw in dt.Rows)
            {
                ClientApplicationDataEntity matchCode = new ClientApplicationDataEntity();
                matchCode = AdaptItemClientApplicationData(rw, dt);
                results.Add(matchCode);
            }
            return(results);
        }
Beispiel #2
0
        public ClientApplicationDataEntity AdaptItemClientApplicationData(DataRow rw, DataTable dt)
        {
            ClientApplicationDataEntity result = new ClientApplicationDataEntity();

            if (!string.IsNullOrEmpty(Convert.ToString(rw["ApplicationDBConnectionStringHash"])))
            {
                result.ApplicationDBConnectionStringHash = SafeHelper.GetSafestring(rw["ApplicationDBConnectionStringHash"]);
            }

            if (!string.IsNullOrEmpty(Convert.ToString(rw["ClientName"])))
            {
                result.ClientName = SafeHelper.GetSafestring(rw["ClientName"]);
            }

            if (!string.IsNullOrEmpty(Convert.ToString(rw["ClientLogo"])))
            {
                result.ClientLogo = SafeHelper.GetSafestring(rw["ClientLogo"]);
            }

            if (!string.IsNullOrEmpty(Convert.ToString(rw["ApplicationId"])))
            {
                result.ApplicationId = SafeHelper.GetSafeint(rw["ApplicationId"]);
            }

            if (!string.IsNullOrEmpty(Convert.ToString(rw["SAMLSSO"])))
            {
                result.SAMLSSO = SafeHelper.GetSafebool(rw["SAMLSSO"]);
            }

            if (!string.IsNullOrEmpty(Convert.ToString(rw["PartnerIdP"])))
            {
                result.PartnerIdP = SafeHelper.GetSafestring(rw["PartnerIdP"]);
            }

            return(result);
        }