Ejemplo n.º 1
0
        protected void LoadRouteOrder(string tourId)
        {
            tourModel = tourBll.GetTourInfo(tourId);

            if (tourModel != null)
            {
                //是否隐藏下订单按钮
                if (tourBll.IsDeleted(tourId))
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "<script>;alert('该团队不存在!');if(window.parent.Boxy.getIframeDialog){window.parent.Boxy.getIframeDialog('" + Request.QueryString["iframeId"] + "').hide();}else{window.close();}</script>");
                    return;
                }
                if (tourModel.TourState == EyouSoft.Model.TourStructure.TourState.收客 && tourModel.RemnantNumber > 0)
                {
                    ro_SaveOrder.Visible = true;
                }
                else if (tourModel.TourState != EyouSoft.Model.TourStructure.TourState.收客)
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "<script>;alert('该团队已停收!');</script>");
                }
                else if (tourModel.RemnantNumber == 0)
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "<script>;alert('该团队人数已满!');</script>");
                }
                parentId = tourModel.ParentTourID;//获取模板团编号
            }
            else
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "<script>;alert('该团队不存在!');if(window.parent.Boxy.getIframeDialog){window.parent.Boxy.getIframeDialog('" + Request.QueryString["iframeId"] + "').hide();}else{window.close();}</script>");
                return;
            }

            routeName = tourModel.RouteName;//线路名称
            startDate = tourModel.LeaveDate.ToString("yyyy-MM-dd");
            weekDay   = EyouSoft.Common.Utils.ConvertWeekDayToChinese(tourModel.LeaveDate);
            remain    = tourModel.RemnantNumber; //剩余人数

            company = tourModel.CompanyName;     //公司名称
            contant = tourModel.TourContact;     //团队负责人
            tel     = tourModel.TourContactTel;
            MQ      = tourModel.TourContacMQ;
            int cityId = tourModel.LeaveCity;//出港城市ID

            ro_traffic.Value = tourModel.LeaveTraffic;
            EyouSoft.Model.SystemStructure.SysCity cityModel = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(cityId);
            if (cityModel != null)
            {
                leaveCity = cityModel.CityName;//获取出港城市名
            }
            //绑定报价类型   leaveCity
            EyouSoft.IBLL.SystemStructure.ISysCity cityBll = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance();
            ro_rpt_priceList.DataSource = tourModel.TourPriceDetail;
            ro_rpt_priceList.DataBind();
        }