Exemple #1
0
        internal List <Quyen> PopulateObjectFromReader(IDataReader data)
        {
            List <Quyen> list = new List <Quyen>();

            while (data.Read())
            {
                Quyen quyen = new Quyen();
                PopulatePlayerFromReader(quyen, data);
                list.Add(quyen);
            }
            return(list);
        }
Exemple #2
0
        internal void PopulatePlayerFromReader(Quyen quyen, IDataReader dataReader)
        {
            quyen.QuyenId = dataReader.GetString(dataReader.GetOrdinal(Quyen.QuyenFields.QuyenId.ToString()));

            if (!dataReader.IsDBNull(dataReader.GetOrdinal(Quyen.QuyenFields.MoTa.ToString())))
            {
                quyen.MoTa = dataReader.GetString(dataReader.GetOrdinal(Quyen.QuyenFields.MoTa.ToString()));
            }
            if (!dataReader.IsDBNull(dataReader.GetOrdinal(Quyen.QuyenFields.LoaiQuyenId.ToString())))
            {
                quyen.LoaiQuyenId = dataReader.GetString(dataReader.GetOrdinal(Quyen.QuyenFields.LoaiQuyenId.ToString()));
            }
        }