예제 #1
0
        /// <summary>
        /// 页面初始化方法
        /// </summary>
        /// <param name="travelId">行程单ID</param>
        protected void DataInit(string tourId)
        {
            //声明bll对象
            EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour();
            //声明团队计划对象
            EyouSoft.Model.TourStructure.TourInfo model = (EyouSoft.Model.TourStructure.TourInfo)bll.GetTourInfo(tourId);
            if (model != null)
            {
                //线路名称
                this.lblAreaName.Text = model.RouteName;
                //团号
                this.lblTeamNum.Text = model.TourCode;
                //天数
                this.lblDay.Text = model.TourDays.ToString();
                //成人数
                this.lblAdult.Text = model.PlanPeopleNumber.ToString();
                //儿童数

                //出发交通
                this.lblBegin.Text = model.LTraffic;
                //返程交通
                this.lblEnd.Text = model.RTraffic;
                //行程安排
                this.litTravel.Text = model.TourQuickInfo.QuickPlan;
                //服务标准
                this.litService.Text = model.TourQuickInfo.Service;
                //地接社信息
                this.rptDjInfo.DataSource = model.LocalAgencys;
                this.rptDjInfo.DataBind();
            }
        }
예제 #2
0
 /// <summary>
 /// 初始化
 /// </summary>
 private void InitPage()
 {
     BindingPriceCustomerLeaveDetail();
     #region 预订
     EyouSoft.IBLL.TourStructure.ITour     Ibll  = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
     EyouSoft.Model.TourStructure.TourInfo Model = new EyouSoft.Model.TourStructure.TourInfo();
     Model = Ibll.GetTourInfo(TourID);
     if (Model != null)
     {
         FromCompanyID = Model.CompanyID;
         RouteName     = Model.RouteName;
         LeaveDate     = Model.LeaveDate.ToShortDateString();
         leaveDateDay  = Utils.ConvertWeekDayToChinese(Model.LeaveDate);
         RemnantNumber = Model.RealRemnantNumber;
         Traffic       = Model.LeaveTraffic;
         if (Model.ServiceStandard != null)
         {
             SpecialContent = Model.ServiceStandard.SpeciallyNotice;
         }
         int HasIn = Model.CollectAdultNumber + Model.CollectChildrenNumber;
         if (HasIn >= Model.PlanPeopleCount)
         {
             EyouSoft.Common.Function.MessageBox.ResponseScript(this.Page, "alert('实收人数已经等于或者大于实际计划人数!');closeWin()");
             Ibll  = null;
             Model = null;
             return;
         }
     }
     Ibll  = null;
     Model = null;
     #endregion
 }
예제 #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     //声明bll对象
     EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo);
     //声明散拼计划对象
     EyouSoft.Model.TourStructure.TourBaseInfo tModel = bll.GetTourInfo(Utils.GetQueryStringValue("tourId"));
     if (tModel != null)
     {
         if (tModel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划)
         {
             EyouSoft.Model.TourStructure.TourTeamInfo model = (EyouSoft.Model.TourStructure.TourTeamInfo)tModel;
             Bind(model);
         }
         else
         {
             EyouSoft.Model.TourStructure.TourInfo model = (EyouSoft.Model.TourStructure.TourInfo)tModel;
             Bind(model);
         }
     }
     else
     {
         Response.Clear();
         Response.Write("未找到信息!");
         Response.End();
     }
 }
예제 #4
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();
        }
예제 #5
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void InitPage()
        {
            if (!string.IsNullOrEmpty(TourID))
            {
                EyouSoft.IBLL.TourStructure.ITour     Ibll  = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
                EyouSoft.Model.TourStructure.TourInfo model = new EyouSoft.Model.TourStructure.TourInfo();
                model = Ibll.GetTourInfo(TourID);
                if (model != null)
                {
                    TemplateTourID     = model.ParentTourID;
                    RouteName          = model.RouteName;
                    RouteArea          = model.AreaId;
                    AreaName           = EyouSoft.BLL.SystemStructure.SysArea.CreateInstance().GetSysAreaModel(model.AreaId).AreaName;
                    LeaveDate          = model.LeaveDate.ToShortDateString();
                    LeaveTime          = model.LeaveDate;
                    LeaveDateDayOfWeek = model.LeaveDate.DayOfWeek.ToString();
                    PeerAdultPrice     = string.Format("{0:F2}", model.TravelAdultPrice);
                    PeerChildrenPrice  = string.Format("{0:F2}", model.TravelChildrenPrice);

                    StoreAdultPrice    = string.Format("{0:F2}", model.RetailAdultPrice);
                    StoreChildrenPrice = string.Format("{0:F2}", model.RetailChildrenPrice);
                    RemnantNumber      = model.RemnantNumber;
                    #region 报价等级
                    List <EyouSoft.Model.TourStructure.TourPriceDetail> priceList = new List <EyouSoft.Model.TourStructure.TourPriceDetail>();
                    priceList = (List <EyouSoft.Model.TourStructure.TourPriceDetail>)model.TourPriceDetail;
                    AddTourAgain_tourpricestand.TourPriceDetails = model.TourPriceDetail;

                    IList <EyouSoft.Model.TourStructure.ChildrenTourInfo> list = Ibll.GetChildrenTours(TemplateTourID);
                    if (list != null && list.Count > 0)
                    {
                        DateTime[] TimeList = new DateTime[list.Count];
                        TimeList = (from c in list where true select c.LeaveDate).ToArray();
                        string[] TourCodeList = new string[list.Count];
                        TourCodeList = (from c in list where true select c.TourCode).ToArray();
                        IsoDateTimeConverter iso = new IsoDateTimeConverter();
                        iso.DateTimeFormat = "yyyy-M-d";
                        this.AddTourAgain_hidChildLeaveDateList.Value = JsonConvert.SerializeObject(TimeList, iso);
                        this.AddTourAgain_hidChildTourCodeList.Value  = JsonConvert.SerializeObject(TourCodeList);
                    }
                    priceList = null;
                    #endregion
                    if (model.ReleaseType == 0)
                    {
                        ltrAddNewPlan.Text = string.Format("<a href=\"{0}\" rel='TapAddTourAgain'>增加发布{1}计划</a>", "/routeagency/addstandardtour.aspx", model.AreaName);
                    }
                    else
                    {
                        ltrAddNewPlan.Text = string.Format("<a href=\"{0}\" rel='TapAddTourAgain'>增加发布{1}计划</a>", "/routeagency/addquicktour.aspx", model.AreaName);
                    }
                }
                Ibll  = null;
                model = null;
            }
        }
예제 #6
0
        /// <summary>
        /// 绑定客户等级
        /// </summary>
        void BindCustomers()
        {
            //List<Customers> list = new List<Customers>();
            //list.Add(new Customers(3, "客户等级"));
            //rpt_Customer.DataSource = list;
            //rpt_Customer.DataBind();

            EyouSoft.BLL.TourStructure.Tour       tour  = new EyouSoft.BLL.TourStructure.Tour();
            EyouSoft.Model.TourStructure.TourInfo binfo = new EyouSoft.Model.TourStructure.TourInfo();
            binfo = (EyouSoft.Model.TourStructure.TourInfo)tour.GetTourInfo(Request.QueryString["tourId"]);
            EyouSoft.BLL.TourStructure.Tour bl = new EyouSoft.BLL.TourStructure.Tour();
            IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> listStand = binfo.PriceStandards;

            IList <EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo> listCust = listStand.First().CustomerLevels;



            IList <EyouSoft.Model.CompanyStructure.CustomStand> list = new List <EyouSoft.Model.CompanyStructure.CustomStand>();

            EyouSoft.BLL.CompanyStructure.CompanyCustomStand bll = new EyouSoft.BLL.CompanyStructure.CompanyCustomStand();

            list = bll.GetCustomStandByCompanyId(CurrentUserCompanyID);
            int kkk = list.Count;
            IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> plist = binfo.PriceStandards;

            for (int i = 0; i < listStand.Count; i++)
            {
                for (int j = 0; j < list.Count; j++)
                {
                    //if(listStand[i].CustomerLevels[i].LevelId == list.sel)
                    if (listStand[i].CustomerLevels.Count > j)
                    {
                        var vn = list.Where(x => x.Id == listStand[i].CustomerLevels[j].LevelId).FirstOrDefault();
                        if (vn != null)
                        {
                            listStand[i].CustomerLevels[j].LevelName = vn.CustomStandName;
                        }
                        else
                        {
                            listStand[i].CustomerLevels.RemoveAt(j);
                        }
                    }
                    var xn = listStand[i].CustomerLevels.Where(x => x.LevelId == list[j].Id).FirstOrDefault();
                    if (xn == null)
                    {
                        listStand[i].CustomerLevels.Add(new EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo()
                        {
                            LevelId = list[j].Id, LevelType = list[j].LevType, LevelName = list[j].CustomStandName, AdultPrice = 0, ChildrenPrice = 0
                        });
                    }
                }
            }
            sinfo = plist;
        }
예제 #7
0
파일: SignUp.aspx.cs 프로젝트: windygu/bbl
        protected void BindAreaInfo()
        {
            //计划中心业务逻辑类
            EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour();
            //计划团队信息实体类
            string TourId = Utils.GetQueryStringValue("tourId");

            if (TourId != null && TourId != "")
            {
                model = (EyouSoft.Model.TourStructure.TourInfo)bll.GetTourInfo(TourId);
                if (model != null)
                {
                    this.lt_xianluName.Text = model.RouteName;
                    this.lt_teamCode.Text   = model.TourCode;
                    this.lt_startDate.Text  = model.LDate.ToShortDateString();
                    this.lt_shengyu.Text    = (model.PlanPeopleNumber - model.VirtualPeopleNumber).ToString();
                    //计调员
                    this.litCoordinatorId.Text = model.Coordinator.Name.ToString();
                    //计调员编号
                    this.hidCoordinatorId.Value = model.Coordinator.CoordinatorId.ToString();

                    #region 线路区域
                    int Areaid = model.AreaId;
                    EyouSoft.BLL.CompanyStructure.Area   AreaBll = new EyouSoft.BLL.CompanyStructure.Area();
                    EyouSoft.Model.CompanyStructure.Area Area    = new EyouSoft.Model.CompanyStructure.Area();
                    Area = AreaBll.GetModel(Areaid);

                    //计调员
                    if (Area != null)
                    {
                        this.Area.Text = Area.AreaName;
                    }
                    #endregion

                    //销售员
                    EyouSoft.Model.CompanyStructure.CustomerInfo Customer = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomerModel(SiteUserInfo.TourCompany.TourCompanyId);
                    if (Customer != null)
                    {
                        this.litseller.Text = Customer.Saler;
                    }
                }
            }
            //初始化联系人
            this.txtContactName.Text = SiteUserInfo.ContactInfo.ContactName;
            //电话
            this.txtContactPhone.Text = SiteUserInfo.ContactInfo.ContactTel;
            //手机
            this.txtContactMobile.Text = SiteUserInfo.ContactInfo.ContactMobile;
            //传真
            this.txtContactFax.Text = SiteUserInfo.ContactInfo.ContactFax;
        }
예제 #8
0
파일: SignUp.aspx.cs 프로젝트: windygu/bbl
        //同意留位
        protected void btnYes_Click(object sender, EventArgs e)
        {
            //点同意留位,状态为已留位
            EyouSoft.BLL.CompanyStructure.CompanySetting        setBll   = new EyouSoft.BLL.CompanyStructure.CompanySetting();
            EyouSoft.Model.CompanyStructure.CompanyFieldSetting setModel = setBll.GetSetting(SiteUserInfo.CompanyID);
            //留位时间
            DateTime seatDate = Utils.GetDateTime(txtEndTime.Text);

            if (setModel != null)
            {
                if (seatDate != DateTime.MinValue)
                {
                    if (seatDate > DateTime.Now.AddMinutes(Convert.ToDouble(setModel.ReservationTime)))
                    {
                        printFaiMsg(string.Format("留位时间最长到{0}", DateTime.Now.AddMinutes(setModel.ReservationTime)));

                        return;
                    }
                }
                else
                {
                    printFaiMsg("留位时间输入错误!");

                    return;
                }
            }
            EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo);
            string TourId = Utils.GetQueryStringValue("tourId");

            model = (EyouSoft.Model.TourStructure.TourInfo)bll.GetTourInfo(TourId);

            #region 提交财务后不允许操作 by  txb 6.17
            if (model != null)
            {
                if (!Utils.PlanIsUpdateOrDelete(model.Status.ToString()))
                {
                    Response.Write("<script>alert('该团已提交财务,不能对它操作!');location.href=location.href;</script>");
                    return;
                }
            }
            #endregion
            if (model != null)
            {
                //EyouSoft.Model.EnumType.TourStructure.OrderState.已留位
                Save(false, seatDate);
            }

            bll   = null;
            model = null;
        }
예제 #9
0
        /// <summary>
        /// 页面初始化方法
        /// </summary>
        /// <param name="tourId">行程单ID</param>
        protected void DataInit(string tourId)
        {
            //声明bll对象
            EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo);
            //声明团队计划对象
            EyouSoft.Model.TourStructure.TourInfo model = (EyouSoft.Model.TourStructure.TourInfo)bll.GetTourInfo(tourId);
            if (model != null)
            {
                #region 页面控件赋值
                //出团日期
                LeaveDate = model.LDate;

                //线路名称
                this.lblAreaName.Text = model.RouteName;
                //团号
                this.lblTeamNum.Text = model.TourCode;
                //人数
                this.lblAdult.Text = model.PlanPeopleNumber.ToString();
                //出发交通
                this.lblBegin.Text = model.LTraffic;
                //返程交通
                this.lblEnd.Text = model.RTraffic;
                //不含项目
                this.lblNoProject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.BuHanXiangMu);
                //购物安排
                this.lblBuy.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.GouWuAnPai);
                //儿童安排
                this.lblChildPlan.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ErTongAnPai);
                //自费项目
                this.lblSelfProject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZiFeiXIangMu);
                //注意事项
                this.lblNote.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZhuYiShiXiang);
                //温馨提示
                this.lblTips.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.WenXinTiXing);
                //行程安排
                this.rptTravel.DataSource = model.TourNormalInfo.Plans;
                this.rptTravel.DataBind();
                //包含项目
                this.rptProject.DataSource = model.TourNormalInfo.Services;
                this.rptProject.DataBind();
                //地接社信息
                this.rptDjInfo.DataSource = model.LocalAgencys;
                this.rptDjInfo.DataBind();

                #endregion
            }
        }
