コード例 #1
0
        /// <summary>
        /// 获取线路区域
        /// </summary>
        /// <param name="RouteType">线路类型</param>
        /// <returns>返回线路区域实体集合</returns>
        public IList <EyouSoft.Model.SystemStructure.SysArea> GetSysAreaList(Model.SystemStructure.AreaType RouteType)
        {
            IList <EyouSoft.Model.SystemStructure.SysArea> list = GetSysAreaList();

            return(list.Where(Item => (Item.RouteType == RouteType)).ToList());
        }
コード例 #2
0
        /// <summary>
        /// 删除长短线区域城市关系
        /// </summary>
        /// <param name="ProvinceId">省份ID</param>
        /// <param name="CityId">城市ID</param>
        /// <param name="AreaIds">线路区域ID集合</param>
        /// <param name="AreaType">线路区域类型</param>
        /// <returns>返回操作是否成功</returns>
        public virtual bool DeleteSysAreaSiteControl(int ProvinceId, int CityId, string AreaIds, Model.SystemStructure.AreaType AreaType)
        {
            if (AreaType == Model.SystemStructure.AreaType.国内长线 && ProvinceId <= 0)
            {
                return(false);
            }
            if (AreaType == Model.SystemStructure.AreaType.国内短线 && CityId <= 0)
            {
                return(false);
            }

            StringBuilder strWhere = new StringBuilder(Sql_SysAreaSiteControl_Del);

            strWhere.AppendFormat(" where AreaType = {0} ", (int)AreaType);
            if (ProvinceId > 0)
            {
                strWhere.AppendFormat(" and ProvinceId = {0} ", ProvinceId);
            }
            if (CityId > 0)
            {
                strWhere.AppendFormat(" and CityId = {0} ", CityId);
            }
            if (!string.IsNullOrEmpty(AreaIds))
            {
                strWhere.AppendFormat(" and AreaId in ({0}) ", AreaIds);
            }

            DbCommand dc = base.SystemStore.GetSqlStringCommand(strWhere.ToString());

            return(DbHelper.ExecuteSql(dc, base.SystemStore) > 0 ? true : false);
        }
コード例 #3
0
 /// <summary>
 /// 分页获取散拼计划列表(用户后台-组团社)
 /// </summary>
 /// <param name="pageSize">每页记录数</param>
 /// <param name="pageCurrent">当前页</param>
 /// <param name="recordCount">总记录数</param>
 /// <param name="AreaType">线路类型</param>
 /// <param name="cityId">商家所在城市</param>
 /// <param name="search">搜索实体</param>
 /// <returns>散拼计划列表</returns>
 public IList <MPowderList> GetList(int pageSize, int pageCurrent, ref int recordCount,
                                    Model.SystemStructure.AreaType AreaType, int cityId, MPowderSearch search)
 {
     return(dal.GetList(pageSize, pageCurrent, ref recordCount, AreaType, cityId, 2, search));
 }