Esempio n. 1
0
        public IList<Core.Business.RCity> GetAllRCity()
        {
            IList<Core.Business.RCity> rCitylist = new List<Core.Business.RCity>();
            SqlServerUtility sql = new SqlServerUtility();

            SqlDataReader reader = sql.ExecuteSqlReader(SqlGetAllRCity);

            if(reader != null)
            {
                while(reader.Read())
                {
                    Core.Business.RCity rCity = new Core.Business.RCity();

                    if (!reader.IsDBNull(0)) rCity.NCityId = reader.GetGuid(0);
                    if (!reader.IsDBNull(1)) rCity.OCityId = reader.GetString(1);

                    rCity.MarkOld();
                    rCitylist.Add(rCity);
                }
                reader.Close();
            }
            return rCitylist;
        }