Exemple #1
0
        public static DataTable GetList()
        {
            DataTable dataTable = new DataTable();

            dataTable.Columns.Add("Guid", typeof(Guid));
            dataTable.Columns.Add("Name", typeof(String));
            dataTable.Columns.Add("ISOCode2", typeof(String));
            dataTable.Columns.Add("ISOCode3", typeof(String));

            using (IDataReader reader = DBGeoCountry.GetAll())
            {
                while (reader.Read())
                {
                    DataRow row = dataTable.NewRow();
                    row["Guid"]     = reader["Guid"];
                    row["Name"]     = reader["Name"].ToString();
                    row["ISOCode2"] = reader["ISOCode2"].ToString();
                    row["ISOCode3"] = reader["ISOCode3"].ToString();
                    dataTable.Rows.Add(row);
                }
            }

            return(dataTable);
        }
Exemple #2
0
 public static IDataReader GetAllGeoCountry()
 {
     return(DBGeoCountry.GetAll());
 }