예제 #10
0
파일: TourEveryday.cs 프로젝트: windygu/bbl
        /// <summary>
        /// 散客天天发计划生成散拼计划,正值时成功,负值或0时失败
        /// </summary>
        /// <param name="tourInfo">散拼计划信息业务实体</param>
        /// <param name="everydayTourId">天天发计划编号</param>
        /// <param name="everydayTourApplyId">天天发计划申请编号</param>
        /// <returns></returns>
        public int BuildTour(EyouSoft.Model.TourStructure.TourInfo tourInfo, string everydayTourId, string everydayTourApplyId)
        {
            int    insertTourResult = 0, dalExceptionCode = 0, buyerCompanyId = 0;
            string buildTourId = string.Empty;

            EyouSoft.BLL.TourStructure.Tour tourbll = new Tour();
            insertTourResult = tourbll.InsertTourInfo(tourInfo);
            tourbll          = null;

            if (insertTourResult > 0)
            {
                buildTourId = tourInfo.Childrens[0].ChildrenId;

                dalExceptionCode = dal.BuildTourFollow(buildTourId, everydayTourId, everydayTourApplyId, out buyerCompanyId);
            }
            else
            {
                return(-109);
            }

            if (dalExceptionCode <= 0)
            {
                return(dalExceptionCode);
            }

            #region stat.
            EyouSoft.BLL.UtilityStructure.Utility utilitybll = new EyouSoft.BLL.UtilityStructure.Utility();
            utilitybll.UpdateTradeNum(new int[] { buyerCompanyId });
            utilitybll = null;
            #endregion

            #region LGWR
            EyouSoft.Model.CompanyStructure.SysHandleLogs logInfo = new EyouSoft.Model.CompanyStructure.SysHandleLogs();
            logInfo.CompanyId    = 0;
            logInfo.DepatId      = 0;
            logInfo.EventCode    = EyouSoft.Model.CompanyStructure.SysHandleLogsNO.EventCode;
            logInfo.EventIp      = string.Empty;
            logInfo.EventMessage = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "{0}在" + EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.散拼计划_散客天天发.ToString() + "生成计划,生成的散拼计划编号为:" + buildTourId + ",天天发计划申请编号为:" + everydayTourApplyId + ",天天发计划编号为:" + everydayTourId;
            logInfo.EventTime    = DateTime.Now;
            logInfo.EventTitle   = "散客天天发计划生成散拼计划";
            logInfo.ModuleId     = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.散拼计划_散客天天发;
            logInfo.OperatorId   = 0;
            this.Logwr(logInfo);
            #endregion

            return(dalExceptionCode);
        }
예제 #11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Tourbll  = new EyouSoft.BLL.TourStructure.Tour();
            Tourinfo = new EyouSoft.Model.TourStructure.TourInfo();

            if (!IsPostBack)
            {
                //当前登录账户判断
                if (SiteUserInfo.ContactInfo.UserType != EyouSoft.Model.EnumType.CompanyStructure.CompanyUserType.地接用户)
                {
                    Response.Clear();
                    Response.Write("对不起,你不是地接用户没有权限查看!");
                    Response.End();
                }
                DateInit();
            }
        }
예제 #12
0
        /// <summary>
        /// 初始化线路信息
        /// </summary>
        protected void InitRouteInfo()
        {
            EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour();

            EyouSoft.Model.TourStructure.TourInfo tourInfo = bll.GetTourInfo(tourId) as EyouSoft.Model.TourStructure.TourInfo;

            if (tourInfo == null)
            {
                Response.Clear();
                Response.Write("未找到信息");
                Response.End();
            }

            ltrTourNumber.Text = tourInfo.TourCode;
            ltrRouteName.Text  = tourInfo.RouteName;
            ltrDays.Text       = tourInfo.TourDays.ToString();
        }
예제 #13
0
        protected string GetPrintUrl(string tourId)
        {
            string Url = string.Empty;

            //声明bll对象
            EyouSoft.BLL.TourStructure.Tour tourBll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo);
            //声明团队计划对象
            EyouSoft.Model.TourStructure.TourBaseInfo tourModel = tourBll.GetTourInfo(tourId);
            //声明bll对象
            EyouSoft.BLL.CompanyStructure.CompanySetting bll = new EyouSoft.BLL.CompanyStructure.CompanySetting();

            //判断该计划是团队计划
            if (tourModel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划)
            {
                EyouSoft.Model.TourStructure.TourTeamInfo teamModel = (EyouSoft.Model.TourStructure.TourTeamInfo)tourModel;
                //行程单
                if (teamModel.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Quick)
                {
                    //团队计划快速发布行程单
                    Url = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.团队计划快速发布行程单);
                }
                else
                {
                    //团队计划标准版发布行程单
                    Url = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.团队计划标准发布行程单);
                }
            }

            //判断该计划是散拼计划
            if (tourModel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划)
            {
                EyouSoft.Model.TourStructure.TourInfo teamModel = (EyouSoft.Model.TourStructure.TourInfo)tourModel;
                if (teamModel.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal)
                {
                    //散拼计划快速发布行程单
                    Url = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.散拼计划标准发布行程单);
                }
                if (teamModel.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Quick)
                {
                    //散拼计划标准发布行程单
                    Url = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.散拼计划快速发布行程单);
                }
            }
            return(Url);
        }
예제 #14
0
 /// <summary>
 /// 绑定线路信息
 /// </summary>
 void BindXlInfo()
 {
     EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour();
     model = (EyouSoft.Model.TourStructure.TourInfo)bll.GetTourInfo(Request.QueryString["tourId"]);
     if (model != null)
     {
         lt_xianluName.Text  = model.RouteName;
         lt_teamName.Text    = model.TourCode;
         lt_startDate.Text   = model.LDate.ToShortDateString();
         hid_StartDate.Value = model.LDate.ToShortDateString();
         lt_startBus.Text    = model.LTraffic;
         lt_backBus.Text     = model.RTraffic;
         //lt_shengyu.Text = (model.PlanPeopleNumber - model.PeopleNumberShiShou).ToString();//-model.PeopleNumberWeiChuLi-model.PeopleNumberLiuWei).ToString();
         lbshengyu.Text   = (model.PlanPeopleNumber - model.PeopleNumberShiShou).ToString();
         lt_phone.Text    = SiteUserInfo.ContactInfo.ContactTel;
         lb_username.Text = SiteUserInfo.ContactInfo.ContactName;
         lt_tel.Text      = SiteUserInfo.ContactInfo.ContactMobile;
         lt_fax.Text      = SiteUserInfo.ContactInfo.ContactFax;
         //lt_seller.Text = model.SellerName;
         lt_oprator.Text = model.Coordinator.Name;
     }
 }
예제 #15
0
        /// <summary>
        /// 页面初始化方法
        /// </summary>
        /// <param name="travelId">行程单ID</param>
        protected void DataInit(string travelId)
        {
            //声明bll对象
            EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(null, false);
            //声明团队计划对象
            EyouSoft.Model.TourStructure.TourInfo model = (EyouSoft.Model.TourStructure.TourInfo)bll.GetTourInfo(travelId);
            if (model != null)
            {
                //线路名称
                this.lblAreaName.Text = model.RouteName;
                //团号
                this.lblTeamNum.Text     = model.TourCode;
                this.lblTeamNum.Visible  = true;
                this.txttourcode.Visible = false;
                //天数
                this.lblDay.Text = model.TourDays.ToString();
                //成人数
                this.lblAdult.Text    = model.PlanPeopleNumber.ToString();
                this.lblAdult.Visible = true;
                this.TXTADULT.Visible = false;
                //儿童数
                this.lblChild.Visible = true;
                this.TXTCHILD.Visible = false;
                //出发交通
                this.lblBegin.Text    = model.LTraffic;
                this.lblBegin.Visible = true;
                this.TXtBEGIN.Visible = false;
                //返程交通
                this.lblEnd.Text    = model.RTraffic;
                this.lblEnd.Visible = true;
                this.TXTEnd.Visible = false;
                //行程安排
                this.litTravel.Text = model.TourQuickInfo.QuickPlan;
                //服务标准
                this.litService.Text = model.TourQuickInfo.Service;
                //地接社信息
                this.rptDjInfo.DataSource = model.LocalAgencys;
                this.rptDjInfo.DataBind();
                this.pnedij.Visible = true;
            }

            //组团散客天天发行程单
            if (EyouSoft.Common.Utils.GetQueryStringValue("action") == "tourevery")
            {
                string tourid = Utils.GetQueryStringValue("tourid");
                EyouSoft.BLL.TourStructure.TourEveryday       everybl    = new EyouSoft.BLL.TourStructure.TourEveryday(null, false);
                EyouSoft.Model.TourStructure.TourEverydayInfo everymodel = new EyouSoft.Model.TourStructure.TourEverydayInfo();
                everymodel = everybl.GetTourEverydayInfo(tourid);
                if (everymodel != null)
                {
                    //线路名称
                    this.lblAreaName.Text = everymodel.RouteName;
                    //团号
                    this.lblTeamNum.Visible  = false;
                    this.txttourcode.Visible = true;
                    //天数
                    this.lblDay.Text = everymodel.TourDays.ToString();
                    //成人数
                    this.lblAdult.Visible = false;
                    this.TXTADULT.Visible = true;
                    this.TXTADULT.Attributes.Add("style", "width:30px;");
                    //儿童数
                    this.lblChild.Visible = false;
                    this.TXTCHILD.Visible = true;
                    //出发交通
                    this.lblBegin.Visible = false;
                    this.TXtBEGIN.Visible = true;
                    //返程交通
                    this.lblEnd.Visible = false;
                    this.TXTEnd.Visible = true;

                    //行程安排
                    this.litTravel.Text = everymodel.TourQuickInfo.QuickPlan;
                    //服务标准
                    this.litService.Text = everymodel.TourQuickInfo.Service;
                    //地接社信息
                    this.pnedij.Visible = false;
                }
            }
        }
예제 #16
0
        /// <summary>
        /// 初始化数据
        /// </summary>
        /// <param name="tourId"></param>
        protected void DataInit(string tourId)
        {
            EyouSoft.BLL.TourStructure.Tour           bll   = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo);
            EyouSoft.Model.TourStructure.TourBaseInfo model = bll.GetTourInfo(tourId);

            EyouSoft.Model.TourStructure.TourInfo     infoModel = null;
            EyouSoft.Model.TourStructure.TourTeamInfo teamModel = null;

            if (model != null && model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划)
            {
                infoModel = (EyouSoft.Model.TourStructure.TourInfo)model;
                if (infoModel != null)
                {
                    //线路名称
                    this.litRouteName.Text = infoModel.RouteName;
                    this.litLdate.Text     = infoModel.LDate.ToString("yyyy-MM-dd");
                    //专线主要联系人
                    this.litContectName.Value = this.SiteUserInfo.ContactInfo.ContactName;
                    this.litQuerenDate.Value  = DateTime.Now.ToString("yyyy-MM-dd");
                }

                EyouSoft.Model.TourStructure.TourOrder customerList = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo).GetOrderModel(SiteUserInfo.CompanyID, EyouSoft.Common.Utils.GetQueryStringValue("orderId"));
                if (customerList != null)
                {
                    //组团社
                    buyCompanyName = customerList.BuyCompanyName;
                    //组团社联系人
                    buyCompanyContentName       = customerList.BuyerContactName;
                    this.litbuyCompanyName.Text = customerList.BuyCompanyName;

                    this.litPeopleCount.Text = customerList.PeopleNumber.ToString();
                    this.litCostDetail.Text  = (customerList.AdultNumber) + "*" + (customerList.PersonalPrice.ToString("0.00")) + " + " + (customerList.ChildNumber) + " * " + (customerList.ChildPrice.ToString("0.00"));
                    this.litCostSum.Text     = customerList.SumPrice.ToString("0.00");
                    string vistors = string.Empty;
                    if (customerList.CustomerList != null && customerList.CustomerList.Count > 0)
                    {
                        customerList.CustomerList = customerList.CustomerList.Where(p => p.CustomerStatus == EyouSoft.Model.EnumType.TourStructure.CustomerStatus.正常).ToList();
                        if (customerList.CustomerList != null && customerList.CustomerList.Count > 0)
                        {
                            for (int i = 0; i < customerList.CustomerList.Count; i++)
                            {
                                vistors += customerList.CustomerList[i].VisitorName + ",";
                            }
                        }
                    }
                    this.litVistors.Text = vistors.TrimEnd(',');
                    //备注
                    if (customerList.AmountPlus != null)
                    {
                        this.litremark.Text = customerList.AmountPlus.Remark;
                    }
                }
            }
            else
            {
                teamModel = (EyouSoft.Model.TourStructure.TourTeamInfo)model;
                if (teamModel != null)
                {
                    //组团社
                    buyCompanyName = teamModel.BuyerCName;

                    this.litbuyCompanyName.Text = teamModel.BuyerCName;

                    //组团社联系人
                    EyouSoft.Model.CompanyStructure.CustomerInfo CustomerInfo = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomerModel(teamModel.BuyerCId);
                    if (CustomerInfo != null)
                    {
                        if (CustomerInfo.CustomerContactList != null && CustomerInfo.CustomerContactList.Count > 0)
                        {
                            buyCompanyContentName = CustomerInfo.CustomerContactList[0].Name;
                        }
                    }
                    this.litRouteName.Text = teamModel.RouteName;
                    this.litLdate.Text     = teamModel.LDate.ToString("yyyy-MM-dd");
                    //专线主要联系人
                    this.litContectName.Value = this.SiteUserInfo.ContactInfo.ContactName;
                    this.litQuerenDate.Value  = DateTime.Now.ToString("yyyy-MM-dd");
                }

                EyouSoft.Model.TourStructure.TourOrder customerList = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo).GetOrderModel
                                                                          (SiteUserInfo.CompanyID, EyouSoft.Common.Utils.GetQueryStringValue("orderId"));
                if (customerList != null)
                {
                    this.litPeopleCount.Text = customerList.PeopleNumber.ToString();

                    if (customerList.TourTeamUnit != null)
                    {
                        this.litCostDetail.Text = customerList.TourTeamUnit.UnitAmountCr.ToString("0.00") + "+" + customerList.TourTeamUnit.UnitAmountEt.ToString("0.00") + "+" + customerList.TourTeamUnit.UnitAmountQp.ToString("0.00");
                    }
                    this.litCostSum.Text = customerList.SumPrice.ToString("0.00");

                    string vistors = string.Empty;
                    if (customerList.CustomerList != null && customerList.CustomerList.Count > 0)
                    {
                        customerList.CustomerList = customerList.CustomerList.Where(p => p.CustomerStatus == EyouSoft.Model.EnumType.TourStructure.CustomerStatus.正常).ToList();
                        if (customerList.CustomerList != null && customerList.CustomerList.Count > 0)
                        {
                            for (int i = 0; i < customerList.CustomerList.Count; i++)
                            {
                                vistors += customerList.CustomerList[i].VisitorName + ",";
                            }
                        }
                    }
                    this.litVistors.Text = vistors.TrimEnd(',');
                    //备注
                    if (customerList.AmountPlus != null)
                    {
                        this.litremark.Text = customerList.AmountPlus.Remark;
                    }
                }
            }


            //公司账户信息
            EyouSoft.Model.CompanyStructure.CompanyInfo info = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(CurrentUserCompanyID, CurrentUserCompanyID);
            if (info != null)
            {
                if (info.CompanyAccountList != null && info.CompanyAccountList.Count > 0)
                {
                    if (string.IsNullOrEmpty(info.CompanyAccountList[0].AccountName))
                    {
                        this.trAccountNameView.Visible = false;
                    }
                    else
                    {
                        this.lithuming.Text = info.CompanyAccountList[0].AccountName;
                    }
                    if (string.IsNullOrEmpty(info.CompanyAccountList[0].BankName) && string.IsNullOrEmpty(info.CompanyAccountList[0].BankNo))
                    {
                        this.trBankView.Visible = false;
                    }
                    else
                    {
                        this.litkaihuhang.Text = info.CompanyAccountList[0].BankName;
                        this.litzhanghao.Text  = info.CompanyAccountList[0].BankNo;
                    }
                }
                else
                {
                    this.trBankView.Visible        = false;
                    this.trAccountNameView.Visible = false;
                }
            }
        }
