Esempio n. 1
0
        public static StationAppConfigSr LoadStationAppConfigByQuery(string sQuery)
        {
            using (DataTable dt = DataCopy.GetDataTable(sQuery))
            {
                if (dt != null && dt.Rows.Count > 0)
                {
                    StationAppConfigSr sac = StationAppConfigSr.CreateFromDataRow(dt.Rows[0]);

                    return(sac);
                }
            }

            return(null);
        }
Esempio n. 2
0
        public static StationAppConfigSr GetValueByName(string propertyName)
        {
            using (DataTable dt = DataCopy.GetDataTable("SELECT * FROM StationAppConfig WHERE propertyname = '{0}'", propertyName))
            {
                foreach (DataRow dr in dt.Rows)
                {
                    StationAppConfigSr sac = StationAppConfigSr.CreateFromDataRow(dr);

                    return(sac);
                }
            }

            return(null);
        }
Esempio n. 3
0
        public static List <StationAppConfigSr> GetAllSettings()
        {
            List <StationAppConfigSr> lResult = new List <StationAppConfigSr>();

            using (DataTable dt = DataCopy.GetDataTable("SELECT * FROM StationAppConfig ORDER BY StationAppConfigID"))
            {
                foreach (DataRow dr in dt.Rows)
                {
                    StationAppConfigSr sac = StationAppConfigSr.CreateFromDataRow(dr);

                    lResult.Add(sac);
                }
            }

            return(lResult);
        }