Esempio n. 1
0
        /// <summary>
        /// 设置收客状态
        /// </summary>
        private void ChangeState()
        {
            if (!IsGrantUpdate)
            {
                Response.Clear();
                Response.Write("[{isSuccess:false,ErrorMessage:'对不起,你当前登录的帐号没有权限执行该操作!'}]");
                Response.End();
            }
            EyouSoft.Model.TourStructure.TourState TourState = new EyouSoft.Model.TourStructure.TourState();
            switch (Utils.GetQueryStringValue("TourState"))
            {
            case "1":
                TourState = EyouSoft.Model.TourStructure.TourState.手动客满;
                break;

            case "2":
                TourState = EyouSoft.Model.TourStructure.TourState.手动停收;
                break;

            default:
                TourState = EyouSoft.Model.TourStructure.TourState.收客;
                break;
            }
            EyouSoft.IBLL.TourStructure.ITour Ibll = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
            string[] TourIDs = Utils.GetQueryStringValue("TourID").Trim(',').Split(',');
            bool     isTrue  = Ibll.SetTourState(TourState, TourIDs);

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