Ejemplo n.º 1
0
        /// <summary>
        /// 根据油漆PID获取油漆已配置城市
        /// </summary>
        /// <returns></returns>
        public static IEnumerable <CityPaintModel> SelectPaintCityListByPid(string pid, int pkid)
        {
            DataTable resulTable = DalCityPaint.SelectPaintCityListByPid(pid, pkid);

            if (resulTable != null && resulTable.Rows.Count > 0)
            {
                return(resulTable.Rows.Cast <DataRow>().Select(dr => new CityPaintModel(dr)));
            }
            else
            {
                return(new CityPaintModel[0]);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 获取已有油漆产品
        /// </summary>
        /// <returns></returns>
        public static IEnumerable <PaintModel> SelectPaintList()
        {
            DataTable resulTable = DalCityPaint.SelectPaintList();

            if (resulTable != null && resulTable.Rows.Count > 0)
            {
                return(resulTable.Rows.Cast <DataRow>().Select(dr => new PaintModel(dr)));
            }
            else
            {
                return(new PaintModel[0]);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 根据城市ID获取城市信息
        /// </summary>
        /// <returns></returns>
        public static IEnumerable <RegionCityModel> SelectCityRegionList(string pkids)
        {
            DataTable resulTable = DalCityPaint.SelectCityRegionList(pkids);

            if (resulTable != null && resulTable.Rows.Count > 0)
            {
                return(resulTable.Rows.Cast <DataRow>().Select(dr => new RegionCityModel(dr)));
            }
            else
            {
                return(new RegionCityModel[0]);
            }
        }
Ejemplo n.º 4
0
        /// 根据PID和城市ID获取油漆产品特殊价
        public static IEnumerable <PaintInfoModel> GetCityPaintByPIDAndCityId(string pid, int cityId, int pkid)
        {
            DataTable resulTable = DalCityPaint.GetCityPaintByPIDAndCityId(pid, cityId, pkid);

            if (resulTable != null && resulTable.Rows.Count > 0)
            {
                return(resulTable.Rows.Cast <DataRow>().Select(dr => new PaintInfoModel(dr)));
            }
            else
            {
                return(new PaintInfoModel[0]);
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 添加油漆产品全国价
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static bool InsertCountryPaintModelModel(PaintInfoModel model)
        {
            var result = DalCityPaint.InsertCountryPaint(model);

            return(result);
        }
Ejemplo n.º 6
0
 /// <summary>
 /// 更新油漆产品全国价信息
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public static bool UpdateCountryPaintModel(PaintInfoModel model)
 {
     return(DalCityPaint.UpdateCountryPaint(model));
 }
Ejemplo n.º 7
0
        /// 根据PID获取油漆产品全国价信息
        public static PaintInfoModel GetCountryPaintByPID(string pid)
        {
            var dr = DalCityPaint.GetCountryPaintByPID(pid);

            return(new PaintInfoModel(dr));
        }
Ejemplo n.º 8
0
        /// 根据PKID获取油漆产品全国价信息
        public static PaintInfoModel GetCountryPaintByPKID(int pkid)
        {
            var dr = DalCityPaint.GetCountryPaintByPKID(pkid);

            return(new PaintInfoModel(dr));
        }
Ejemplo n.º 9
0
        /// <summary>
        /// 批量油漆产品特殊价关联城市
        /// </summary>
        /// <returns></returns>
        public static bool BulkSaveCityPaint(DataTable dt)
        {
            var result = DalCityPaint.BulkSaveCityPaint(dt);

            return(result);
        }
Ejemplo n.º 10
0
 /// <summary>
 /// 根据PKIDs删除已关联城市
 /// </summary>
 /// <param name="list"></param>
 /// <returns></returns>
 public static bool DeleteCityPaintByList(List <CityPaintModel> list)
 {
     return(DalCityPaint.DeleteCity(list));
 }
Ejemplo n.º 11
0
 /// <summary>
 /// 根据PKID删除油漆产品特殊价
 /// </summary>
 /// <param name="pkid"></param>
 /// <returns></returns>
 public static bool DeleteCityPaintModelByPkid(int pkid)
 {
     return(DalCityPaint.DeleteCityPaintByPkid(pkid));
 }