예제 #17
0
        /// <summary>
        /// 地接列表数据绑定
        /// </summary>
        /// <param name="travelId">计划的ID</param>
        /// <param name="planType"></param>
        protected void DataListInit(string tourId)
        {
            if (tourId != "")
            {
                //地接的操作BLL
                EyouSoft.BLL.PlanStruture.TravelAgency travelbll = new EyouSoft.BLL.PlanStruture.TravelAgency();
                //获得该计划下的所有地接的集合
                IList <EyouSoft.Model.PlanStructure.LocalTravelAgencyInfo> list = travelbll.GetList(tourId);
                if (list != null && list.Count > 0)
                {
                    //列表绑定数据
                    this.rptList.DataSource = list;
                    this.rptList.DataBind();
                    BindPage();
                }
                else
                {
                    this.ExportPageInfo1.Visible = false;
                    this.lblMsg.Text             = "没有相关数据!";
                }

                EyouSoft.Model.TourStructure.TourBaseInfo baseModel = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo).GetTourInfo(tourId);
                EyouSoft.Model.TourStructure.TourTeamInfo teamModel = null;
                EyouSoft.Model.TourStructure.TourInfo     infoModel = null;
                if (baseModel != null)
                {
                    if (baseModel.Status == EyouSoft.Model.EnumType.TourStructure.TourStatus.核算结束 || baseModel.Status == EyouSoft.Model.EnumType.TourStructure.TourStatus.财务核算)
                    {
                        this.pnlEdit.Visible  = false;
                        this.hideIsEidt.Value = "No";
                    }
                }

                if (baseModel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划)
                {
                    infoModel = (EyouSoft.Model.TourStructure.TourInfo)baseModel;
                }
                else
                {
                    teamModel = (EyouSoft.Model.TourStructure.TourTeamInfo)baseModel;
                }

                if (infoModel != null)
                {
                    this.txtBeginTime.Text = infoModel.LDate.ToString("yyyy-MM-dd");
                    this.txtEndTime.Text   = infoModel.RDate.ToString("yyyy-MM-dd");
                    if (infoModel.TourNormalInfo != null && infoModel.TourNormalInfo.Plans != null)
                    {
                        IList <Jiedai> jiedaiList = new List <Jiedai>();
                        DateTime       fristDate  = infoModel.LDate;
                        for (int j = 0; j < infoModel.TourNormalInfo.Plans.Count; j++)
                        {
                            Jiedai jModel = new Jiedai();
                            jModel.TraveDate   = fristDate.AddDays(j).ToString("yyyy-MM-dd");
                            jModel.PlanContent = infoModel.TourNormalInfo.Plans[j].Plan;
                            jiedaiList.Add(jModel);
                        }
                        this.rptJieDai.DataSource = jiedaiList;
                        this.rptJieDai.DataBind();
                    }
                }
                if (teamModel != null)
                {
                    this.txtBeginTime.Text = teamModel.LDate.ToString("yyyy-MM-dd");
                    this.txtEndTime.Text   = teamModel.RDate.ToString("yyyy-MM-dd");
                    if (teamModel.TourNormalInfo != null && teamModel.TourNormalInfo.Plans != null)
                    {
                        IList <Jiedai> jiedaiList = new List <Jiedai>();
                        DateTime       fristDate  = teamModel.LDate;
                        for (int j = 0; j < teamModel.TourNormalInfo.Plans.Count; j++)
                        {
                            Jiedai jModel = new Jiedai();
                            jModel.TraveDate   = fristDate.AddDays(j).ToString("yyyy-MM-dd");
                            jModel.PlanContent = teamModel.TourNormalInfo.Plans[j].Plan;
                            jiedaiList.Add(jModel);
                        }
                        this.rptJieDai.DataSource = jiedaiList;
                        this.rptJieDai.DataBind();
                    }
                }
            }
        }
예제 #18
0
        void Bind()
        {
            //声明bll对象
            EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo);
            string tourId = Utils.GetQueryStringValue("tourId");

            if (tourId == "")
            {
                Response.Write("未找到信息!");
                return;
            }


            //声明团队计划对象
            EyouSoft.Model.TourStructure.TourBaseInfo basemodel = bll.GetTourInfo(tourId);
            LeaveDate        = basemodel.LDate;
            lt_LDate.Text    = basemodel.LDate.Month.ToString() + "月" + basemodel.LDate.Day.ToString() + "日" + basemodel.TourType.ToString();
            lt_TourName.Text = basemodel.RouteName;
            #region 组团端
            EyouSoft.Model.CompanyStructure.CustomerInfo cusModel = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomerModel(basemodel.BuyerCId);
            if (cusModel != null)
            {
                txt_to_fax.Text  = cusModel.Fax;
                txt_to_name.Text = cusModel.Name;
                txt_to_tel.Text  = cusModel.Phone;
                txt_to_user.Text = cusModel.ContactName;
            }
            #endregion
            #region 专线
            EyouSoft.Model.CompanyStructure.ContactPersonInfo userInfoModel = new EyouSoft.BLL.CompanyStructure.CompanyUser().GetUserBasicInfo(basemodel.OperatorId);
            if (userInfoModel != null)
            {
                //主要联系人电话
                this.txt_fr_tel.Text = userInfoModel.ContactTel;
                //专线FAX
                this.txt_fr_fax.Text = userInfoModel.ContactFax;

                EyouSoft.Model.CompanyStructure.CompanyInfo companyModel = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(basemodel.CompanyId, SiteUserInfo.SysId);
                if (companyModel != null)
                {
                    this.txt_fr_user.Text = companyModel.ContactName;
                    txt_fr_name.Text      = companyModel.CompanyName;
                    txt_fr_tel.Text       = companyModel.ContactTel;
                    txt_fr_tel.Text       = companyModel.ContactFax;
                }
            }
            #endregion
            if (basemodel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划)
            {
                EyouSoft.Model.TourStructure.TourInfo model = (EyouSoft.Model.TourStructure.TourInfo)basemodel;
                if (model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal)
                {
                    tb_normal.Visible    = true;
                    rptTravel.DataSource = model.TourNormalInfo.Plans;
                    rptTravel.DataBind();
                    rptProject.DataSource = model.TourNormalInfo.Services;
                    rptProject.DataBind();
                    div_noproject.Visible = true;
                    lblNoProject.Text     = TextToHtml(model.TourNormalInfo.BuHanXiangMu);
                    div_notice.Visible    = true;
                    lt_notice.Text        = TextToHtml(model.TourNormalInfo.ZhuYiShiXiang);
                }
                else
                {
                    tb_normal.Visible       = false;
                    tb_quick.Visible        = true;
                    tb_quickService.Visible = true;
                    lb_Quick.Text           = model.TourQuickInfo.QuickPlan;
                    lt_service.Text         = model.TourQuickInfo.Service;
                }
            }
            else
            if (basemodel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划)
            {
                EyouSoft.Model.TourStructure.TourTeamInfo model = (EyouSoft.Model.TourStructure.TourTeamInfo)basemodel;
                if (model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal)
                {
                    tb_normal.Visible = true;
                    if (model.TourNormalInfo != null)
                    {
                        rptTravel.DataSource = model.TourNormalInfo.Plans;
                        rptTravel.DataBind();
                        rptProject.DataSource = model.Services;
                        rptProject.DataBind();
                        div_noproject.Visible = true;
                        lblNoProject.Text     = TextToHtml(model.TourNormalInfo.BuHanXiangMu);
                        div_notice.Visible    = true;
                        lt_notice.Text        = TextToHtml(model.TourNormalInfo.ZhuYiShiXiang);
                    }
                }
                else
                {
                    if (model.TourQuickInfo != null)
                    {
                        tb_normal.Visible       = false;
                        tb_quick.Visible        = true;
                        tb_quickService.Visible = true;
                        lb_Quick.Text           = model.TourQuickInfo.QuickPlan;
                        lt_service.Text         = model.TourQuickInfo.Service;
                    }
                }

                /*#region 结算价
                 * TourQuotePrint priantTQP = new TourQuotePrint();
                 * string number = string.Empty;
                 * string money = string.Empty;
                 * priantTQP.getPepoleNum(SiteUserInfo.CompanyID,model.PlanPeopleNumber, model.TourTeamUnit, ref number, ref money);
                 * this.txt_Money.Text = money;
                 #endregion*/
            }
            else if (basemodel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.单项服务)
            {
                p_title.Visible   = false;
                d_title.Visible   = false;
                Title             = "单项服务确认单";
                tb_single.Visible = true;
                tb_normal.Visible = false;
                EyouSoft.Model.TourStructure.TourSingleInfo model = (EyouSoft.Model.TourStructure.TourSingleInfo)basemodel;
                rpt_single.DataSource = model.Plans;
                rpt_single.DataBind();
                txt_Money.Text = model.TotalAmount.ToString("#,##0.00");
            }


            if (basemodel.TourType != EyouSoft.Model.EnumType.TourStructure.TourType.单项服务)
            {
                phJieSuanJiaGe.Visible = true;
                EyouSoft.BLL.PlanStruture.TravelAgency planbll = new EyouSoft.BLL.PlanStruture.TravelAgency();
                IList <EyouSoft.Model.PlanStructure.LocalTravelAgencyInfo> agencys = planbll.GetList(tourId);
                planbll = null;

                if (agencys != null && agencys.Count > 0)
                {
                    System.Text.StringBuilder s = new System.Text.StringBuilder();

                    foreach (var agency in agencys)
                    {
                        s.AppendFormat("单位名称:{0} 结算费用:{1}    ", agency.LocalTravelAgency, Utils.FilterEndOfTheZeroDecimal(agency.Settlement));
                    }

                    txt_Money.Text = s.ToString();
                }
            }
        }
