Exemplo n.º 1
0
        /// <summary>
        /// 设置团队类型,即推广状态
        /// </summary>
        private void SetTourMarkerNote()
        {
            if (!IsGrantUpdate)
            {
                Response.Clear();
                Response.Write("[{isSuccess:false,ErrorMessage:'对不起,你当前登录的帐号没有权限执行该操作!'}]");
                Response.End();
            }
            EyouSoft.Model.TourStructure.TourSpreadState SpreadState = EyouSoft.Model.TourStructure.TourSpreadState.None;
            switch (Utils.GetFormValue("TourMarkerNote"))
            {
            case "1":    //推荐精品
                SpreadState = EyouSoft.Model.TourStructure.TourSpreadState.推荐精品;
                break;

            case "2":    //促销
                SpreadState = EyouSoft.Model.TourStructure.TourSpreadState.促销;
                break;

            case "3":    //最新
                SpreadState = EyouSoft.Model.TourStructure.TourSpreadState.最新;
                break;

            case "4":    //品质
                SpreadState = EyouSoft.Model.TourStructure.TourSpreadState.品质;
                break;

            case "5":    //纯玩
                SpreadState = EyouSoft.Model.TourStructure.TourSpreadState.纯玩;
                break;

            default:    //none
                SpreadState = EyouSoft.Model.TourStructure.TourSpreadState.None;
                break;
            }
            string[] TourIDs = Utils.GetFormValue("TourID").Trim(',').Split(',');
            //推广说明
            string Description = Utils.GetFormValue("Description");

            EyouSoft.IBLL.TourStructure.ITour Ibll = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
            bool isTrue = Ibll.SetTourSpreadState(SpreadState, Description, TourIDs);

            Ibll = null;
            if (isTrue)
            {
                Response.Clear();
                Response.Write("[{isSuccess:true,ErrorMessage:'操作成功!'}]");
                Response.End();
            }
            else
            {
                Response.Clear();
                Response.Write("[{isSuccess:false,ErrorMessage:'操作失败!'}]");
                Response.End();
            }
        }