Example #1
0
        public string GetCarModelName(int id)
        {
            CarModelInfo entity = GetCarModelModel(id, true);

            if (entity == null)
            {
                return(string.Empty);
            }
            return(entity.Name);
        }
Example #2
0
        public CarModelInfo GetCarModelModel(int id, bool fromCache = false)
        {
            CarModelInfo entity = null;

            List <CarModelInfo> list = GetCarModelList(fromCache);

            entity = list.Find(c => c.ID == id);

            return(entity);
        }
Example #3
0
        public static CarModelInfo PopulateCarModelInfo(IDataReader reader)
        {
            CarModelInfo entity = new CarModelInfo()
            {
                ID             = (int)reader["ID"],
                Name           = reader["Name"] as string,
                BrandID        = (int)reader["BrandID"],
                BrandName      = reader["BrandName"] as string,
                BrandNameIndex = reader["BrandNameIndex"] as string,
                SeriesName     = reader["SeriesName"] as string,
                SeriesID       = (int)reader["SeriesID"]
            };

            return(entity);
        }
Example #4
0
 public abstract void UpdateCarModel(CarModelInfo entity);
Example #5
0
 public abstract int AddCarModel(CarModelInfo entity);
Example #6
0
 public void UpdateCarModel(CarModelInfo entity)
 {
     CommonDataProvider.Instance().UpdateCarModel(entity);
 }
Example #7
0
 public int AddCarModel(CarModelInfo entity)
 {
     return(CommonDataProvider.Instance().AddCarModel(entity));
 }