예제 #1
0
        public static QueQuan ReadQueQuan(SqlDataReader reader)
        {
            var qq = new QueQuan()
            {
                ID           = reader.GetInt32(iID),
                TenDiaPhuong = reader.GetString(iTenDiaPhuong)
            };

            return(qq);
        }
예제 #2
0
        public static List <QueQuan> DSQueQuan()
        {
            var lqq = new List <QueQuan>();
            var cm  = CreateCommand();

            cm.CommandText = @"SELECT * FROM QueQuan";
            var reader = cm.ExecuteReader();

            while (reader.Read())
            {
                lqq.Add(QueQuan.ReadQueQuan(reader));
            }
            cn.Close();
            return(lqq);
        }