Exemplo n.º 1
0
        public static District District(System.Data.IDataReader reader)
        {
            District result = null;

            if (null != reader && reader.Read())
            {
                result = new District();
                PopulateDistrict(result, reader);
            }

            return result;
        }
Exemplo n.º 2
0
 public static void PopulateDistrict(District input, System.Data.IDataReader reader)
 {
     PopulateRecord(input, reader);
     input.RecordId = input.DistrictId = Utilities.ToInt(reader[RoomSearch.Common.District.ColumnNames.DistrictId]);
     input.CityId = Utilities.ToInt(reader[RoomSearch.Common.District.ColumnNames.CityId]);
     input.Name = Utilities.ToString(reader[RoomSearch.Common.District.ColumnNames.Name]);
 }
Exemplo n.º 3
0
 public static List<District> ListDistrict(int? cityId, int? districtId, bool insertAllItem)
 {
     List<District> result = new DataLayer().ListDistrict(cityId, districtId);
     if (insertAllItem)
     {
         District rt = new District();
         rt.Name = "Tất cả";
         result.Insert(0, rt);
     }
     return result;
     //return new DataLayer().ListDistrict(cityId, districtId);
 }