예제 #19
0
        protected void btnWordPrint_Click(object sender, EventArgs e)
        {
            string PrintTopHtml    = Request.Form["hidPrintTopHTML"];
            string PrintFooterHtml = Request.Form["hidPrintFooterHTML"];
            string PrintMiddleHtml = string.Empty;
            string saveFileName    = HttpUtility.UrlEncode("行程单.doc");

            EyouSoft.IBLL.TourStructure.ITour     Ibll  = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
            EyouSoft.Model.TourStructure.TourInfo model = Ibll.GetTourInfo(TourID);
            if (model != null)
            {
                this.TemplateTourID = model.ParentTourID;
                #region 价格等级信息
                IList <EyouSoft.Model.TourStructure.TourPriceDetail> PriceLists = EyouSoft.BLL.TourStructure.Tour.CreateInstance().GetTourPriceDetail(TemplateTourID);
                List <UserBackCenter.RouteAgency.CompanyPriceDetail> newLists   = new List <UserBackCenter.RouteAgency.CompanyPriceDetail>();
                if (PriceLists != null && PriceLists.Count > 0)
                {
                    PrintMiddleHtml += "<table width=\"720\" border=\"0\" align=\"center\" cellspacing=\"1\" bgcolor=\"#FFFFFF\">";
                    ((List <EyouSoft.Model.TourStructure.TourPriceDetail>)PriceLists).ForEach(item =>
                    {
                        ((List <EyouSoft.Model.TourStructure.TourPriceCustomerLeaveDetail>)item.PriceDetail).ForEach(childItem =>
                        {
                            switch (childItem.CustomerLevelType)
                            {
                            case EyouSoft.Model.CompanyStructure.CustomerLevelType.门市:
                                PrintMiddleHtml += "<tr><td width=\"70\" align=\"left\" bgcolor=\"#eeeeee\">" + item.PriceStandName + ":</td>";
                                PrintMiddleHtml += "<td  bgcolor=\"#eeeeee\">成人价:<span class=\"bottow_side2\">" + childItem.AdultPrice.ToString("F2") + "</span>元/人";
                                PrintMiddleHtml += " <td  align=\"right\" bgcolor=\"#eeeeee\">儿童价: ";
                                PrintMiddleHtml += "<span class=\"bottow_side2\">" + childItem.ChildrenPrice.ToString("F2") + "</span>元/人</td>";
                                break;

                            case EyouSoft.Model.CompanyStructure.CustomerLevelType.单房差:
                                PrintMiddleHtml += "<td align=\"right\" bgcolor=\"#eeeeee\">单房差:";
                                PrintMiddleHtml += "<span class=\"bottow_side2\">" + childItem.AdultPrice.ToString("F2") + "</span>元/人</td></tr>";
                                break;
                            }
                        });
                    });
                    newLists         = null;
                    PrintMiddleHtml += "</table>";
                }
                PriceLists = null;
                #endregion
            }
            model = null;
            Ibll  = null;
            Response.ClearContent();
            Response.AddHeader("content-disposition", string.Format("attachment;filename={0}", saveFileName));
            Response.ContentType     = "application/ms-word";
            Response.Charset         = "utf-8";
            Response.ContentEncoding = System.Text.Encoding.UTF8;

            string wordTemplate = @"
                <html>
                <head>
                    <title>打印预览</title>
                    <style type=""text/css"">
                    body {{color:#000000;font-size:12px;font-family:""宋体"";background:#fff; margin:0px;}}
                    img {{border: thin none;}}
                    table {{border-collapse:collapse;width:720px;}}                     
                    .headertitle {{font-family:""黑体""; font-size:25px; line-height:120%; font-weight:bold;}}
                    .bottow_side2{{background: #EEEEEE none repeat scroll 0 0;
                                border-color: -moz-use-text-color -moz-use-text-color #000000;
                                border-style: none none solid;
                                border-width: 0 0 1px;
                        }}
                    </style>
                </head>
                <body>
                    <div id=""divPrintPreview"">{0}{1}{2}</div>
                </body>
                </html>";

            Response.Write(string.Format(wordTemplate, PrintTopHtml, PrintMiddleHtml, PrintFooterHtml));
            Response.End();
        }
예제 #20
0
        /// <summary>
        /// 生成计划
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void LinkButton1_Click(object sender, EventArgs e)
        {
            EyouSoft.Model.TourStructure.TourInfo   info = new EyouSoft.Model.TourStructure.TourInfo();
            EyouSoft.BLL.TourStructure.TourEveryday bl   = new EyouSoft.BLL.TourStructure.TourEveryday(SiteUserInfo);
            #region 基础数据获取
            string tourId  = Utils.GetQueryStringValue("tourid");
            string ApplyId = Utils.GetQueryStringValue("ApplyId");
            EyouSoft.Model.TourStructure.TourEverydayInfo      model      = bl.GetTourEverydayInfo(tourId);
            EyouSoft.Model.TourStructure.TourEverydayApplyInfo applyModel = new EyouSoft.Model.TourStructure.TourEverydayApplyInfo();
            applyModel   = bl.GetTourEverydayApplyInfo(ApplyId);
            info.AreaId  = model.AreaId;
            info.Attachs = model.Attachs;
            #region 子团
            IList <EyouSoft.Model.TourStructure.TourChildrenInfo> childlist = new
                                                                              List <EyouSoft.Model.TourStructure.TourChildrenInfo>();
            string tourcode = Utils.GetFormValue("txt_tuanhao");
            if (tourcode.Trim().Length == 0)
            {
                EyouSoft.Common.Function.MessageBox.Show(this, "团号不能为空");
                BindInfo();
                return;
            }
            childlist.Add(new EyouSoft.Model.TourStructure.TourChildrenInfo()
            {
                LDate = applyModel.LDate, TourCode = tourcode
            });
            info.Childrens = childlist;
            #endregion
            info.CompanyId   = CurrentUserCompanyID;
            info.Coordinator = new EyouSoft.Model.TourStructure.TourCoordinatorInfo()
            {
                CoordinatorId = Utils.GetInt(Utils.GetFormValue("sel_oprator"))
            };
            info.CreateRule = new EyouSoft.Model.TourStructure.TourCreateRuleInfo()
            {
                Cycle = null, EDate = null, Rule = EyouSoft.Model.EnumType.TourStructure.CreateTourRule.日期, SDate = applyModel.LDate
            };
            info.CreateTime       = DateTime.Now;
            info.Gather           = Utils.GetFormValue("txt_jhfs");
            info.GatheringPlace   = Utils.GetFormValue("txt_jhdd");
            info.GatheringSign    = Utils.GetFormValue("txt_jhbz");
            info.GatheringTime    = Utils.GetFormValue("txt_jhdate");
            info.LDate            = applyModel.LDate;
            info.LTraffic         = Utils.GetFormValue("txt_qcDate");
            info.OperatorId       = SiteUserInfo.ID;
            info.ORouteId         = model.RouteId;
            info.PlanPeopleNumber = Utils.GetInt(Utils.GetFormValue("txt_ykrs"));
            info.PriceStandards   = model.PriceStandards;
            //info.RDate
            info.ReleaseType = EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal;
            info.RouteId     = model.RouteId;
            info.RouteName   = model.RouteName;
            info.RTraffic    = Utils.GetFormValue("txt_hcDate");
            //info.SellerId
            //info.SellerName

            List <EyouSoft.Model.TourStructure.TourSentPeopleInfo> sentpepole = new List <EyouSoft.Model.TourStructure.TourSentPeopleInfo>();
            string[] strOperId = SelectgroupPepole.OperId.Split(',');
            for (int i = 0; i < strOperId.Length; i++)
            {
                EyouSoft.Model.TourStructure.TourSentPeopleInfo sent = new EyouSoft.Model.TourStructure.TourSentPeopleInfo();
                sent.OperatorId   = Utils.GetInt(strOperId[i]);
                sent.OperatorName = SelectgroupPepole.OperName.Split(',')[i];
                sentpepole.Add(sent);
            }
            info.SentPeoples  = sentpepole;
            info.Status       = EyouSoft.Model.EnumType.TourStructure.TourStatus.正在收客;
            info.TicketStatus = EyouSoft.Model.EnumType.PlanStructure.TicketState.None;
            info.TourCode     = Utils.GetFormValue("txt_tuanhao");
            info.TourDays     = model.TourDays;
            //info.TourId
            info.TourNormalInfo = new EyouSoft.Model.TourStructure.TourNormalPrivateInfo()
            {
                BuHanXiangMu = model.TourNormalInfo.BuHanXiangMu, ErTongAnPai = model.TourNormalInfo.ErTongAnPai, GouWuAnPai = model.TourNormalInfo.GouWuAnPai, NeiBuXingXi = model.TourNormalInfo.NeiBuXingXi, Plans = model.TourNormalInfo.Plans, Services = model.TourNormalInfo.Services, WenXinTiXing = model.TourNormalInfo.WenXinTiXing, ZhuYiShiXiang = model.TourNormalInfo.ZhuYiShiXiang, ZiFeiXIangMu = model.TourNormalInfo.ZiFeiXIangMu
            };
            info.TourType            = EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划;
            info.VirtualPeopleNumber = 0;
            #endregion
            int j = bl.BuildTour(info, tourId, ApplyId);
            if (j > 0)
            {
                Response.Write("<script>alert('生成计划成功!');parent.location.href=parent.location.href;</script>");
                BindInfo();
            }
            else
            {
                EyouSoft.Common.Function.MessageBox.Show(this, "生成失败");
                BindInfo();
            }
        }
예제 #21
0
        private void InitPage()
        {
            EyouSoft.IBLL.TourStructure.ITour     Ibll  = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
            EyouSoft.Model.TourStructure.TourInfo model = Ibll.GetTourInfo(TourID);
            if (model != null)
            {
                TemplateTourID = model.ParentTourID;
                #region 获取所属公司信息
                if (this.IsLogin)
                {
                    TourContactTel = this.SiteUserInfo.ContactInfo.Tel;
                    TourContact    = this.SiteUserInfo.ContactInfo.ContactName;
                    EyouSoft.IBLL.CompanyStructure.ICompanyInfo ICompanyInfobll  = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance();
                    EyouSoft.Model.CompanyStructure.CompanyInfo companyInfoModel = ICompanyInfobll.GetModel(this.SiteUserInfo.CompanyID);
                    CompanyName      = companyInfoModel.CompanyName;
                    CompanyAddress   = companyInfoModel.CompanyAddress;
                    License          = companyInfoModel.License;
                    ICompanyInfobll  = null;
                    companyInfoModel = null;
                }
                else
                {
                    tbl_Header.Visible = false;
                    //EyouSoft.IBLL.CompanyStructure.ICompanyInfo ICompanyInfobll = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance();
                    //EyouSoft.Model.CompanyStructure.CompanyInfo companyInfoModel = ICompanyInfobll.GetModel(model.CompanyID);
                    //CompanyName = companyInfoModel.CompanyName;
                    //CompanyAddress = companyInfoModel.CompanyAddress;
                    //License = companyInfoModel.License;
                    //TourContactTel = companyInfoModel.ContactInfo.Tel;
                    //TourContact = companyInfoModel.ContactInfo.ContactName;
                    //ICompanyInfobll = null;
                    //companyInfoModel = null;
                }
                #endregion

                #region 获取地接社信息
                if (model.LocalTravelAgency != null && model.LocalTravelAgency.Count > 0)
                {
                    rptTourLocalityInfo.DataSource = model.LocalTravelAgency;
                    rptTourLocalityInfo.DataBind();
                }
                else
                {
                    HasLocalCompanyInfo = false;
                }

                #endregion

                #region 价格等级信息
                IList <EyouSoft.Model.TourStructure.TourPriceDetail> PriceLists = EyouSoft.BLL.TourStructure.Tour.CreateInstance().GetTourPriceDetail(TemplateTourID);
                List <UserBackCenter.RouteAgency.CompanyPriceDetail> newLists   = new List <UserBackCenter.RouteAgency.CompanyPriceDetail>();
                UserBackCenter.RouteAgency.CompanyPriceDetail        cpModel    = null;
                if (PriceLists != null && PriceLists.Count > 0)
                {
                    ((List <EyouSoft.Model.TourStructure.TourPriceDetail>)PriceLists).ForEach(item =>
                    {
                        cpModel = new UserBackCenter.RouteAgency.CompanyPriceDetail();
                        cpModel.PriceStandName = item.PriceStandName;
                        ((List <EyouSoft.Model.TourStructure.TourPriceCustomerLeaveDetail>)item.PriceDetail).ForEach(childItem =>
                        {
                            switch (childItem.CustomerLevelType)
                            {
                            case EyouSoft.Model.CompanyStructure.CustomerLevelType.行:
                                cpModel.AdultPrice1    = childItem.AdultPrice;
                                cpModel.ChildrenPrice1 = childItem.ChildrenPrice;
                                break;

                            case EyouSoft.Model.CompanyStructure.CustomerLevelType.门市:
                                cpModel.AdultPrice2    = childItem.AdultPrice;
                                cpModel.ChildrenPrice2 = childItem.ChildrenPrice;
                                break;

                            case EyouSoft.Model.CompanyStructure.CustomerLevelType.单房差:
                                cpModel.SingleRoom1 = childItem.AdultPrice;
                                cpModel.SingleRoom2 = childItem.ChildrenPrice;
                                break;
                            }
                        });
                        newLists.Add(cpModel);
                        cpModel = null;
                    });
                    this.rptTourPriceDetail.DataSource = newLists;
                    this.rptTourPriceDetail.DataBind();
                    newLists = null;
                }
                PriceLists = null;
                #endregion

                #region 团队相关信息
                RouteName = model.RouteName;
                LeaveDate = model.LeaveDate;
                BackDate  = model.ComeBackDate;
                TourDays  = model.TourDays;
                TourCode  = model.TourNo;
                if (model.ReleaseType == EyouSoft.Model.TourStructure.ReleaseType.Standard)//标准发布
                {
                    Traffic           = EyouSoft.Common.Function.StringValidate.TextToHtml(model.LeaveTraffic.Trim());
                    MeetTourContect   = EyouSoft.Common.Function.StringValidate.TextToHtml(model.MeetTourContect.Trim());
                    CollectionContect = EyouSoft.Common.Function.StringValidate.TextToHtml(model.CollectionContect.Trim());
                    //行程信息及相关
                    rptStandardPlan.DataSource = model.StandardPlan;
                    rptStandardPlan.DataBind();
                    //服务标准及说明
                    List <EyouSoft.Model.TourStructure.ServiceStandard> serviceList = new List <EyouSoft.Model.TourStructure.ServiceStandard>();
                    if (model.ServiceStandard != null)
                    {
                        serviceList.Add(model.ServiceStandard);
                        NotContainService = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.NotContainService);
                        SpeciallyNotice   = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.SpeciallyNotice);
                        this.rptServiceStandard.DataSource = serviceList;
                        this.rptServiceStandard.DataBind();
                    }
                }
                else//快速发布
                {
                    isStadardType        = false;
                    pnlQuickPlan.Visible = true;
                    QuickPlanContent     = model.QuickPlan;
                }
                #endregion
            }
            Ibll  = null;
            model = null;
        }
