Beispiel #1
0
        /// <summary>
        /// 删除散拼计划
        /// </summary>
        /// <param name="tourId"></param>
        /// <returns></returns>
        public bool DeletePowder(params string[] tourId)
        {
            bool result = false;

            if (tourId != null && tourId.Length > 0)
            {
                if (dal.DeletePowder(BRoute.ArrayToStr(tourId)) > 0)
                {
                    result = true;
                }
            }
            return(result);
        }
Beispiel #2
0
        /// <summary>
        /// 批量修改散拼团推荐类型
        /// </summary>
        /// <param name="type">推荐类型</param>
        /// <param name="tourId">团队编号</param>
        /// <returns></returns>
        public bool UpdatePowderRecommend(RecommendType type, params string[] tourId)
        {
            bool result = false;

            if (tourId != null && tourId.Length > 0)
            {
                if (dal.UpdatePowderRecommend(type, BRoute.ArrayToStr(tourId)) > 0)
                {
                    result = true;
                }
            }
            return(result);
        }
Beispiel #3
0
        /// <summary>
        /// 批量修改散拼团状态
        /// </summary>
        /// <param name="status">散拼团状态</param>
        /// <param name="tourId">团队编号</param>
        /// <returns></returns>
        public bool UpdateStatus(PowderTourStatus status, params string[] tourId)
        {
            bool result = false;

            if (tourId != null && tourId.Length > 0)
            {
                if (dal.UpdateStatus(status, BRoute.ArrayToStr(tourId)) > 0)
                {
                    result = true;
                }
            }
            return(result);
        }
Beispiel #4
0
        /// <summary>
        /// 修改散拼计划
        /// </summary>
        /// <param name="item">散拼实体</param>
        /// <returns></returns>
        public bool UpdatePowder(MPowderList item)
        {
            bool result = false;

            if (item != null)
            {
                item.StartCityName = BRoute.GetCityName(item.StartCity);
                item.EndCityName   = BRoute.GetCityName(item.EndCity);
                item.ComeBackDate  = item.LeaveDate.AddDays(item.Day);
                if (dal.UpdatePowder(item) > 0)
                {
                    result = true;
                }
            }
            return(result);
        }
Beispiel #5
0
        /// <summary>
        /// 添加散拼计划
        /// </summary>
        /// <param name="item">散拼实体</param>
        /// <returns></returns>
        public bool AddPowder(MPowderList item)
        {
            bool result = false;

            if (item != null)
            {
                item.TourId        = Guid.NewGuid().ToString();
                item.StartCityName = BRoute.GetCityName(item.StartCity);
                item.EndCityName   = BRoute.GetCityName(item.EndCity);
                item.ComeBackDate  = item.LeaveDate.AddDays(item.Day);
                if (dal.AddPowder(item) > 0)
                {
                    result = true;
                }
            }
            return(result);
        }