Ejemplo n.º 1
0
        /// <summary>
        /// 获取生产年份
        /// </summary>
        /// <param name="vid"></param>
        /// <param name="paiLiang"></param>
        /// <returns></returns>
        public List <string> GetVehicleNian(string vid, string paiLiang)
        {
            List <string> result = null;

            try
            {
                var minAndMax = dbScopeManagerGR.Execute(conn => DalVehicleType.GetVehicleNian(conn, vid, paiLiang));
                if (minAndMax != null)
                {
                    var min = minAndMax.Item1;
                    var max = minAndMax.Item2;
                    if (min != 0 && max != 0)
                    {
                        result = new List <string>();

                        for (int i = min; i <= max; i++)
                        {
                            result.Add(i.ToString());
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                logger.Error("GetVehicleNian", ex);
            }
            return(result);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 获取Tid
        /// </summary>
        /// <param name="vid"></param>
        /// <param name="paiLiang"></param>
        /// <param name="nian"></param>
        /// <returns></returns>
        public IEnumerable <string> GetTids(string vid, string paiLiang, string nian)
        {
            IEnumerable <string> result = null;

            try
            {
                result = dbScopeManagerGR.Execute(conn => DalVehicleType.GetTids(conn, vid, paiLiang, nian));
            }
            catch (Exception ex)
            {
                logger.Error("GetTids", ex);
            }
            return(result);
        }
Ejemplo n.º 3
0
        public IDictionary <string, string> GetVehicleSeries(string brand)
        {
            IDictionary <string, string> result = null;

            try
            {
                result = dbScopeManagerGR.Execute(connection => DalVehicleType.SelectVehicleSeries(connection, brand));
            }
            catch (Exception ex)
            {
                logger.Log(Level.Error, ex.Message);
            }

            return(result);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 获取排量
        /// </summary>
        /// <param name="vid"></param>
        /// <returns></returns>
        public IEnumerable <string> GetVehiclePaiLiang(string vid)
        {
            IEnumerable <string> result = null;

            try
            {
                result = dbScopeManagerGR.Execute(conn => DalVehicleType.GetVehiclePaiLiang(conn, vid));
            }
            catch (Exception ex)
            {
                logger.Error("GetVehiclePaiLiang", ex);
            }

            return(result);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 获取年款信息
        /// </summary>
        /// <param name="vid"></param>
        /// <param name="paiLiang"></param>
        /// <param name="nian"></param>
        /// <returns></returns>
        public IDictionary <string, string> GetVehicleSalesName(string vid, string paiLiang, int nian)
        {
            IDictionary <string, string> result = null;

            try
            {
                result = dbScopeManagerGR.Execute(conn => DalVehicleType.GetVehicleSalesName(conn, vid, paiLiang, nian));
            }
            catch (Exception ex)
            {
                logger.Error("GetVehicleSalesName", ex);
            }

            return(result);
        }
Ejemplo n.º 6
0
        public List <string> GetAllBrandCategories()
        {
            List <string> result = new List <string>();

            try
            {
                result = dbScopeManagerGR.Execute(connection => DalVehicleType.SelectAllBrandCategories(connection));

                if (result != null)
                {
                    result = result.OrderByDescending(o => o).ToList();
                }
            }
            catch (Exception ex)
            {
                logger.Log(Level.Error, ex.Message);
            }

            return(result);
        }
Ejemplo n.º 7
0
        public List <string> GetAllVehicleBrands()
        {
            List <string> result = new List <string>();

            try
            {
                result = dbScopeManagerGR.Execute(connection => DalVehicleType.SelectAllVehicleBrands(connection));

                if (result != null)
                {
                    result = result.OrderBy(o => o).ToList();
                }
            }
            catch (Exception ex)
            {
                logger.Error("GetAllVehicleBrands", ex);
            }

            return(result);
        }