예제 #22
0
        protected void LinkButton1_Click(object sender, EventArgs e)
        {
            LinkButton btn = sender as LinkButton;

            EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo);
            model = (EyouSoft.Model.TourStructure.TourInfo)bll.GetTourInfo(Request.QueryString["tourId"]);

            if (model != null)
            {
                if (!Utils.PlanIsUpdateOrDelete(model.Status.ToString()))
                {
                    Response.Write("<script>alert('该团已提交财务,不能对它操作!');location.href=location.href;</script>");
                    return;
                }
            }
            //结算标准
            string  jsbj      = Request.Form["radio"];
            int     cr_num    = Utils.GetInt(txt_crNum.Value);
            int     et_num    = Utils.GetInt(txt_rtNum.Value);
            decimal sum_money = Utils.GetDecimal(txt_sumMoney.Value);
            string  special   = txt_Special.Value;

            //散拼信息
            //EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour();
            //model = (EyouSoft.Model.TourStructure.TourInfo)bll.GetTourInfo(Request.QueryString["tourId"]);

            //model.PriceStandards

            EyouSoft.BLL.TourStructure.TourOrder   orderbll   = new EyouSoft.BLL.TourStructure.TourOrder();
            EyouSoft.Model.TourStructure.TourOrder ordermodel = new EyouSoft.Model.TourStructure.TourOrder();
            int crNum = Utils.GetInt(txt_crNum.Value);

            if (crNum == 0)
            {
                EyouSoft.Common.Function.MessageBox.Show(this.Page, "请填写成人数!");
                BindXlInfo();
                BindPireList();
                return;
            }
            ordermodel.AdultNumber = crNum;
            ordermodel.AreaId      = model.AreaId;
            int teamId = Utils.GetInt(Utils.GetFormValue("hd_teamId"));

            if (teamId == 0)
            {
                EyouSoft.Common.Function.MessageBox.Show(this.Page, "请选择组团社!");
                BindXlInfo();
                BindPireList();
                return;
                //Response.Write("<script>alert('请选择组团社');location.href=location.href;</script>");
            }

            ordermodel.BuyCompanyID   = teamId;
            ordermodel.BuyCompanyName = Utils.GetFormValue("txt_teamName");

            ordermodel.ChildNumber = Utils.GetInt(txt_rtNum.Value);
            ordermodel.ChildPrice  = Utils.GetDecimal(Utils.GetFormValue("hd_rt_price"));
            int cusLevel = Utils.GetInt(Utils.GetFormValue("hd_cuslevel"));

            if (cusLevel == 0)
            {
                EyouSoft.Common.Function.MessageBox.Show(this.Page, "请选择客户等级!");
                BindXlInfo();
                BindPireList();
                return;
            }
            ordermodel.CustomerLevId = cusLevel;
            IList <EyouSoft.Model.TourStructure.TourOrderCustomer> cus_list = new List <EyouSoft.Model.TourStructure.TourOrderCustomer>();

            string[] cus_arr    = Utils.GetFormValues("txtVisitorName");
            string[] uri        = Utils.GetFormValues("tefu");
            string[] cradType   = Utils.GetFormValues("ddlCardType");
            decimal  orderprice = 0;

            for (int k = 0; k < cus_arr.Length; k++)
            {
                if (cus_arr[k] == "")
                {
                    break;
                }
                EyouSoft.Model.TourStructure.TourOrderCustomer item = new EyouSoft.Model.TourStructure.TourOrderCustomer();
                item.VisitorName = cus_arr[k];
                item.VisitorType = Utils.GetFormValues("ddlVisitorType")[k] == "1" ? EyouSoft.Model.EnumType.TourStructure.VisitorType.成人 : EyouSoft.Model.EnumType.TourStructure.VisitorType.儿童;
                //switch (Utils.GetFormValues("ddlCardType")[k])
                //{
                //    case "1":
                //        {
                //            item.CradType = EyouSoft.Model.EnumType.TourStructure.CradType.身份证;
                //        } break;
                //    case "2":
                //        {
                //            item.CradType = EyouSoft.Model.EnumType.TourStructure.CradType.护照;
                //        } break;
                //    case "3":
                //        {
                //            item.CradType = EyouSoft.Model.EnumType.TourStructure.CradType.军官证;
                //        } break;
                //    case "4":
                //        {
                //            item.CradType = EyouSoft.Model.EnumType.TourStructure.CradType.台胞证;
                //        } break;
                //    case "5":
                //        {
                //            item.CradType = EyouSoft.Model.EnumType.TourStructure.CradType.港澳通行证;
                //        } break;
                //    default:
                //        {
                //            item.CradType = EyouSoft.Model.EnumType.TourStructure.CradType.未知;
                //        } break;
                //}
                item.CradType   = (EyouSoft.Model.EnumType.TourStructure.CradType)Utils.GetInt(cradType[k]);
                item.CradNumber = Utils.GetFormValues("txtCardNo")[k];
                switch (Utils.GetFormValues("ddlSex")[k])
                {
                case "2":
                {
                    item.Sex = EyouSoft.Model.EnumType.CompanyStructure.Sex.男;
                } break;

                case "1":
                {
                    item.Sex = EyouSoft.Model.EnumType.CompanyStructure.Sex.女;
                } break;

                default:
                {
                    item.Sex = EyouSoft.Model.EnumType.CompanyStructure.Sex.未知;
                } break;
                }
                item.ContactTel = Utils.GetFormValues("txtContactTel")[k];
                EyouSoft.Model.TourStructure.CustomerSpecialService css = new EyouSoft.Model.TourStructure.CustomerSpecialService();

                css.Fee                 = Utils.GetDecimal(Utils.GetFromQueryStringByKey(uri[k], "txtCost"));
                css.IsAdd               = Utils.GetFromQueryStringByKey(uri[k], "ddlOperate") == "0" ? true : false;
                css.IssueTime           = DateTime.Now;
                css.ProjectName         = Utils.GetFromQueryStringByKey(uri[k], "txtItem");
                css.ServiceDetail       = Utils.GetFromQueryStringByKey(uri[k], "txtServiceContent");
                item.SpecialServiceInfo = css;
                item.IssueTime          = DateTime.Now;
                item.CompanyID          = CurrentUserCompanyID;
                cus_list.Add(item);
                orderprice += Utils.GetDecimal(Utils.GetFromQueryStringByKey(uri[k], "txtCost"));
            }
            ordermodel.IssueTime       = DateTime.Now;
            ordermodel.OperatorContent = Utils.GetFormValue("txt_actMsg");
            ordermodel.SpecialContent  = Utils.GetFormValue("txt_Special");
            ordermodel.CustomerList    = cus_list;
            ordermodel.LastDate        = DateTime.Now;
            ordermodel.LeaveDate       = model.LDate;
            ordermodel.PriceStandId    = Utils.GetInt(Utils.GetFormValue("hd_level"));

            ordermodel.PersonalPrice   = Utils.GetDecimal(Utils.GetFormValue("hd_cr_price"));
            ordermodel.ChildPrice      = Utils.GetDecimal(Utils.GetFormValue("hd_rt_price"));
            ordermodel.ID              = Guid.NewGuid().ToString();
            ordermodel.CustomerList    = cus_list;
            ordermodel.TourId          = model.TourId;
            ordermodel.OrderType       = EyouSoft.Model.EnumType.TourStructure.OrderType.代客预定;
            ordermodel.SellCompanyId   = CurrentUserCompanyID;
            ordermodel.SellCompanyName = SiteUserInfo.CompanyName;
            ordermodel.ViewOperatorId  = SiteUserInfo.ID;
            ordermodel.TourNo          = model.TourCode;
            ordermodel.Tourdays        = model.TourDays;
            ordermodel.TourClassId     = EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划;
            ordermodel.OperatorID      = SiteUserInfo.ID;
            ordermodel.OperatorName    = SiteUserInfo.ContactInfo.ContactName;
            ordermodel.OrderState      = EyouSoft.Model.EnumType.TourStructure.OrderState.未处理;
            ordermodel.OtherPrice      = orderprice;
            ordermodel.RouteId         = model.RouteId;
            ordermodel.RouteName       = model.RouteName;
            ordermodel.SumPrice        = Utils.GetDecimal(Utils.GetFormValue(txt_sumMoney.UniqueID)) + orderprice;
            ordermodel.PeopleNumber    = Utils.GetInt(Utils.GetFormValue("txt_crNum")) + Utils.GetInt(Utils.GetFormValue("txt_rtNum"));
            ordermodel.ContactTel      = lt_phone.Text;
            ordermodel.ContactName     = lb_username.Text;
            ordermodel.ContactMobile   = lt_tel.Text;
            ordermodel.LeaveTraffic    = lt_startBus.Text;
            ordermodel.ReturnTraffic   = lt_backBus.Text;
            ordermodel.ContactFax      = lt_fax.Text;
            EyouSoft.BLL.CompanyStructure.Customer               csbll    = new EyouSoft.BLL.CompanyStructure.Customer();
            EyouSoft.Model.CompanyStructure.CustomerInfo         cusmodel = csbll.GetCustomerModel(Utils.GetInt(Utils.GetFormValue("hd_teamId"))); //
            EyouSoft.Model.TourStructure.TourOrderAmountPlusInfo am       = new EyouSoft.Model.TourStructure.TourOrderAmountPlusInfo();
            am.AddAmount          = Utils.GetDecimal(Utils.GetFormValue("txt_addmoney"));                                                          //增加费用
            am.ReduceAmount       = Utils.GetDecimal(Utils.GetFormValue("txt_minusmoney"));                                                        //减少费用
            am.Remark             = Utils.GetFormValue("txt_remark");                                                                              //备注
            ordermodel.AmountPlus = am;
            if (cusmodel != null)
            {
                ordermodel.SalerId   = cusmodel.SaleId;
                ordermodel.SalerName = cusmodel.Saler;
            }

            #region 返佣和对方操作员
            ordermodel.BuyerContactId   = Utils.GetInt(Utils.GetFormValue("otherOprator"));
            ordermodel.BuyerContactName = Utils.InputText(Utils.GetFormValue("hd_orderOprator"));
            ordermodel.CommissionType   = (EyouSoft.Model.EnumType.CompanyStructure.CommissionType)Utils.GetInt(Utils.GetFormValue("hd_rebateType"));
            ordermodel.CommissionPrice  = Utils.GetDecimal(Utils.GetFormValue("txt_Rebate"));
            #endregion

            switch (btn.CommandName)
            {
            ///提交
            case "submit":
            {
                ordermodel.SaveSeatDate = DateTime.Now;
                ordermodel.OrderState   = EyouSoft.Model.EnumType.TourStructure.OrderState.未处理;
            } break;

            case "Reservations":
            {
                ordermodel.OrderState   = EyouSoft.Model.EnumType.TourStructure.OrderState.已留位;
                ordermodel.SaveSeatDate = Utils.GetDateTime(txtEndTime.Text, DateTime.Now);
            } break;        //留位
            }
            string fileAtt    = "";
            string oldfileAtt = "";

            if (EyouSoft.Common.Function.UploadFile.FileUpLoad(Request.Files[0], "VisitorInfoFile", out fileAtt, out oldfileAtt))
            {
                ordermodel.CustomerFilePath = fileAtt;
            }
            else
            {
                EyouSoft.Common.Function.MessageBox.Show(this.Page, "上传附件失败!");
                return;
            }

            ordermodel.BuyerTourCode  = Utils.GetFormValue(txtBuyerTourCode.ClientID);
            ordermodel.OrderTrafficId = Utils.GetInt(Utils.GetFormValue("selectTraffic"));

            /// 0:失败;
            /// 1:成功;
            /// 2:该团队的订单总人数+当前订单人数大于团队计划人数总和;
            /// 3:该客户所欠金额大于最高欠款金额;
            int i = orderbll.AddOrder(ordermodel);
            switch (i)
            {
            case 1:
            {
                Response.Write("<script>alert('提交成功');parent.Boxy.getIframeDialog('" + Request.QueryString["iframeid"] + "').hide();parent.location.href=parent.location.href;</script>");
            } break;

            case 2: { Response.Write("<script>alert('该团队的订单总人数+当前订单人数大于团队计划人数总和');location.href=location.href;</script>"); } break;

            case 3: { Response.Write("<script>alert('该客户所欠金额大于最高欠款金额');location.href=location.href;</script>"); } break;

            case 4:
            {
                Response.Write("<script>alert('订单人数加上交通出团日期当天已使用票数大于交通出团日期当天人数,添加失败!');location.href=location.href;</script>");
                break;
            }

            default: { Response.Write("<script>alert('添加失败!');location.href=location.href;</script>"); } break;
            }
        }
예제 #23
0
        /// <summary>
        /// 初始化方法
        /// </summary>
        void BindXC()
        {
            string tourId = Utils.GetQueryStringValue("tourId");

            if (tourId == "")
            {
                Response.Write("未找到信息!");
                return;
            }

            //声明bll对象
            EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo);
            //声明散拼计划对象
            EyouSoft.Model.TourStructure.TourInfo model = (EyouSoft.Model.TourStructure.TourInfo)bll.GetTourInfo(tourId);
            if (model != null)
            {
                //设置出团时间
                xcTime = model.LDate;
                //发送专线
                this.txtFromCompany.Text = SiteUserInfo.CompanyName;
                this.txtCompany.Text     = SiteUserInfo.CompanyName;
                if (SiteUserInfo.ContactInfo != null)
                {
                    //联系人姓名
                    this.txtFromName.Text = SiteUserInfo.ContactInfo.ContactName;
                    //联系人传真
                    this.txtFromFax.Text = SiteUserInfo.ContactInfo.ContactFax;
                    //联系人电话
                    this.txtFromTel.Text    = SiteUserInfo.ContactInfo.ContactTel;
                    this.txtContactTel.Text = SiteUserInfo.ContactInfo.ContactTel;
                }

                //线路名称
                this.txtAreaName.Text = model.RouteName;
                //天数
                this.txtDayCount.Text = model.TourDays.ToString();
                //出发交通
                this.txtLTraffic.Text = model.LTraffic;
                //返程交通
                this.txtRTraffic.Text = model.RTraffic;
                //人数
                //this.txtPeopleCount.Text = model.PlanPeopleNumber.ToString();
                //设置游客信息
                IList <EyouSoft.Model.TourStructure.TourOrderCustomer> customerList = new EyouSoft.BLL.TourStructure.TourOrder().GetTravellers(tourId).Where(x => x.CustomerStatus == EyouSoft.Model.EnumType.TourStructure.CustomerStatus.正常).ToList();
                ;
                if (customerList != null && customerList.Count > 0)
                {
                    visitorRowsCount = customerList.Count;
                    //绑定旅客列表
                    this.rptCustomerList.DataSource = customerList;
                    this.rptCustomerList.DataBind();
                }
                //获取订单信息
                EyouSoft.Model.TourStructure.TourOrder orderModel = new EyouSoft.BLL.TourStructure.TourOrder().GetOrderModel(SiteUserInfo.CompanyID, Utils.GetQueryStringValue("orderId"));
                int buyCompanyID = orderModel.BuyCompanyID;
                #region 接收方信息
                EyouSoft.Model.CompanyStructure.CustomerInfo cModel = new EyouSoft.Model.CompanyStructure.CustomerInfo();
                EyouSoft.BLL.CompanyStructure.Customer       cBLL   = new EyouSoft.BLL.CompanyStructure.Customer();
                cModel            = cBLL.GetCustomerModel(buyCompanyID);
                txtToCompany.Text = cModel.Name;
                txtToName.Text    = cModel.ContactName;
                txtToFax.Text     = cModel.Fax;
                txtToTel.Text     = cModel.Phone;
                #endregion
                //标准版
                if (model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal)
                {
                    //隐藏快速版行程安排
                    this.tblXCFast.Visible = false;
                    //隐藏快速版服务标准
                    this.tblFastService.Visible = false;

                    if (model.SentPeoples != null && model.SentPeoples.Count > 0)
                    {
                        //送团人信息
                        for (int i = 0; i < model.SentPeoples.Count; i++)
                        {
                            EyouSoft.Model.CompanyStructure.CompanyUser SendUserInfo = new EyouSoft.BLL.CompanyStructure.CompanyUser().GetUserInfo(model.SentPeoples[i].OperatorId);
                            if (SendUserInfo != null)
                            {
                                //送团人
                                this.txtSendMan.Text += SendUserInfo.PersonInfo.ContactName == null ? "" : SendUserInfo.PersonInfo.ContactName + ",";
                                //送团电话
                                this.txtSendTel.Text += SendUserInfo.PersonInfo == null ? "" : SendUserInfo.PersonInfo.ContactTel + ",";
                            }
                        }
                        this.txtSendMan.Text = this.txtSendMan.Text.TrimEnd(',');
                        this.txtSendTel.Text = this.txtSendTel.Text.TrimEnd(',');
                    }
                    if (model.TourNormalInfo != null)
                    {
                        //行程安排
                        this.xc_list.DataSource = model.TourNormalInfo.Plans;
                        this.xc_list.DataBind();
                        //包含项目
                        this.rptProject.DataSource = model.TourNormalInfo.Services;
                        this.rptProject.DataBind();
                        //不包含项目
                        this.lblNoPriject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.BuHanXiangMu);
                        //儿童安排
                        this.lblChildren.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ErTongAnPai);

                        //购物安排
                        this.lblShop.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.GouWuAnPai);
                        //赠送项目
                        this.lblZiFei.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZiFeiXIangMu);
                        //注意事项
                        this.lblZhuyi.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZhuYiShiXiang);
                        //温馨提醒
                        this.lblTiXing.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.WenXinTiXing);
                    }
                    //获得报价说明
                    if (Utils.GetQueryStringValue("orderId") != "")
                    {
                        //EyouSoft.Model.TourStructure.TourOrder orderModel = new EyouSoft.BLL.TourStructure.TourOrder().GetOrderModel(SiteUserInfo.CompanyID, Utils.GetQueryStringValue("orderId"));
                        if (orderModel != null)
                        {
                            //成人价格
                            this.lblManPrice.Text = EyouSoft.Common.Utils.FilterEndOfTheZeroString(orderModel.PersonalPrice.ToString("0.00"));
                            //成人数
                            this.lblManCount.Text = orderModel.AdultNumber.ToString();
                            //儿童价格
                            this.lblChildPrice.Text = EyouSoft.Common.Utils.FilterEndOfTheZeroString(orderModel.ChildPrice.ToString("0.00"));
                            //儿童数
                            this.lblChildCount.Text  = orderModel.ChildNumber.ToString();
                            this.txtPeopleCount.Text = (orderModel.AdultNumber + orderModel.ChildNumber).ToString();
                            //总价格
                            this.lblAllPrice.Text = EyouSoft.Common.Utils.FilterEndOfTheZeroString(orderModel.SumPrice.ToString("0.00"));
                        }
                        else
                        {
                            //成人价格
                            this.lblManPrice.Text = "0";
                            //成人数
                            this.lblManCount.Text = "0";
                            //儿童价格
                            this.lblChildPrice.Text = "0";
                            //儿童数
                            this.lblChildCount.Text = "0";
                            //总价格
                            this.lblAllPrice.Text = "0";
                        }
                    }
                    else
                    {
                        //成人价格
                        this.lblManPrice.Text = "0";
                        //成人数
                        this.lblManCount.Text = "0";
                        //儿童价格
                        this.lblChildPrice.Text = "0";
                        //儿童数
                        this.lblChildCount.Text = "0";
                        //总价格
                        this.lblAllPrice.Text = "0";
                    }
                }
                //快速版
                else
                {
                    this.txtPeopleCount.Text = (orderModel.AdultNumber + orderModel.ChildNumber).ToString();
                    //隐藏标准版 行程安排
                    this.tblXingCheng.Visible = false;
                    //隐藏标准版 服务
                    this.tblNoService.Visible = false;
                    if (model.TourQuickInfo != null)
                    {
                        //设置行程安排
                        this.lclXingCheng.Text = model.TourQuickInfo.QuickPlan;
                        //设置服务标准
                        this.lclService.Text = model.TourQuickInfo.Service;
                    }
                }
            }


            EyouSoft.Model.CompanyStructure.CompanyInfo infoModel = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(SiteUserInfo.CompanyID, SiteUserInfo.SysId);
            if (infoModel != null)
            {
                EyouSoft.Model.CompanyStructure.CompanyAccount account = null;//公司账户
                if (infoModel.CompanyAccountList != null && infoModel.CompanyAccountList.Count > 0)
                {
                    account = infoModel.CompanyAccountList[0];

                    this.lblCompanyName.Text  = SiteUserInfo.CompanyName;
                    this.lblBankName.Text     = account.BankName;
                    this.lblBankNum.Text      = account.BankNo;
                    this.lblBankUserName.Text = account.AccountName;
                }
            }
        }
예제 #24
0
        /// <summary>
        /// 页面初始化方法
        /// </summary>
        /// <param name="tourId"></param>
        protected void DataInit(string tourId)
        {
            EyouSoft.BLL.TourStructure.Tour           bll   = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo);
            EyouSoft.Model.TourStructure.TourBaseInfo model = bll.GetTourInfo(tourId);
            if (model != null)
            {
                if (model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划)
                {
                    EyouSoft.Model.TourStructure.TourInfo tModel = (EyouSoft.Model.TourStructure.TourInfo)model;
                    if (tModel != null)
                    {
                        //线路名称
                        this.litRouteName.Text = tModel.RouteName;

                        EyouSoft.Model.TourStructure.TourOrder order = new EyouSoft.BLL.TourStructure.TourOrder().GetOrderModel(CurrentUserCompanyID, Utils.GetQueryStringValue("orderId"));
                        if (order != null)
                        {
                            //组团社
                            this.litBuyCompanyName.Text = order.BuyCompanyName;
                            //组团社联系人
                            this.litCustomName.Text = order.ContactName;
                            this.litTel.Text        = order.ContactTel;
                            this.litFax.Text        = order.ContactFax;
                            //游客信息
                            string strVistors = string.Empty;
                            if (order.CustomerList != null && order.CustomerList.Count > 0)
                            {
                                for (int i = 0; i < order.CustomerList.Count; i++)
                                {
                                    strVistors += order.CustomerList[i].VisitorName + ",";
                                }
                                this.litVisitorsList.Text = strVistors.TrimEnd(',');
                            }
                        }


                        //机场送团
                        if (tModel.SentPeoples != null && tModel.SentPeoples.Count > 0)
                        {
                            string strSongTuanName = string.Empty;
                            for (int i = 0; i < tModel.SentPeoples.Count; i++)
                            {
                                strSongTuanName += tModel.SentPeoples[i].OperatorName + ",";
                            }
                            this.litSongTuanName.Text = strSongTuanName.TrimEnd(',');

                            //手机
                            EyouSoft.Model.CompanyStructure.CompanyUser userModel = new EyouSoft.BLL.CompanyStructure.CompanyUser().GetUserInfo(tModel.SentPeoples[0].OperatorId);
                            if (userModel != null)
                            {
                                this.litSongTuanPhone.Text = userModel.PersonInfo.ContactMobile;
                            }
                        }

                        //去程航班/时间
                        this.litLFilght.Text = tModel.LTraffic;

                        //返程航班/时间
                        this.litRFilght.Text = tModel.RTraffic;
                        //集合地点
                        this.litJihePlace.Text = tModel.GatheringPlace;
                        if (tModel.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal)
                        {
                            this.litQplan.Visible = false;
                            this.pnequick.Visible = false;
                            if (tModel.TourNormalInfo != null)
                            {
                                //注意事项
                                this.litZhuYiShiXiang.Text = tModel.TourNormalInfo.ZhuYiShiXiang;
                                //温馨提醒
                                this.litWenXinTiXing.Text = tModel.TourNormalInfo.WenXinTiXing;
                                //行程安排
                                if (tModel.TourNormalInfo.Plans != null && tModel.TourNormalInfo.Plans.Count > 0)
                                {
                                    for (int i = 0; i < tModel.TourNormalInfo.Plans.Count; i++)
                                    {
                                        TravelplanStr += "<tr><td height=\"25\" align=\"center\" bgcolor=\"#FFFFFF\">" + tModel.LDate.AddDays(i).ToString("yyyy-MM-dd") + "</td><td align=\"left\" bgcolor=\"#FFFFFF\">" + tModel.TourNormalInfo.Plans[i].Plan + "</td><td align=\"center\" bgcolor=\"#FFFFFF\">" + (tModel.TourNormalInfo.Plans[i].Dinner.Contains("2") ? "早," : "") + "" + (tModel.TourNormalInfo.Plans[i].Dinner.Contains("3") ? "中," : "") + "" + (tModel.TourNormalInfo.Plans[i].Dinner.Contains("4") ? "晚," : "") + "</td><td align=\"center\" bgcolor=\"#FFFFFF\">" + tModel.TourNormalInfo.Plans[i].Hotel + "</td></tr>";
                                    }
                                }
                            }
                        }
                        else
                        {
                            this.pnetab.Visible = false;
                            this.tabView.Attributes.Add("style", "border: 1px #000000 solid");
                            this.pneStand.Visible = false;
                            if (tModel.TourQuickInfo != null)
                            {
                                this.litQplan.Text       = tModel.TourQuickInfo.QuickPlan;
                                this.litServerStand.Text = tModel.TourQuickInfo.Service;
                            }
                        }
                    }
                }
                if (model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划)
                {
                    EyouSoft.Model.TourStructure.TourTeamInfo ttModel = (EyouSoft.Model.TourStructure.TourTeamInfo)model;
                    if (ttModel != null)
                    {
                        //线路名称
                        this.litRouteName.Text = ttModel.RouteName;
                        //组团社
                        this.litBuyCompanyName.Text = ttModel.BuyerCName;
                        //组团社联系人
                        EyouSoft.Model.CompanyStructure.CustomerInfo CustomerInfo = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomerModel(ttModel.BuyerCId);
                        if (CustomerInfo != null)
                        {
                            this.litCustomName.Text = CustomerInfo.ContactName;
                            this.litTel.Text        = CustomerInfo.Phone;
                            this.litFax.Text        = CustomerInfo.Fax;
                        }

                        EyouSoft.Model.TourStructure.TourOrder order = new EyouSoft.BLL.TourStructure.TourOrder().GetOrderModel(CurrentUserCompanyID, Utils.GetQueryStringValue("orderId"));
                        if (order != null)
                        {
                            //组团社
                            this.litBuyCompanyName.Text = order.BuyCompanyName;
                            //组团社联系人
                            this.litCustomName.Text = order.ContactName;
                            this.litTel.Text        = order.ContactTel;
                            this.litFax.Text        = order.ContactFax;
                            //游客信息
                            string strVistors = string.Empty;
                            if (order.CustomerList != null && order.CustomerList.Count > 0)
                            {
                                for (int i = 0; i < order.CustomerList.Count; i++)
                                {
                                    strVistors += order.CustomerList[i].VisitorName + ",";
                                }
                                this.litVisitorsList.Text = strVistors.TrimEnd(',');
                            }
                        }

                        //机场送团
                        if (ttModel.SentPeoples != null && ttModel.SentPeoples.Count > 0)
                        {
                            string strSongTuanName = string.Empty;
                            for (int i = 0; i < ttModel.SentPeoples.Count; i++)
                            {
                                strSongTuanName += ttModel.SentPeoples[i].OperatorName + ",";
                            }
                            this.litSongTuanName.Text = strSongTuanName.TrimEnd(',');

                            //手机
                            EyouSoft.Model.CompanyStructure.CompanyUser userModel = new EyouSoft.BLL.CompanyStructure.CompanyUser().GetUserInfo(ttModel.SentPeoples[0].OperatorId);
                            if (userModel != null)
                            {
                                this.litSongTuanPhone.Text = userModel.PersonInfo.ContactMobile;
                            }
                        }

                        //去程航班/时间
                        this.litLFilght.Text = ttModel.LTraffic;

                        //返程航班/时间
                        this.litRFilght.Text = ttModel.RTraffic;

                        //集合地点
                        this.litJihePlace.Text = ttModel.GatheringPlace;
                        if (ttModel.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal)
                        {
                            this.litQplan.Visible = false;
                            this.pnequick.Visible = false;
                            if (ttModel.TourNormalInfo != null)
                            {
                                //注意事项
                                this.litZhuYiShiXiang.Text = ttModel.TourNormalInfo.ZhuYiShiXiang;
                                //温馨提醒
                                this.litWenXinTiXing.Text = ttModel.TourNormalInfo.WenXinTiXing;
                                //行程安排
                                if (ttModel.TourNormalInfo.Plans != null && ttModel.TourNormalInfo.Plans.Count > 0)
                                {
                                    for (int i = 0; i < ttModel.TourNormalInfo.Plans.Count; i++)
                                    {
                                        TravelplanStr += "<tr><td height=\"25\" align=\"center\" bgcolor=\"#FFFFFF\">" + ttModel.LDate.AddDays(i).ToString("yyyy-MM-dd") + "</td><td align=\"left\" bgcolor=\"#FFFFFF\">" + ttModel.TourNormalInfo.Plans[i].Plan + "</td><td align=\"center\" bgcolor=\"#FFFFFF\">" + (ttModel.TourNormalInfo.Plans[i].Dinner.Contains("2") ? "早," : "") + "" + (ttModel.TourNormalInfo.Plans[i].Dinner.Contains("3") ? "中," : "") + "" + (ttModel.TourNormalInfo.Plans[i].Dinner.Contains("4") ? "晚," : "") + "</td><td align=\"center\" bgcolor=\"#FFFFFF\">" + ttModel.TourNormalInfo.Plans[i].Hotel + "</td></tr>";
                                    }
                                }
                            }
                        }
                        else
                        {
                            this.pnetab.Visible   = false;
                            this.pneStand.Visible = false;
                            this.tabView.Attributes.Add("style", "border: 1px #000000 solid");
                            if (ttModel.TourQuickInfo != null)
                            {
                                this.litQplan.Text       = ttModel.TourQuickInfo.QuickPlan;
                                this.litServerStand.Text = ttModel.TourQuickInfo.Service;
                            }
                        }
                    }
                }
            }
        }
예제 #25
0
        /// <summary>
        /// 页面初始化方法
        /// </summary>
        /// <param name="travelId">行程单ID</param>
        protected void DataInit(string tourId)
        {
            //声明bll对象
            EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(null, false);
            //声明团队计划对象
            EyouSoft.Model.TourStructure.TourInfo model = (EyouSoft.Model.TourStructure.TourInfo)bll.GetTourInfo(tourId);
            if (model != null && model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal)
            {
                //出团日期
                LeaveDate = model.LDate;
                //旅游天数
                lblDayCount.Text = model.TourDays.ToString();
                #region 页面控件赋值
                //线路名称
                this.lblAreaName.Text = model.RouteName;
                //团号
                this.lblTeamNum.Text     = model.TourCode;
                this.lblTeamNum.Visible  = true;
                this.txttourcode.Visible = false;
                //人数
                this.lblAdult.Text    = model.PlanPeopleNumber.ToString();
                this.lblAdult.Visible = true;
                this.TXTADULT.Visible = false;
                //出发交通
                this.lblBegin.Text    = model.LTraffic;
                this.lblBegin.Visible = true;
                this.TXtBEGIN.Visible = false;
                //返程交通
                this.lblEnd.Text    = model.RTraffic;
                this.lblEnd.Visible = true;
                this.TXTEnd.Visible = false;
                if (model.TourNormalInfo != null)
                {
                    //不含项目
                    this.lblNoProject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.BuHanXiangMu);
                    //购物安排
                    this.lblBuy.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.GouWuAnPai);
                    //儿童安排
                    this.lblChildPlan.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ErTongAnPai);
                    //自费项目
                    this.lblSelfProject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZiFeiXIangMu);
                    //注意事项
                    this.lblNote.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZhuYiShiXiang);
                    //温馨提示
                    this.lblTips.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.WenXinTiXing);
                    //行程安排
                    this.rptTravel.DataSource = model.TourNormalInfo.Plans;
                    this.rptTravel.DataBind();
                    //包含项目
                    if (model.TourNormalInfo.Services != null)
                    {
                        tdCount = model.TourNormalInfo.Services.Count * 2;
                    }
                    this.rptProject.DataSource = model.TourNormalInfo.Services;
                    this.rptProject.DataBind();
                }
                //地接社信息
                this.rptDjInfo.DataSource = model.LocalAgencys;
                this.rptDjInfo.DataBind();
                this.Panel1.Visible = true;
                #endregion
            }

            //组团散客天天发行程单
            if (EyouSoft.Common.Utils.GetQueryStringValue("action") == "tourevery")
            {
                string tourid = Utils.GetQueryStringValue("tourid");
                EyouSoft.BLL.TourStructure.TourEveryday       everybl    = new EyouSoft.BLL.TourStructure.TourEveryday(null, false);
                EyouSoft.Model.TourStructure.TourEverydayInfo everymodel = new EyouSoft.Model.TourStructure.TourEverydayInfo();
                everymodel = everybl.GetTourEverydayInfo(tourid);
                if (everymodel != null)
                {
                    //线路名称
                    this.lblAreaName.Text = everymodel.RouteName;
                    //团号
                    this.lblTeamNum.Visible  = false;
                    this.txttourcode.Visible = true;
                    //天数
                    this.lblDayCount.Text = everymodel.TourDays.ToString();
                    //成人数
                    this.lblAdult.Visible = false;
                    this.TXTADULT.Attributes.Add("style", "width:30px;");
                    //儿童数

                    //出发交通
                    this.lblBegin.Visible = false;
                    //返程交通
                    this.lblEnd.Visible = false;
                    if (everymodel.TourNormalInfo != null)
                    {
                        //不含项目
                        this.lblNoProject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(everymodel.TourNormalInfo.BuHanXiangMu);
                        //购物安排
                        this.lblBuy.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(everymodel.TourNormalInfo.GouWuAnPai);
                        //儿童安排
                        this.lblChildPlan.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(everymodel.TourNormalInfo.ErTongAnPai);
                        //自费项目
                        this.lblSelfProject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(everymodel.TourNormalInfo.ZiFeiXIangMu);
                        //注意事项
                        this.lblNote.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(everymodel.TourNormalInfo.ZhuYiShiXiang);
                        //温馨提示
                        this.lblTips.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(everymodel.TourNormalInfo.WenXinTiXing);
                        //行程安排
                        this.rptTravel.DataSource = everymodel.TourNormalInfo.Plans;
                        this.rptTravel.DataBind();
                        //包含项目
                        if (everymodel.TourNormalInfo.Services != null)
                        {
                            tdCount = everymodel.TourNormalInfo.Services.Count * 2;
                        }
                        this.rptProject.DataSource = everymodel.TourNormalInfo.Services;
                        this.rptProject.DataBind();
                    }

                    //地接社信息
                    this.Panel1.Visible = false;
                }
            }
        }
예제 #26
0
        /// <summary>
        /// 提交事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void LinkButton1_Click(object sender, EventArgs e)
        {
            #region 基础数据读取

            if (Request.QueryString["act"] == "update")
            {
                actType = 1;
            }
            if (Request.QueryString["act"] == "copy")
            {
                actType = 2;
            }
            IList <EyouSoft.Model.CompanyStructure.CustomStand> listcus = new List <EyouSoft.Model.CompanyStructure.CustomStand>();
            EyouSoft.BLL.CompanyStructure.CompanyCustomStand    bllCom  = new CompanyCustomStand();

            EyouSoft.BLL.TourStructure.Tour       tour = new EyouSoft.BLL.TourStructure.Tour();
            EyouSoft.Model.TourStructure.TourInfo info = new EyouSoft.Model.TourStructure.TourInfo();
            if (actType == 1)
            {
                info = (EyouSoft.Model.TourStructure.TourInfo)tour.GetTourInfo(Utils.GetQueryStringValue("id"));
            }
            listcus = bllCom.GetCustomStandByCompanyId(CurrentUserCompanyID);

            int kkk = listcus.Count;

            string[] st = Utils.GetFormValues("eat");
            info.RouteId          = Utils.GetInt(selectXl.Id);
            info.AreaId           = Utils.GetInt(Utils.GetFormValue(ddl_area.UniqueID));
            info.RouteName        = selectXl.Name;
            info.TourDays         = EyouSoft.Common.Utils.GetInt(Utils.GetFormValue(txt_Days.UniqueID));
            info.PlanPeopleNumber = 1;//EyouSoft.Common.Utils.GetInt(Utils.GetFormValue(txt_pepoleNum.UniqueID));
            info.TourTraffic      = GetSelectTraffic();
            EyouSoft.Model.TourStructure.TourCreateRuleInfo rule = new EyouSoft.Model.TourStructure.TourCreateRuleInfo();
            #region 建团规则
            if (actType == 0 || actType == 2)
            {
                string gz = createTea1.getGuiZe();
                rule.EDate = EyouSoft.Common.Utils.GetDateTime(Utils.GetFromQueryStringByKey(gz, "end"));
                rule.SDate = EyouSoft.Common.Utils.GetDateTime(Utils.GetFromQueryStringByKey(gz, "start"));

                switch (Utils.GetFromQueryStringByKey(gz, "type"))
                {
                case "1":
                {
                    rule.Cycle = Utils.GetFromQueryStringByKey(gz, "data");
                    rule.Rule  = EyouSoft.Model.EnumType.TourStructure.CreateTourRule.星期;
                } break;

                case "2":
                {
                    rule.Cycle = Utils.GetFromQueryStringByKey(gz, "data");
                    rule.Rule  = EyouSoft.Model.EnumType.TourStructure.CreateTourRule.天数;
                } break;

                case "3":
                {
                    rule.SDate = null;
                    rule.EDate = null;
                    rule.Cycle = null;
                    rule.Rule  = EyouSoft.Model.EnumType.TourStructure.CreateTourRule.日期;
                } break;
                }
                info.CreateRule = rule;
            }
            else
            {
            }
            #endregion
            info.LTraffic = txt_startTraffic.Text;
            info.RTraffic = txt_endTraffic.Text;
            IList <EyouSoft.Model.TourStructure.TourLocalAgencyInfo> local;
            local             = DiJieControl1.GetList;
            info.LocalAgencys = local;

            info.CompanyId     = CurrentUserCompanyID;
            info.TourQuickInfo = new EyouSoft.Model.TourStructure.TourQuickPrivateInfo();
            IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> pricelist = new List <EyouSoft.Model.TourStructure.TourPriceStandardInfo>();
            string[] ddl_price = Utils.GetFormValues("ddl_price");
            for (int k = 0; k < ddl_price.Length; k++)
            {
                EyouSoft.Model.TourStructure.TourPriceStandardInfo price = new EyouSoft.Model.TourStructure.TourPriceStandardInfo();
                price.StandardId   = Utils.GetInt(Utils.GetFormValues("ddl_price")[k].Split('|')[0]);
                price.StandardName = Utils.GetFormValues("ddl_price")[k].Split('|')[1];
                if (ddl_price[k] == "" || price.StandardId == 0)
                {
                    continue;
                }
                IList <EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo> listLevels = new List <EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo>();


                string[] crPrice = Utils.GetFormValues("txt_cr_price");


                for (int i = 0; i < kkk; i++)
                {
                    int levId = Utils.GetInt(Utils.GetFormValues("hd_cusStandId")[i]);
                    if (levId == 0)
                    {
                        continue;
                    }
                    EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo level = new EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo();
                    level.AdultPrice    = Utils.GetDecimal(Utils.GetFormValues("txt_cr_price")[i + kkk * k]);
                    level.ChildrenPrice = Utils.GetDecimal(Utils.GetFormValues("txt_rt_price")[i + kkk * k]);
                    level.LevelType     = EyouSoft.Model.EnumType.CompanyStructure.CustomLevType.其他;
                    level.LevelName     = Utils.GetFormValues("hd_cusStandName")[i];
                    level.LevelId       = levId;
                    listLevels.Add(level);
                }
                price.CustomerLevels = listLevels;
                pricelist.Add(price);
            }
            IList <EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo> levelList = new List <EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo>();
            info.OperatorId     = SiteUserInfo.ID;
            info.PriceStandards = pricelist;
            EyouSoft.Model.TourStructure.TourQuickPrivateInfo qinfo = new EyouSoft.Model.TourStructure.TourQuickPrivateInfo();
            qinfo.QuickPlan    = Utils.EditInputText(txt_xinchen.Text);
            qinfo.Service      = Utils.EditInputText(txt_fuwu.Text);
            qinfo.Remark       = Utils.GetFormValue(txt_remark.UniqueID);
            info.TourQuickInfo = qinfo;

            IList <EyouSoft.Model.TourStructure.TourAttachInfo> listAttachs = new List <EyouSoft.Model.TourStructure.TourAttachInfo>();
            EyouSoft.Model.TourStructure.TourAttachInfo         attInfo     = new EyouSoft.Model.TourStructure.TourAttachInfo();
            string fileAtt    = "";
            string oldfileAtt = "";
            if (EyouSoft.Common.Function.UploadFile.FileUpLoad(FileUpload1.PostedFile, "sanping", out fileAtt, out oldfileAtt))
            {
                attInfo.FilePath = fileAtt;
            }
            else
            {
                EyouSoft.Common.Function.MessageBox.Show(this.Page, "上传附件失败!");
                return;
            }
            if (attInfo.FilePath.Length < 1)
            {
                attInfo.FilePath = hd_img.Value;
            }
            listAttachs.Add(attInfo);

            info.Attachs = listAttachs;
            //info.TourDays = createTea1.getDays();
            info.Coordinator = new EyouSoft.Model.TourStructure.TourCoordinatorInfo();
            info.Coordinator.CoordinatorId = Utils.GetInt(Utils.GetFormValue("sel_oprator"));
            info.TourCityId = Utils.GetInt(Utils.GetFormValue(ddl_city.UniqueID));

            #endregion
            #region 添加
            if (actType == 0 || actType == 2)
            {
                info.ReleaseType  = EyouSoft.Model.EnumType.TourStructure.ReleaseType.Quick;
                info.Status       = EyouSoft.Model.EnumType.TourStructure.TourStatus.正在收客;
                info.TourType     = EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划;
                info.TicketStatus = EyouSoft.Model.EnumType.PlanStructure.TicketState.None;
                IList <EyouSoft.Model.TourStructure.TourChildrenInfo> listChild = new List <EyouSoft.Model.TourStructure.TourChildrenInfo>();
                string[] childTeamNum = Utils.GetFormValue("hidToursNumbers").Split(',');
                string[] tourcodes    = new string[childTeamNum.Length];
                for (int i = 0; i < childTeamNum.Length; i++)
                {
                    ///子团
                    EyouSoft.Model.TourStructure.TourChildrenInfo child = new EyouSoft.Model.TourStructure.TourChildrenInfo();
                    child.TourCode = childTeamNum[i].Split('}')[1];
                    child.LDate    = Utils.GetDateTime(childTeamNum[i].Split('{')[0]);
                    listChild.Add(child);
                    tourcodes[i] = child.TourCode;
                }
                info.Childrens = listChild;

                if (!CheckGrant(TravelPermission.散拼计划_散拼计划_新增计划))
                {
                    Utils.ResponseNoPermit(TravelPermission.散拼计划_散拼计划_新增计划, false);
                }

                IList <string> list_tourCode = tour.ExistsTourCodes(SiteUserInfo.CompanyID, null, tourcodes);
                if (list_tourCode.Count > 0)
                {
                    Response.Write("<script>alert('" + string.Join(",", list_tourCode.ToArray()) + "团号已经存在!');location.href=location.href;</script>");
                    return;
                }
                int ii = tour.InsertTourInfo(info);
                if (ii > 0)
                {
                    Response.Write("<script>alert('添加成功!');location.href='default.aspx';</script>");
                }
            }
            #endregion
            else
            #region 修改
            {
                if (!Utils.PlanIsUpdateOrDelete(info.Status.ToString()))
                {
                    Response.Write("<script>alert('该团已提交财务,不能对它操作!');location.href=location.href;</script>");
                    return;
                }
                info.TourId    = Request.QueryString["id"];
                info.Childrens = null;
                info.TourCode  = txt_teamNum.Value;
                if (!CheckGrant(TravelPermission.散拼计划_散拼计划_修改计划))
                {
                    Utils.ResponseNoPermit(TravelPermission.散拼计划_散拼计划_修改计划, false);
                }

                IList <string> list_tourCode = tour.ExistsTourCodes(SiteUserInfo.CompanyID, info.TourId, info.TourCode);
                if (list_tourCode.Count > 0)
                {
                    Response.Write("<script>alert('团号已经存在!');location.href=location.href;</script>");
                    return;
                }
                int ii = tour.UpdateTourInfo(info);
                if (ii > 0)
                {
                    Response.Write("<script>alert('修改成功!');location.href='default.aspx';</script>");
                }
                else
                {
                    Response.Write("<script>alert('修改失败!');location.href=location.href;</script>");
                }
            }
            #endregion
        }
예제 #27
0
        /// <summary>
        /// 散拼出团任务书
        /// </summary>
        /// <param name="model"></param>
        private void Bind(EyouSoft.Model.TourStructure.TourInfo model)
        {
            //发团时间
            xcTime = model.LDate;
            //出发交通
            lblGoTraffic.Text = model.LTraffic;
            //返回交通
            lblEndTraffic.Text = model.RTraffic;
            //出团时间
            lblLDate.Text = model.LDate.ToShortDateString();
            //联系人
            EyouSoft.BLL.CompanyStructure.CompanyUser csBLL = new EyouSoft.BLL.CompanyStructure.CompanyUser();
            string SentPeoples = "";

            //判断是否有联系人
            if (model.SentPeoples.Count >= 0)
            {
                for (int i = 0; i < model.SentPeoples.Count; i++)
                {
                    //联系人数据
                    SentPeoples = "";
                    string tel = csBLL.GetUserBasicInfo(model.SentPeoples[i].OperatorId).ContactTel;
                    SentPeoples += "联系人:" + model.SentPeoples[i].OperatorName + "" + tel;
                }
            }
            else
            {
                SentPeoples = "暂无联系人";
            }
            //联系人
            lblSentPeoples.Text = SentPeoples;
            //集合时间
            lblGatheringTime.Text = model.GatheringTime;
            //集合地点
            lblGatheringPlace.Text = model.GatheringPlace;
            //集合标志
            lblGatheringSign.Text = model.GatheringSign;
            //返航时间
            lblRTraffic.Text = model.RTraffic;
            //线路名称
            lblRouteName.Text = model.RouteName;
            //地接安排
            if (model.LocalAgencys != null)
            {
                rptlist.DataSource = model.LocalAgencys;
                rptlist.DataBind();
            }
            //标准发布
            if (model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal)
            {
                //标准发布数据不为空
                if (model.TourNormalInfo != null)
                {
                    //行程信息
                    xc_list.DataSource = model.TourNormalInfo.Plans;
                    xc_list.DataBind();
                    //不包含项目
                    lblBuHanXiangMu.Text = model.TourNormalInfo.BuHanXiangMu;
                    //自费项目
                    lblZiFeiXIangMu.Text = model.TourNormalInfo.ZiFeiXIangMu;
                    //儿童安排
                    lblErTongAnPai.Text = model.TourNormalInfo.ErTongAnPai;
                    //购物安排
                    lblGouWuAnPai.Text = model.TourNormalInfo.GouWuAnPai;
                    //购物安排
                    lblGouWuAnPai.Text = model.TourNormalInfo.GouWuAnPai;
                    //注意事项
                    lblZhuYiShiXiang.Text = model.TourNormalInfo.ZhuYiShiXiang;
                    //包含项目数据绑定
                    rpt_sList.DataSource = model.TourNormalInfo.Services;
                    rpt_sList.DataBind();
                    //显示标准
                    pnlProject.Visible = true;
                    //隐藏快速
                    xcquick.Visible = false;
                }


                //lt_desc.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.WenXinTiXing);
            }
            else//快速发布
            {
                //隐藏标准
                pnlProject.Visible = false;
                //显示快速
                xcquick.Visible = true;
                if (model.TourQuickInfo != null)
                {
                    lblQuickPlan.Text = model.TourQuickInfo.QuickPlan;
                    lblKs.Text        = model.TourQuickInfo.Remark;
                }
            }
        }
예제 #28
0
        protected void SaveOrder()
        {
            //团队所属公司ID
            string TourCompanyId = "";

            //获得订单信息
            tourModel = tourBll.GetTourInfo(tourId);
            string priceId = Utils.GetFormValue("ro_rdiPriceStandId");//获取选择的报价等级编号

            EyouSoft.Model.TourStructure.TourOrder orderModel = new EyouSoft.Model.TourStructure.TourOrder();
            orderModel.AdultNumber    = Utils.GetInt(Utils.GetFormValue("ro_txtManCount"), 0);   //获取成人数
            orderModel.BuyCompanyID   = SiteUserInfo.CompanyID;                                  //预定单位
            orderModel.BuyCompanyName = SiteUserInfo.CompanyName;                                //预定单位名
            orderModel.ChildNumber    = Utils.GetInt(Utils.GetFormValue("ro_txtChildCount"), 0); //儿童数
            EyouSoft.Model.TourStructure.TourPriceDetail price = tourModel.TourPriceDetail.Where(i => i.PriceStandId == priceId).First();
            //根据获取的报价等级编号获取相应报价等级
            orderModel.ChildPrice      = price.PriceDetail.Where(i => i.CustomerLevelType == EyouSoft.Model.CompanyStructure.CustomerLevelType.行).First().ChildrenPrice;//儿童价
            TourCompanyId              = tourModel.CompanyID;
            orderModel.CompanyID       = TourCompanyId;
            orderModel.ContactFax      = SiteUserInfo.ContactInfo.Fax;
            orderModel.ContactMQ       = SiteUserInfo.ContactInfo.MQ;
            orderModel.ContactName     = SiteUserInfo.ContactInfo.ContactName;
            orderModel.ContactQQ       = SiteUserInfo.ContactInfo.QQ;
            orderModel.ContactTel      = SiteUserInfo.ContactInfo.Tel;
            orderModel.LastOperatorID  = SiteUserInfo.ID;                                                                                                               //最后操作人
            orderModel.MarketNumber    = int.Parse(Utils.GetFormValue("ro_txtOneRoomCount"));                                                                           //单房差数
            orderModel.MarketPrice     = price.PriceDetail.Where(i => i.CustomerLevelType == EyouSoft.Model.CompanyStructure.CustomerLevelType.单房差).First().AdultPrice; //单房差价
            orderModel.OperatorContent = Utils.GetFormValue("ro_txtOperatorContent");                                                                                   //操作留言
            orderModel.OperatorID      = SiteUserInfo.ID;                                                                                                               //操作人ID
            orderModel.OperatorName    = SiteUserInfo.ContactInfo.ContactName;                                                                                          //操作人名
            orderModel.OrderType       = 0;                                                                                                                             //预定类型
            orderModel.OtherPrice      = decimal.Parse(Utils.GetFormValue("ro_txtOtherPrice"));                                                                         //其他费用
            orderModel.PeopleNumber    = orderModel.ChildNumber + orderModel.AdultNumber;                                                                               //总人数
            if (orderModel.PeopleNumber == 0)
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "<script>;alert('请填写游客!');</script>");
            }
            orderModel.AreaType        = tourModel.AreaType;
            orderModel.AreaId          = tourModel.AreaId;
            orderModel.PersonalPrice   = price.PriceDetail.Where(i => i.CustomerLevelType == EyouSoft.Model.CompanyStructure.CustomerLevelType.行).First().AdultPrice;                                                   //成人价
            orderModel.PriceStandId    = priceId;                                                                                                                                                                       //报价等级
            orderModel.RouteName       = tourModel.RouteName;
            orderModel.LeaveDate       = tourModel.LeaveDate;                                                                                                                                                           //出发时间
            orderModel.SpecialContent  = Utils.GetFormValue("ro_txtSpecialContent");                                                                                                                                    //特别要求
            orderModel.SumPrice        = orderModel.AdultNumber * orderModel.PersonalPrice + orderModel.ChildNumber * orderModel.ChildPrice + orderModel.MarketNumber * orderModel.MarketPrice + orderModel.OtherPrice; //总金额
            orderModel.TourCompanyId   = tourModel.CompanyID;                                                                                                                                                           //专线编号
            orderModel.TourCompanyName = tourModel.CompanyName;                                                                                                                                                         //专线公司名
            orderModel.TourDays        = tourModel.TourDays;                                                                                                                                                            //天数
            orderModel.SaveSeatDate    = DateTime.Now;                                                                                                                                                                  //留位时间
            orderModel.TourId          = tourModel.ID;                                                                                                                                                                  //团队编号
            orderModel.TourNo          = tourModel.TourNo;                                                                                                                                                              //团号
            orderModel.TourType        = EyouSoft.Model.TourStructure.TourType.组团团队;
            orderModel.IssueTime       = DateTime.Now;                                                                                                                                                                  //添加时间
            orderModel.OrderSource     = EyouSoft.Model.TourStructure.TourOrderOperateType.组团社下单;                                                                                                                       //订单来源

            //获得游客信息
            List <EyouSoft.Model.TourStructure.TourOrderCustomer> customerList = new List <EyouSoft.Model.TourStructure.TourOrderCustomer>();
            List <string> custNoList = Request.Form.AllKeys.Where(i => i.Contains("CustomerName")).Select(i => i.Substring(12, i.Length - 12)).ToList();

            foreach (string customerNo in custNoList)
            {
                EyouSoft.Model.TourStructure.TourOrderCustomer customerModel = new EyouSoft.Model.TourStructure.TourOrderCustomer();
                customerModel.CompanyID   = SiteUserInfo.CompanyID;                                                                                //所属公司
                customerModel.CompanyName = SiteUserInfo.CompanyName;                                                                              //所属公司名
                customerModel.ContactTel  = Utils.GetFormValue("CustomerTelphone" + customerNo);
                customerModel.CradNumber  = Utils.GetFormValue("CertificateNo" + customerNo);                                                      //证件编号
                customerModel.CradType    = (EyouSoft.Model.TourStructure.CradType) int.Parse(Utils.GetFormValue("CertificateName" + customerNo)); //证件类型
                customerModel.Remark      = Utils.GetFormValue("CustomerRemark" + customerNo);                                                     //备注信息
                customerModel.Sex         = Utils.GetFormValue("CustomerSex" + customerNo) == "1"?true:false;                                      //性别
                customerModel.SiteNo      = Utils.GetFormValue("CustomerSiteNo" + customerNo);                                                     //座位号
                orderModel.SeatList      += customerModel.SiteNo + ",";                                                                            //座位号集
                customerModel.VisitorName = Utils.GetFormValue("CustomerName" + customerNo);                                                       //姓名
                customerModel.VisitorType = Utils.GetFormValue("CustomerType" + customerNo) == "1"?true:false;                                     //类型(成人,儿童)
                customerModel.IssueTime   = DateTime.Now;
                customerModel.RouteName   = routeName;
                customerModel.TourId      = tourId;           //团队ID
                customerModel.TourNo      = tourModel.TourNo; //团号
                customerList.Add(customerModel);
            }
            orderModel.SeatList          = orderModel.SeatList.TrimEnd(','); //获得座位号
            orderModel.TourOrderCustomer = customerList;                     //保存游客信息
            EyouSoft.IBLL.TourStructure.ITourOrder tourOrderBll = EyouSoft.BLL.TourStructure.TourOrder.CreateInstance();
            //开始下订单
            if (tourOrderBll.AddTourOrder(orderModel) > 0)
            {
                EyouSoft.Model.CompanyStructure.CompanyDetailInfo _companyInfo =
                    EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(TourCompanyId);

                bool isSend = Utils.SendSMSForReminderOrder(
                    TourCompanyId,
                    SiteUserInfo.CompanyName,
                    SiteUserInfo.ContactInfo.ContactName,
                    _companyInfo != null ? _companyInfo.CityId : 0);


                if (isSend)
                {
                    EyouSoft.Model.CompanyStructure.CompanyDetailInfo model =
                        EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(TourCompanyId);
                    //发送短信记录
                    EyouSoft.Model.ToolStructure.MsgTipRecord tipModel = new EyouSoft.Model.ToolStructure.MsgTipRecord();
                    tipModel.Email    = string.Empty;
                    tipModel.FromMQID = SiteUserInfo.ContactInfo.MQ;
                    tipModel.ToMQID   = model.ContactInfo.MQ;     //接收方MQ
                    tipModel.Mobile   = model.ContactInfo.Mobile; //接收方手机
                    tipModel.MsgType  = EyouSoft.Model.ToolStructure.MsgType.NewOrder;
                    tipModel.SendWay  = EyouSoft.Model.ToolStructure.MsgSendWay.SMS;

                    EyouSoft.BLL.ToolStructure.MsgTipRecord msgTipBll = new EyouSoft.BLL.ToolStructure.MsgTipRecord();
                    msgTipBll.Add(tipModel);
                }

                Utils.SendEmailForReminderOrder(TourCompanyId, SiteUserInfo.CompanyName, SiteUserInfo.UserName);
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "<script>;alert('预定成功!');if(window.parent.Boxy){window.parent.Boxy.getIframeDialog('" + Request.QueryString["iframeId"] + "').hide();if(window.parent.RouteStock){window.parent.RouteStock.refresh();};}else{window.close();}</script>");
            }
            else
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "<script>;alert('预定失败!');</script>");
            }
        }
예제 #29
0
        /// <summary>
        /// 绑定所有信息    用于修改或复制
        /// </summary>
        /// <returns></returns>
        void BindAllInfo(string id)
        {
            #region 基础信息绑定
            selectXl.Id   = "1";
            selectXl.Name = "";
            selectXl.Bind();
            EyouSoft.BLL.TourStructure.Tour       tour  = new EyouSoft.BLL.TourStructure.Tour();
            EyouSoft.Model.TourStructure.TourInfo binfo = new EyouSoft.Model.TourStructure.TourInfo();
            binfo = (EyouSoft.Model.TourStructure.TourInfo)tour.GetTourInfo(id.ToString());
            if (binfo.Coordinator != null)
            {
                hdOprator = binfo.Coordinator.CoordinatorId.ToString();
            }
            if (ddl_area.Items.FindByValue(binfo.AreaId.ToString()) != null)
            {
                ddl_area.SelectedItem.Selected = false;
                ddl_area.Items.FindByValue(binfo.AreaId.ToString()).Selected = true;
            }
            selectXl.Name = binfo.RouteName;
            selectXl.Id   = binfo.RouteId.ToString();
            txt_Days.Text = binfo.TourDays.ToString();
            //txt_pepoleNum.Text = binfo.PlanPeopleNumber.ToString();
            TrafficStr = GetTrafficList(binfo.TourTraffic);
            if (actType == 1)
            {
                trgz.Visible      = false;
                trteamNum.Visible = true;
                txt_teamNum.Value = binfo.TourCode;
            }
            txt_startTraffic.Text = binfo.LTraffic;
            txt_endTraffic.Text   = binfo.RTraffic;
            txt_remark.Text       = binfo.TourQuickInfo.Remark;
            DiJieControl1.SetList = binfo.LocalAgencys;
            #region 绑定价格信息
            IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> listStand = binfo.PriceStandards;


            IList <EyouSoft.Model.CompanyStructure.CustomStand> list = new List <EyouSoft.Model.CompanyStructure.CustomStand>();
            EyouSoft.BLL.CompanyStructure.CompanyCustomStand    bll  = new CompanyCustomStand();

            list = bll.GetCustomStandByCompanyId(CurrentUserCompanyID);
            int kkk = list.Count;
            //for (int i = 0; i < listStand.Count; i++)
            //{
            //    for (int j = 0; j < listStand[i].CustomerLevels.Count; j++)
            //    {
            //        //if(listStand[i].CustomerLevels[i].LevelId == list.sel)
            //        var vn= list.Where(x => x.Id == listStand[i].CustomerLevels[j].LevelId).FirstOrDefault();
            //        if(vn!=null)
            //        listStand[i].CustomerLevels[j].LevelName = vn.CustomStandName;
            //    }
            //}

            //    sinfo = listStand;

            IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> plist = new List <EyouSoft.Model.TourStructure.TourPriceStandardInfo>();
            plist = binfo.PriceStandards;
            for (int i = 0; i < listStand.Count; i++)
            {
                int cc = listStand[i].CustomerLevels.Count;
                for (int j = 0; j < list.Count; j++)
                {
                    //if(listStand[i].CustomerLevels[i].LevelId == list.sel)
                    if (cc > j)
                    {
                        var vn = list.Where(x => x.Id == listStand[i].CustomerLevels[j].LevelId).FirstOrDefault();
                        if (vn != null)
                        {
                            listStand[i].CustomerLevels[j].LevelName = vn.CustomStandName;
                        }
                        else
                        {
                            //plist[i].CustomerLevels.RemoveAt(j);
                            listStand[i].CustomerLevels[j].LevelId = 0;
                        }
                    }
                    var xn = listStand[i].CustomerLevels.Where(x => x.LevelId == list[j].Id).FirstOrDefault();
                    if (xn == null)
                    {
                        listStand[i].CustomerLevels.Add(new EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo()
                        {
                            LevelId = list[j].Id, LevelType = list[j].LevType, LevelName = list[j].CustomStandName, AdultPrice = 0, ChildrenPrice = 0
                        });
                    }
                }
            }
            sinfo = plist;
            #endregion
            //List<EyouSoft.Model.TourStructure.TourPlanInfo> planInfo = binfo.TourNormalInfo.Plans.ToList();
            //xingcheng1.Bind(planInfo);
            //ConProjectControl1.SetList = binfo.TourNormalInfo.Services;
            //txt_noProject.Value = binfo.TourNormalInfo.BuHanXiangMu;
            //txt_buy.Value = binfo.TourNormalInfo.GouWuAnPai;
            //txt_child.Value = binfo.TourNormalInfo.ErTongAnPai;
            //txt_owner.Value = binfo.TourNormalInfo.ZiFeiXIangMu;
            //txt_Note.Value = binfo.TourNormalInfo.ZhuYiShiXiang;
            //txt_Reminded.Value = binfo.TourNormalInfo.WenXinTiXing;
            txt_xinchen.Text = binfo.TourQuickInfo.QuickPlan;
            txt_fuwu.Text    = binfo.TourQuickInfo.Service;
            #region 附件
            if (binfo.Attachs.Count > 0)
            {
                if (binfo.Attachs[0].FilePath.Length > 1)
                {
                    pnlFile.Visible         = true;
                    hypFilePath.NavigateUrl = binfo.Attachs[0].FilePath;
                    hd_img.Value            = binfo.Attachs[0].FilePath;
                }
            }
            #endregion
            ddl_city.SelectedItem.Selected = false;

            if (ddl_city.Items.FindByValue(binfo.TourCityId.ToString()) != null)
            {
                ddl_city.Items.FindByValue(binfo.TourCityId.ToString()).Selected = true;
            }
            #endregion
        }
예제 #30
0
        /// <summary>
        /// 页面初始化方法
        /// </summary>
        /// <param name="tourId"></param>
        protected void DataInit(string tourId)
        {
            EyouSoft.BLL.TourStructure.Tour           bll   = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo);
            EyouSoft.Model.TourStructure.TourBaseInfo model = bll.GetTourInfo(tourId);
            if (model != null)
            {
                this.hideTourID.Value = tourId;

                //绑定地接社信息
                this.rptDjList.DataSource = bll.GetTourLocalAgencys(tourId);
                this.rptDjList.DataBind();
                //绑定旅客信息

                this.rptCustomer.DataSource = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo).GetTravellers(tourId).Where(x => x.CustomerStatus == EyouSoft.Model.EnumType.TourStructure.CustomerStatus.正常).ToList();;
                this.rptCustomer.DataBind();

                //出团日期
                this.txtOutDate.Text = model.LDate.ToString("yyyy-MM-dd");
                //出发交通
                this.lblBenginDate.Text = model.LTraffic;
                //回程交通
                this.lblBackDate.Text = model.RTraffic;
                //线路名称
                this.lblAreaName.Text = model.RouteName;
                //人数
                this.lblCount.Text = model.PlanPeopleNumber.ToString();
                //计划类型
                this.lblTourType.Text = model.TourType.ToString();

                if (model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.单项服务)
                {
                    EyouSoft.Model.TourStructure.TourSingleInfo tsModel = (EyouSoft.Model.TourStructure.TourSingleInfo)model;
                    //this.lblRemarks.Text =tsModel.
                }
                if (model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划)
                {
                    EyouSoft.Model.TourStructure.TourInfo tModel = (EyouSoft.Model.TourStructure.TourInfo)model;
                    if (tModel.TourNormalInfo != null)
                    {
                        //内部信息
                        this.lblRemarks.Text = tModel.TourNormalInfo.NeiBuXingXi;
                    }
                    //标志
                    this.txtNum4.Value = tModel.GatheringSign;
                    //string gather = Utils.GetDateTimeNullable(tModel.GatheringTime) == null ? string.Empty : Utils.GetDateTimeNullable(tModel.GatheringTime).ToString();
                    //this.txtGather.Text = gather == string.Empty ? "" : (Utils.GetDateTime(gather, DateTime.Now)).ToString("yyyy-MM-dd hh 点");
                    this.txtGather.Text = tModel.GatheringTime;
                    IList <string> txtList = bll.GetTourGuides(tourId);
                    if (txtList != null)
                    {
                        if (txtList.Count > 0)
                        {
                            this.txtNum1.Value = txtList[0];
                        }
                        if (txtList.Count > 1)
                        {
                            this.txtNum2.Value = txtList[1];
                        }
                        if (txtList.Count > 2)
                        {
                            this.txtNum3.Value = txtList[2];
                        }
                    }
                }
                if (model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划)
                {
                    EyouSoft.Model.TourStructure.TourTeamInfo ttModel = (EyouSoft.Model.TourStructure.TourTeamInfo)model;

                    #region 人数And结算价

                    TourQuotePrint priantTQP = new TourQuotePrint();
                    string         number    = string.Empty;
                    string         money     = string.Empty;
                    priantTQP.getPepoleNum(SiteUserInfo.CompanyID, model.PlanPeopleNumber, ttModel.TourTeamUnit, ref number, ref money);
                    this.lblCount.Text = number;

                    #endregion
                    //内部信息
                    if (ttModel.TourNormalInfo != null)
                    {
                        this.lblRemarks.Text = ttModel.TourNormalInfo.NeiBuXingXi;
                    }

                    //标志
                    this.txtNum4.Value = ttModel.GatheringSign;
                    //string gather = Utils.GetDateTimeNullable(ttModel.GatheringTime) == null ? string.Empty : Utils.GetDateTimeNullable(ttModel.GatheringTime).ToString();
                    //this.txtGather.Text = gather == string.Empty ? "" : (Utils.GetDateTime(gather, DateTime.Now)).ToString("yyyy-MM-dd hh 点");
                    this.txtGather.Text = ttModel.GatheringTime;
                    IList <string> txtList = bll.GetTourGuides(tourId);
                    if (txtList != null)
                    {
                        if (txtList.Count > 0)
                        {
                            this.txtNum1.Value = txtList[0];
                        }
                        if (txtList.Count > 1)
                        {
                            this.txtNum2.Value = txtList[1];
                        }
                        if (txtList.Count > 2)
                        {
                            this.txtNum3.Value = txtList[2];
                        }
                    }
                }
            }
        }