Ejemplo n.º 1
0
 /// <summary>
 /// 获取导游实体
 /// </summary>
 /// <param name="ID">计调项id</param>
 protected void GetGuidModel(string planId)
 {
     if (!string.IsNullOrEmpty(planId))
     {
         EyouSoft.Model.PlanStructure.MPlanBaseInfo baseinfo = new EyouSoft.BLL.PlanStructure.BPlan().GetModel(EyouSoft.Model.EnumType.PlanStructure.PlanProject.导游, planId);
         EyouSoft.BLL.TourStructure.BTour           bll      = new EyouSoft.BLL.TourStructure.BTour();
         if (baseinfo != null)
         {
             this.LineSelect1.HideSelect = true;
             EyouSoft.Model.TourStructure.MTourBaseInfo model = bll.GetTourInfo(baseinfo.TourId);
             this.txttel.Text = baseinfo.ContactPhone;
             if (baseinfo.PlanGuide != null)
             {
                 this.txtStartAddress.Text = baseinfo.PlanGuide.OnLocation;
                 this.txtEndAddress.Text   = baseinfo.PlanGuide.NextLocation;
                 JobType = baseinfo.PlanGuide.TaskType.ToString();
             }
             this.GuidControl1.GuidID   = baseinfo.SourceId;
             this.GuidControl1.GuidName = baseinfo.SourceName;
             if (model != null)
             {
                 this.txtTourCode.Text     = model.TourCode;
                 this.LineSelect1.LineName = model.RouteName;
             }
             this.txtDate_Start.Text = UtilsCommons.GetDateString(baseinfo.StartDate, ProviderToDate);
             this.txtDate_End.Text   = UtilsCommons.GetDateString(baseinfo.EndDate, ProviderToDate);
             this.txttravel.Text     = baseinfo.ReceiveJourney;
             this.txtService.Text    = baseinfo.ServiceStandard;
             this.txtrmark.Text      = baseinfo.Remarks;
             this.txtCostDesc.Text   = baseinfo.CostDetail.ToString();
             this.txtPaidCost.Text   = Utils.FilterEndOfTheZeroDecimal(baseinfo.Confirmation);
             this.ddlState.Items.FindByValue(((int)baseinfo.Status).ToString()).Selected = true;
         }
     }
 }
        /// <summary>
        /// 页面加载
        /// </summary>
        /// <param name="tourId"></param>
        protected void InitPage(string tourId, string type)
        {
            EyouSoft.BLL.TourStructure.BTour           BTour = new EyouSoft.BLL.TourStructure.BTour();
            EyouSoft.Model.TourStructure.MTourBaseInfo model = BTour.GetTourInfo(tourId);
            if (model != null)
            {
                this.lbRouteName.Text = model.RouteName;
                this.lbTourCode.Text  = model.TourCode;
            }
            EyouSoft.BLL.TourStructure.BTourOrder BLL = new EyouSoft.BLL.TourStructure.BTourOrder();
            IList <EyouSoft.Model.TourStructure.MTourOrderSummary> list = BLL.GetTourOrderSummaryByTourId(tourId);

            if (list != null && list.Count > 0)
            {
                if (type == "1")
                {
                    rpt_OrderList.DataSource = list.Where(i => i.OrderStatus == EyouSoft.Model.EnumType.TourStructure.OrderStatus.已留位);
                }
                else
                {
                    rpt_OrderList.DataSource = list.Where(i => i.OrderStatus == EyouSoft.Model.EnumType.TourStructure.OrderStatus.已成交);
                }
                rpt_OrderList.DataBind();
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 绑定数据
        /// </summary>
        /// <param name="tourId"></param>
        private void PageInit(string tourId, string type)
        {
            EyouSoft.BLL.TourStructure.BTour             bTour = new EyouSoft.BLL.TourStructure.BTour();
            EyouSoft.Model.TourStructure.MTourSanPinInfo tour  = bTour.GetTourInfo(tourId) as EyouSoft.Model.TourStructure.MTourSanPinInfo;
            if (tour != null)
            {
                if (tour.IsCheck && type.Equals("DoUpdate"))
                {
                    this.phMsg.Visible  = true;
                    this.phSave.Visible = false;
                    this.phBack.Visible = true;

                    //发班周期
                    this.phdSelectDate.Visible = false;
                    //this.lblLeaveDate.Text = UtilsCommons.GetDateString(tour.LDate.Value, this.ProviderToDate);
                    //this.hideLeaveDate.Value = UtilsCommons.GetDateString(tour.LDate.Value, this.ProviderToDate);
                }

                //线路区域
                this.litArea.Text = GetArea(tour.AreaId);

                this.txtRouteName.Text        = tour.RouteName;
                this.txtTourDays.Text         = tour.TourDays.ToString();
                this.txtPlanPeopleNumber.Text = tour.PlanPeopleNumber.ToString();

                //发班周期
                //copy可选择法班周期
                //this.phdSelectDate.Visible = false;
                this.lblLeaveDate.Text   = UtilsCommons.GetDateString(tour.LDate.Value, this.ProviderToDate);
                this.hideLeaveDate.Value = UtilsCommons.GetDateString(tour.LDate.Value, this.ProviderToDate);

                //停收提前的天数
                this.txtStopDays.Text = tour.StopDays.ToString();

                this.txtLTraffic.Text = tour.LTraffic;
                this.txtRTraffic.Text = tour.RTraffic;
                this.txtGather.Text   = tour.Gather;

                //附件
                if (!string.IsNullOrEmpty(tour.FilePath))
                {
                    System.Text.StringBuilder agreement = new System.Text.StringBuilder();
                    agreement.AppendFormat("<span class='upload_filename'><a href='{0}' target='_blank'>查看附件</a><a href=\"javascript:void(0)\" onclick=\"AddSupplierPlan.DelFile(this)\" title='删除附件'><img style='vertical-align:middle' src='/images/cha.gif'></a><input type=\"hidden\" name=\"hideagreement\" value='{0}'/></span>", tour.FilePath);
                    this.lblFile.Text = agreement.ToString();
                }

                this.txtPlanFeature.Text    = tour.PlanFeature;
                this.txtPeerAdultPrice.Text = Utils.FilterEndOfTheZeroDecimal(tour.MSupplierPublishPrice.SettleAdultPrice);
                this.txtPeerChildPrice.Text = Utils.FilterEndOfTheZeroDecimal(tour.MSupplierPublishPrice.SettleChildPrice);


                //行程安排
                this.Journey1.SetPlanList = tour.TourPlan;


                //购物安排
                this.txtServiceStandard.Text  = tour.TourService.ServiceStandard;
                this.txtNoNeedItem.Text       = tour.TourService.NoNeedItem;
                this.txtShoppingItem.Text     = tour.TourService.ShoppingItem;
                this.txtChildServiceItem.Text = tour.TourService.ChildServiceItem;
                this.txtOwnExpense.Text       = tour.TourService.OwnExpense;
                this.txtNeedAttention.Text    = tour.TourService.NeedAttention;
                this.txtWarmRemind.Text       = tour.TourService.WarmRemind;
                this.txtInsiderInfor.Text     = tour.TourService.InsiderInfor;
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 页面初始化
        /// </summary>
        /// <param name="id">操作ID</param>
        protected void PageInit(string id)
        {
            #region 用户控件初始化

            #endregion
            EyouSoft.BLL.TourStructure.BTour bll = new EyouSoft.BLL.TourStructure.BTour();

            EyouSoft.Model.TourStructure.MTourSanPinInfo model = (EyouSoft.Model.TourStructure.MTourSanPinInfo)bll.GetTourInfo(id);
            if (model != null)
            {
                #region 表单控件赋值
                this.lblLeaveDateMore.Text = "出团日期:";
                BindAreaList(model.AreaId);
                this.cbxDistribution.Checked     = model.IsShowDistribution;
                this.hideRouteID.Value           = model.RouteId;
                this.txt_RouteName.Text          = model.RouteName;
                this.txt_Days.Text               = model.TourDays.ToString();
                this.txtPeopleCount.Text         = model.PlanPeopleNumber.ToString();
                this.lblLeaveDate.Text           = UtilsCommons.GetDateString(model.LDate, this.ProviderToDate);
                this.hideLeaveDate.Value         = model.LDate.HasValue ? model.LDate.Value.ToString("yyyy-MM-dd") : "";
                this.txtSuccesssStraffBegin.Text = model.LTraffic;
                this.txtSuccesssStraffEnd.Text   = model.RTraffic;
                this.txtSuccessGather.Text       = model.Gather;
                this.txtStopDate.Text            = model.StopDays.ToString();

                if (act == "copy")
                {
                    this.SellsSelect1.SellsID   = SiteUserInfo.UserId;
                    this.SellsSelect1.SellsName = SiteUserInfo.Name;
                }
                else
                {
                    this.SellsSelect1.SellsID   = model.SaleInfo.SellerId;
                    this.SellsSelect1.SellsName = model.SaleInfo.Name;
                }
                this.txtPlanContent.Text = model.PlanFeature;
                this.txtSearchKey.Text   = model.KeyName;
                // 报价标准
                this.PriceStand1.InitMode         = false;
                this.PriceStand1.SetPriceStandard = model.MTourPriceStandard;
                //行程安排
                this.Journey1.SetPlanList = model.TourPlan;
                //散拼 服务
                if (model.TourService != null)
                {
                    CostAccounting1.ServiceStandard  = model.TourService.ServiceStandard;
                    CostAccounting1.NoNeedItem       = model.TourService.NoNeedItem;
                    CostAccounting1.ShoppingItem     = model.TourService.ShoppingItem;
                    CostAccounting1.ChildServiceItem = model.TourService.ChildServiceItem;
                    CostAccounting1.OwnExpense       = model.TourService.OwnExpense;
                    CostAccounting1.NeedAttention    = model.TourService.NeedAttention;
                    CostAccounting1.WarmRemind       = model.TourService.WarmRemind;
                    CostAccounting1.InsiderInfor     = model.TourService.InsiderInfor;
                }
                //上车地点设置
                if (model.TourCarLocation != null && model.TourCarLocation.Count > 0)
                {
                    StringBuilder sb = new StringBuilder();
                    string        strId = string.Empty, strText = string.Empty, strPriceJ = string.Empty,
                                  strPriceS = string.Empty, strDesc = string.Empty, strPickUpTourId = string.Empty;
                    foreach (var item in model.TourCarLocation)
                    {
                        sb.AppendFormat("<li><a href='javascript:void(0);' onclick='AddSanPlan.RemoveLi(this);return false;' data-isExist='{2}' class='car-close' data-id='{0}'></a><span>{1}</span></li>", item.CarLocationId, item.Location, item.isTourOrderExists ? 1 : 0);
                        strPickUpTourId += item.TourLocationId + ",";
                        strId           += item.CarLocationId + ",";
                        strText         += item.Location + ",";
                        strPriceJ       += item.OffPrice.ToString() + ",";
                        strPriceS       += item.OnPrice.ToString() + ",";
                        strDesc         += item.Desc + "&&&";
                    }
                    this.PickUpPoint1.PickUpOptions = sb.ToString();
                    this.PickUpPoint1.PickUpTourId  = model.TourId;
                    this.PickUpPoint1.PickUpID      = strId.Substring(0, strId.Length - 1);
                    this.PickUpPoint1.PickUpText    = strText.Substring(0, strText.Length - 1);
                    this.PickUpPoint1.PickUpPriceJ  = strPriceJ.Substring(0, strPriceJ.Length - 1);
                    this.PickUpPoint1.PickUpPriceS  = strPriceS.Substring(0, strPriceS.Length - 1);
                    this.PickUpPoint1.PickUpDesc    = strDesc.Substring(0, strDesc.Length - 3);
                }
                //预设车型
                this.PresetBusType1.TourId       = model.TourId;
                this.PresetBusType1.ContrloModel = act;
                if (model.TourCarType != null && model.TourCarType.Count > 0)
                {
                    this.PresetBusType1.PreSetTypeList = model.TourCarType;
                }
                else
                {
                    this.DivPrisetBus.Visible = false;
                }
                #endregion

                #region 附件
                //附件
                if (model.FilePath.Trim() != "")
                {
                    this.lblFiles.Text = "<span class='upload_filename'>&nbsp;<a href='" + model.FilePath + "' target='_blank'>查看附件</a><a href='javascript:void(0);' onclick='AddSanPlan.RemoveVisaFile(this);return false;'> <img style='vertical-align:middle' src='/images/cha.gif'></a><input type='hidden' name='hideOtherFile' value='|" + model.FilePath + "'></span>";
                }

                //签证附件
                if (model.VisaFileList != null && model.VisaFileList.Count > 0)
                {
                    string visaStr = string.Empty;
                    for (int i = 0; i < model.VisaFileList.Count; i++)
                    {
                        visaStr += "<span class='upload_filename'>&nbsp;<a href='" + model.VisaFileList[i].FilePath + "' target='_blank'>" + model.VisaFileList[i].Name + "</a><a href='javascript:void(0);' onclick='AddSanPlan.RemoveVisaFile(this);return false;'> <img style='vertical-align:middle' src='/images/cha.gif'></a><input type='hidden' name='hideVisaFile' value='" + model.VisaFileList[i].Name + "|" + model.VisaFileList[i].FilePath + "|" + model.VisaFileList[i].Downloads.ToString() + "'></span>";
                    }
                    this.lblVisaFiles.Text = visaStr;
                }
                #endregion

                #region 修改控制
                this.phdSave.Visible = false;
                if (model.TourStatus == EyouSoft.Model.EnumType.TourStructure.TourStatus.销售未派计划 ||
                    model.TourStatus == EyouSoft.Model.EnumType.TourStructure.TourStatus.计调未接收 ||
                    model.TourStatus == EyouSoft.Model.EnumType.TourStructure.TourStatus.计调配置 ||
                    model.TourStatus == EyouSoft.Model.EnumType.TourStructure.TourStatus.计调配置完毕
                    )
                {
                    //供应商发布的散拼计划不能修改
                    if (model.SourceId.Trim() != "")
                    {
                        this.phdSave.Visible = false;
                    }
                    else
                    {
                        this.phdSave.Visible = true;
                    }
                }

                if (act == "copy")
                {
                    this.phdSave.Visible = true;
                }

                //按钮权限控制
                BtnPowerControl();

                //是否可以操作该数据
                if (!SiteUserInfo.IsHandleElse && act != "copy")
                {
                    if (model.OperatorInfo != null && model.OperatorInfo.OperatorId != SiteUserInfo.UserId && model.SaleInfo != null && model.SaleInfo.SellerId != SiteUserInfo.UserId)
                    {
                        this.phdSave.Visible = false;
                    }
                }
                #endregion

                #region 变更控制
                if (model.TourStatus != EyouSoft.Model.EnumType.TourStructure.TourStatus.销售未派计划)
                {
                    this.hideIsChangeInput.Value = "true";
                }
                else
                {
                    this.hideIsChangeInput.Value = "false";
                }
                #endregion
            }
            else
            {
                Utils.ResponseGoBack();
            }
        }
Ejemplo n.º 5
0
        private void PageInit(string tourId)
        {
            this.PriceStand1.CompanyID = SiteUserInfo.CompanyId;
            this.PriceStand1.ShowModel = true;
            //  this.PriceStand1.IsDistribution = true;
            this.PriceStand1.InitMode = false;

            EyouSoft.BLL.TourStructure.BTour bll = new EyouSoft.BLL.TourStructure.BTour();

            EyouSoft.Model.TourStructure.MTourSanPinInfo model = (EyouSoft.Model.TourStructure.MTourSanPinInfo)bll.GetTourInfo(tourId);
            if (model != null)
            {
                IList <EyouSoft.Model.TourStructure.MTourPriceStandard> MTourPriceStandard = model.MTourPriceStandard;
                List <EyouSoft.Model.TourStructure.MTourPriceLevel>     list = new List <EyouSoft.Model.TourStructure.MTourPriceLevel>();

                if (MTourPriceStandard != null && MTourPriceStandard.Count != 0)
                {
                    foreach (var standard in MTourPriceStandard)
                    {
                        list.AddRange(standard.PriceLevel);
                    }

                    var Leve = list.Where(c => c.LevelId == SiteUserInfo.TourCompanyInfo.LevelId).ToList();


                    IList <EyouSoft.Model.TourStructure.MTourPriceStandard> currentStand = new List <EyouSoft.Model.TourStructure.MTourPriceStandard>();
                    for (int i = 0; i < MTourPriceStandard.Count; i++)
                    {
                        var s = MTourPriceStandard[i];
                        EyouSoft.Model.TourStructure.MTourPriceStandard item = new EyouSoft.Model.TourStructure.MTourPriceStandard();
                        item.Id           = s.Id;
                        item.Standard     = s.Standard;
                        item.StandardName = s.StandardName;
                        item.TourId       = s.TourId;
                        item.PriceLevel   = new List <EyouSoft.Model.TourStructure.MTourPriceLevel>();


                        for (int j = 0; j < s.PriceLevel.Count; j++)
                        {
                            var p = s.PriceLevel[j];
                            for (int k = 0; k < Leve.Count; k++)
                            {
                                var l = Leve[k];
                                if (p.LevelId == Leve[k].LevelId && p.AdultPrice == l.AdultPrice && p.ChildPrice == l.ChildPrice)
                                {
                                    item.PriceLevel = new List <EyouSoft.Model.TourStructure.MTourPriceLevel>();
                                    item.PriceLevel.Add(Leve[k]);
                                    currentStand.Add(item);
                                    break;
                                }
                            }
                        }
                    }

                    this.PriceStand1.SetPriceStandard = currentStand;
                    this.hfTourType.Value             = ((int)model.TourType).ToString();

                    //游客控件的显示
                    switch (model.TourType)
                    {
                    case EyouSoft.Model.EnumType.TourStructure.TourType.组团散拼:
                    case EyouSoft.Model.EnumType.TourStructure.TourType.地接散拼:
                    case EyouSoft.Model.EnumType.TourStructure.TourType.组团散拼短线:
                        this.phdTravelControlS.Visible = false;
                        break;

                    case EyouSoft.Model.EnumType.TourStructure.TourType.出境散拼:
                        this.phdTravelControl.Visible = false;
                        break;
                    }
                }
                #region  车地点下拉框
                string IsShortRoute = Utils.GetQueryStringValue("IsShort");
                if (!string.IsNullOrEmpty(IsShortRoute))
                {
                    IList <EyouSoft.Model.TourStructure.MTourCarLocation> CarList = bll.GetTourCarLocation(tourId);
                    if (CarList != null && CarList.Count > 0)
                    {
                        StringBuilder sb = new StringBuilder();
                        sb.Append("<option value=''>请选择</option>");
                        for (int i = 0; i < CarList.Count; i++)
                        {
                            sb.AppendFormat("<option value='{0}' data-onprice='{2}' data-offprice='{3}' data-desc='{4}' data-location='{5}' >{1}</option>", CarList[i].TourLocationId, CarList[i].Location, CarList[i].OnPrice.ToString("f2"), CarList[i].OffPrice.ToString("f2"), CarList[i].Desc, CarList[i].Location);
                        }
                        strPickUpPosition = sb.ToString();
                        //this.SetSeat1.TourId = tourId;
                    }
                    else
                    {
                        this.ph_PickUpPostion.Visible = false;
                    }
                    if (model.TourCarType != null && model.TourCarType.Count > 0)
                    {
                        this.SetSeat1.TourId = tourId;
                    }
                    else
                    {
                        this.PhCarModel.Visible = false;
                    }
                }
                else
                {
                    this.ph_PickUpPostion.Visible = false;
                    this.PhCarModel.Visible       = false;
                }
                #endregion
            }
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 页面验证
        /// </summary>
        /// <param name="order"></param>
        /// <param name="msg"></param>
        /// <returns></returns>
        private bool PageValidate(ref EyouSoft.Model.TourStructure.MTourOrderExpand order, ref string msg)
        {
            //验证的字段
            string DCompanyName = Utils.GetFormValue("txtDCompanyName");

            if (string.IsNullOrEmpty(DCompanyName))
            {
                msg += "客源单位 不能为空!</br>";
            }
            string DContactName = Utils.GetFormValue("txtDContactName");

            if (string.IsNullOrEmpty(DContactName))
            {
                msg += "联系人 不能为空!</br>";
            }

            string DContactTel = Utils.GetFormValue("txtDContactTel");

            if (string.IsNullOrEmpty(DContactTel))
            {
                msg += "联系定电话 不能为空!</br>";
            }

            int Adults = Utils.GetInt(Utils.GetFormValue("txtAdults"));

            if (Adults < 0)
            {
                msg += "成人数 格式不正确!</br>";
            }

            int Childs = Utils.GetInt(Utils.GetFormValue("txtChilds"));

            if (Childs < 0)
            {
                msg += "儿童数 格式不正确!</br>";
            }
            decimal SumPrice = Utils.GetDecimal(Utils.GetFormValue("txtSumPrice"));

            if (SumPrice <= 0)
            {
                msg += "合计金额 格式不正确!</br>";
            }
            string saveDate = Utils.GetFormValue("txtSaveSeatDate");

            if (!string.IsNullOrEmpty(saveDate))
            {
                DateTime?SaveSeatDate = Utils.GetDateTimeNullable(saveDate);
                if (!SaveSeatDate.HasValue)
                {
                    msg += "留位时间 格式不正确!</br>";
                }
            }
            string tourType = Utils.GetFormValue("hfTourType");

            if (msg.Length <= 0)
            {
                //短线
                if (!string.IsNullOrEmpty(Utils.GetQueryStringValue("IsShort")))
                {
                    string CarLocationID = Utils.GetFormValue("selPickUpPosition");
                    if (!string.IsNullOrEmpty(CarLocationID))
                    {
                        EyouSoft.Model.TourStructure.MTourOrderCarLocation modelcar = new EyouSoft.Model.TourStructure.MTourOrderCarLocation();
                        string location = this.hidlocation.Value;
                        string desc     = this.hidDesc.Value;
                        modelcar.Desc              = desc;
                        modelcar.Location          = location;
                        modelcar.OffPrice          = Utils.GetDecimal(this.hidOffPrice.Value);
                        modelcar.OnPrice           = Utils.GetDecimal(this.hidOnPrice.Value);
                        modelcar.TourLocationId    = CarLocationID;
                        order.TourOrderCarLocation = modelcar;
                    }
                    IList <EyouSoft.Model.TourStructure.MTourOrderCarTypeSeat> listSeat = new List <EyouSoft.Model.TourStructure.MTourOrderCarTypeSeat>();
                    listSeat = Newtonsoft.Json.JsonConvert.DeserializeObject <IList <MTourOrderCarTypeSeat> >(Utils.GetFormValue(this.SetSeat1.setSeatHidClientID));
                    order.TourOrderCarTypeSeatList = listSeat;
                }
                order.CompanyId      = SiteUserInfo.CompanyId;
                order.TourId         = Utils.GetQueryStringValue("TourId");
                order.BuyCompanyName = SiteUserInfo.TourCompanyInfo.CompanyName;
                order.BuyCompanyId   = SiteUserInfo.TourCompanyInfo.CompanyId;
                //客源单位联系人信息(当前分销商)
                string lxrId = SiteUserInfo.TourCompanyInfo.LxrId;
                order.ContactDepartId = lxrId;
                EyouSoft.BLL.CrmStructure.BCrmLinkMan   link    = new EyouSoft.BLL.CrmStructure.BCrmLinkMan();
                EyouSoft.Model.CrmStructure.MCrmLinkman linkMan = link.GetLinkManModel(lxrId);
                if (linkMan != null)
                {
                    order.ContactName = linkMan.Name;
                    order.ContactTel  = linkMan.Telephone;
                }


                order.OrderStatus = EyouSoft.Model.EnumType.TourStructure.OrderStatus.未处理;

                //联系人信息
                order.DCompanyName = DCompanyName;
                order.DContactName = DContactName;
                order.DContactTel  = DContactTel;



                //销售员信息
                order.SellerId   = SiteUserInfo.UserId;
                order.SellerName = SiteUserInfo.Name;
                order.DeptId     = SiteUserInfo.DeptId;

                //操作员信息
                order.Operator   = SiteUserInfo.Name;
                order.OperatorId = SiteUserInfo.UserId;

                order.Adults = Adults;
                order.Childs = Childs;

                //价格组成
                string strPrice = Utils.GetFormValue("txt_PriceStand_radio_price");
                if (!string.IsNullOrEmpty(strPrice))
                {
                    string[] price = strPrice.Split('|');
                    order.LevId      = Utils.GetInt(price[0]);
                    order.AdultPrice = Utils.GetDecimal(price[1]);
                    order.ChildPrice = Utils.GetDecimal(price[2]);
                }

                string strStandard = Utils.GetFormValue("_hstandard");
                if (!string.IsNullOrEmpty(strStandard))
                {
                    int Standard = Utils.GetInt(strStandard);
                    order.PriceStandId = Standard;
                    EyouSoft.BLL.TourStructure.BTour                        bll          = new EyouSoft.BLL.TourStructure.BTour();
                    EyouSoft.Model.TourStructure.MTourSanPinInfo            model        = (EyouSoft.Model.TourStructure.MTourSanPinInfo)bll.GetTourInfo(order.TourId);
                    IList <EyouSoft.Model.TourStructure.MTourPriceStandard> standardList = model.MTourPriceStandard.Where(c => c.Standard == Standard).ToList();

                    if (standardList != null && standardList.Count != 0)
                    {
                        List <EyouSoft.Model.TourStructure.MTourPriceLevel> levelList = new List <EyouSoft.Model.TourStructure.MTourPriceLevel>();
                        foreach (var a in standardList)
                        {
                            levelList.AddRange(a.PriceLevel);
                        }
                        if (levelList != null && levelList.Count != 0)
                        {
                            EyouSoft.Model.TourStructure.MTourPriceLevel item = levelList.SingleOrDefault(c => c.LevType == EyouSoft.Model.EnumType.ComStructure.LevType.内部结算价);
                            if (item != null)
                            {
                                order.PeerAdultPrice  = item.AdultPrice;
                                order.PeerChildPrice  = item.ChildPrice;
                                order.PeerLevId       = item.LevelId;
                                order.SettlementMoney = order.PeerAdultPrice * Adults + order.PeerChildPrice * Childs;
                            }
                        }
                    }
                }

                order.SaleAddCost          = Utils.GetDecimal(Utils.GetFormValue("txtSaleAddCost"));
                order.SaleAddCostRemark    = Utils.GetFormValue("txtSaleAddCostRemark");
                order.SaleReduceCost       = Utils.GetDecimal(Utils.GetFormValue("txtSaleReduceCost"));
                order.SaleReduceCostRemark = Utils.GetFormValue("txtSaleReduceCostRemark");

                order.SumPrice = Utils.GetDecimal(Utils.GetFormValue("txtSumPrice"));

                order.SaveSeatDate = Utils.GetDateTimeNullable(Utils.GetFormValue("txtSaveSeatDate"));
                order.OrderRemark  = Utils.GetFormValue("txtOrderRemark");



                order.OrderType = EyouSoft.Model.EnumType.TourStructure.OrderType.分销商下单;

                order.MTourOrderTravellerList = new List <EyouSoft.Model.TourStructure.MTourOrderTraveller>();
                order.TourType = (EyouSoft.Model.EnumType.TourStructure.TourType)Enum.Parse(typeof(EyouSoft.Model.EnumType.TourStructure.TourType), tourType);
                switch (order.TourType)
                {
                case EyouSoft.Model.EnumType.TourStructure.TourType.组团散拼:
                case TourType.组团散拼短线:
                case EyouSoft.Model.EnumType.TourStructure.TourType.地接散拼:
                    order.MTourOrderTravellerList = UtilsCommons.GetTravelList();
                    break;

                case EyouSoft.Model.EnumType.TourStructure.TourType.出境散拼:
                    order.MTourOrderTravellerList = UtilsCommons.GetTravelListS();
                    break;
                }
            }

            return(msg.Length <= 0);
        }
Ejemplo n.º 7
0
        private void PageInit(string tourid, string type)
        {
            this.txtsourcename.Text = SiteUserInfo.CompanyName;
            this.txtname.Text       = SiteUserInfo.Name;
            this.txttel.Text        = SiteUserInfo.Telephone;
            this.txtfax.Text        = SiteUserInfo.Fax;

            //团实体
            EyouSoft.BLL.TourStructure.BTour               bll      = new EyouSoft.BLL.TourStructure.BTour();
            EyouSoft.Model.TourStructure.MTourSanPinInfo   model    = null;
            EyouSoft.Model.EnumType.TourStructure.TourType tourtype = bll.GetTourType(tourid);
            switch (tourtype)
            {
            case EyouSoft.Model.EnumType.TourStructure.TourType.出境团队:
            case EyouSoft.Model.EnumType.TourStructure.TourType.地接团队:
            case EyouSoft.Model.EnumType.TourStructure.TourType.组团团队:
                //跳转到团队打印单
                EyouSoft.BLL.ComStructure.BComSetting bcom = new EyouSoft.BLL.ComStructure.BComSetting();
                Response.Redirect(bcom.GetPrintUri(this.SiteUserInfo.CompanyId, EyouSoft.Model.EnumType.ComStructure.PrintTemplateType.团队行程单) + "?tourId=" + tourid);
                break;

            case EyouSoft.Model.EnumType.TourStructure.TourType.单项服务:
                this.TSelfProject.Visible = false;
                this.TService.Visible     = false;
                this.TShopping.Visible    = false;
                this.TWarmRemind.Visible  = false;
                return;
            }
            if (type == "")
            {
                model = (EyouSoft.Model.TourStructure.MTourSanPinInfo)bll.GetTourInfo(tourid);
            }
            else
            {
                model = (EyouSoft.Model.TourStructure.MTourSanPinInfo)bll.GetOldTourInfo(tourid, this.SiteUserInfo.CompanyId);
            }
            this.lbTourCode.Text  = model.TourCode;
            this.lbRouteName.Text = model.RouteName;
            if (model != null)
            {
                #region 行程
                IList <EyouSoft.Model.TourStructure.MPlanBaseInfo> planinfo = model.TourPlan.OrderBy(m => m.Days).ToList();
                if (planinfo != null && planinfo.Count > 0)
                {
                    StringBuilder strAllDateInfo = new StringBuilder();
                    string        Dinner         = string.Empty;//包餐(早、中、晚)
                    foreach (EyouSoft.Model.TourStructure.MPlanBaseInfo Plan in planinfo)
                    {
                        if (Plan.Breakfast)
                        {
                            Dinner += "早、";
                        }
                        if (Plan.Lunch)
                        {
                            Dinner += "中、";
                        }
                        if (Plan.Supper)
                        {
                            Dinner += "晚、";
                        }

                        string riQi = "第" + Plan.Days + "天&nbsp;";
                        if (model.LDate.HasValue)
                        {
                            riQi += model.LDate.Value.AddDays(Plan.Days - 1).ToString("yyyy-MM-dd");
                        }

                        strAllDateInfo.AppendFormat("<table width='696' border='0' align='center' cellpadding='0' cellspacing='0'><tr><td width='35%' class='small_title'><b class='font16'>{0}  {6}</b></td><td width='15%' class='small_title'><b class='font14'>交通:{1}</b></td><td width='20%' class='small_title'><b class='font14'>餐:{2}</b></td><td width='30%' class='small_title'><b class='font14'>住宿:{3}</b></td></tr></table><table width='696' border='0' align='center' cellpadding='0' cellspacing='0' class='list_2' style='margin-top:0px;'><tr><td class='td_text' style='border-top:none;' width='{7}'>{4}</td>{5}</tr></table>", riQi, Plan.Traffic, Dinner, Plan.Hotel, Plan.Content, string.IsNullOrEmpty(Plan.FilePath) ? "" : "<td style='border-top:none;'><img src='http://" + Request.Url.Authority + Plan.FilePath + "' width='202' height='163' /></td>", Plan.Section, string.IsNullOrEmpty(Plan.FilePath) ? "100%" : "480px");
                        Dinner = string.Empty;
                    }
                    this.lbtourplan.Text = strAllDateInfo.ToString();
                }
                #endregion

                #region 线路特色
                if (string.IsNullOrEmpty(model.PlanFeature))
                {
                    this.TPlanFeature.Visible = false;
                }
                else
                {
                    this.lbPlanFeature.Text = model.PlanFeature;
                }
                #endregion

                #region 计划服务
                if (model.TourService != null)
                {
                    #region  务标准
                    if (string.IsNullOrEmpty(model.TourService.ServiceStandard))
                    {
                        this.TService.Visible = false;
                    }
                    else
                    {
                        this.lbService.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ServiceStandard);
                    }
                    #endregion

                    #region  务不含
                    if (string.IsNullOrEmpty(model.TourService.NoNeedItem))
                    {
                        this.TNoService.Visible = false;
                    }
                    else
                    {
                        this.lbnoService.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.NoNeedItem);
                    }
                    #endregion

                    #region 购物安排
                    if (string.IsNullOrEmpty(model.TourService.ShoppingItem))
                    {
                        this.TShopping.Visible = false;
                    }
                    else
                    {
                        this.lbshopping.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ShoppingItem);
                    }
                    #endregion

                    #region 儿童安排
                    if (string.IsNullOrEmpty(model.TourService.ChildServiceItem))
                    {
                        this.TChildren.Visible = false;
                    }
                    else
                    {
                        this.lbchildren.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ChildServiceItem);
                    }
                    #endregion

                    #region 自费项目
                    if (string.IsNullOrEmpty(model.TourService.OwnExpense))
                    {
                        this.TSelfProject.Visible = false;
                    }
                    else
                    {
                        this.lbselfproject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.OwnExpense);
                    }
                    #endregion

                    #region 温馨提醒
                    if (string.IsNullOrEmpty(model.TourService.WarmRemind))
                    {
                        this.TWarmRemind.Visible = false;
                    }
                    else
                    {
                        this.lbwarmremind.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.WarmRemind);
                    }
                    #endregion

                    #region 注意事项
                    if (string.IsNullOrEmpty(model.TourService.NeedAttention))
                    {
                        this.TNeedAttention.Visible = false;
                    }
                    else
                    {
                        this.lbneedattention.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.NeedAttention);
                    }
                    #endregion
                }
                else
                {
                    this.TPlanService.Visible = false;
                }
                #endregion

                #region 价格组成
                if (model.MTourPriceStandard != null && model.MTourPriceStandard.Count > 0)
                {
                    this.lbPriceStand.Text = GetPriceStandardTable(model.MTourPriceStandard);
                }
                #endregion
            }
        }
Ejemplo n.º 8
0
        /// <summary>
        /// 初始化信息
        /// </summary>
        private void InitInfo()
        {
            string orderid = string.Empty;

            EyouSoft.BLL.TourStructure.BTour bll = new EyouSoft.BLL.TourStructure.BTour();

            EyouSoft.Model.TourStructure.MTourBaseInfo baseModel = bll.GetTourInfo(TourId);

            if (baseModel == null)
            {
                RCWE("异常请求");
            }

            EyouSoft.Model.TourStructure.MTourTeamInfo   teamModel   = null;
            EyouSoft.Model.TourStructure.MTourSanPinInfo sanpinModel = null;

            switch (baseModel.TourType)
            {
            case EyouSoft.Model.EnumType.TourStructure.TourType.出境团队:
            case EyouSoft.Model.EnumType.TourStructure.TourType.地接团队:
            case EyouSoft.Model.EnumType.TourStructure.TourType.组团团队:
                teamModel = (EyouSoft.Model.TourStructure.MTourTeamInfo)baseModel;
                break;

            case EyouSoft.Model.EnumType.TourStructure.TourType.单项服务:
                this.TGuideNote.Visible           = false;
                this.TReceiveJourney.Visible      = false;
                this.TService.Visible             = false;
                this.ph_rpt_OrderinfoList.Visible = false;
                return;

            default:
                sanpinModel = (EyouSoft.Model.TourStructure.MTourSanPinInfo)baseModel;
                break;
            }

            #region 订单信息

            EyouSoft.BLL.TourStructure.BTourOrder           bllorder   = new EyouSoft.BLL.TourStructure.BTourOrder();
            EyouSoft.Model.TourStructure.MOrderSum          ordersum   = new EyouSoft.Model.TourStructure.MOrderSum();
            IList <EyouSoft.Model.TourStructure.MTourOrder> MtourOrder = bllorder.GetTourOrderListById(TourId, ref ordersum).Where(c => c.OrderStatus == EyouSoft.Model.EnumType.TourStructure.OrderStatus.已成交).ToList();
            if (MtourOrder != null && MtourOrder.Count > 0)
            {
                this.rpt_OrderinfoList.DataSource = MtourOrder;
                this.rpt_OrderinfoList.DataBind();
            }
            else
            {
                this.ph_rpt_OrderinfoList.Visible = false;
            }
            #endregion

            #region 团队信息
            if (teamModel != null)
            {
                this.lbRouteName.Text = teamModel.RouteName;
                this.lbTourCode.Text  = teamModel.TourCode;
                this.lbdayCount.Text  = teamModel.TourDays.ToString();
                this.lbstarttime.Text = UtilsCommons.GetDateString(teamModel.LDate, ProviderToDate);
                this.lbendtime.Text   = UtilsCommons.GetDateString(teamModel.RDate, ProviderToDate);
                if (teamModel.GuideList != null && teamModel.GuideList.Count > 0)
                {
                    string guidelist = string.Empty;
                    for (int i = 0; i < teamModel.GuideList.Count; i++)
                    {
                        if (i == teamModel.GuideList.Count - 1)
                        {
                            guidelist += teamModel.GuideList[i].Name;
                        }
                        else
                        {
                            guidelist += teamModel.GuideList[i].Name + "、";
                        }
                    }
                    this.lbguidename.Text = guidelist;
                }
                this.lbpeoplecount.Text = teamModel.PlanPeopleNumber.ToString();
                if (teamModel.TourPlaner != null && teamModel.TourPlaner.Count > 0)
                {
                    string planerlist = string.Empty;
                    for (int i = 0; i < teamModel.TourPlaner.Count; i++)
                    {
                        if (i == teamModel.TourPlaner.Count - 1)
                        {
                            planerlist += teamModel.TourPlaner[i].Planer;
                        }
                        else
                        {
                            planerlist += teamModel.TourPlaner[i].Planer + "、";
                        }
                    }

                    var jiDiaoInfo = new EyouSoft.BLL.ComStructure.BComUser().GetModel(teamModel.TourPlaner[0].PlanerId, CurrentUserCompanyID);
                    if (jiDiaoInfo != null)
                    {
                        planerlist += " " + jiDiaoInfo.ContactMobile + " " + jiDiaoInfo.ContactTel;
                    }
                    this.lbplander.Text = planerlist;
                }
                if (teamModel.SaleInfo != null)
                {
                    var xiaoShouYuanInfo = new EyouSoft.BLL.ComStructure.BComUser().GetModel(teamModel.SaleInfo.SellerId, CurrentUserCompanyID);
                    if (xiaoShouYuanInfo != null)
                    {
                        teamModel.SaleInfo.Mobile = xiaoShouYuanInfo.ContactMobile;
                        teamModel.SaleInfo.Phone  = xiaoShouYuanInfo.ContactTel;
                    }
                    this.lbsellerinfo.Text = teamModel.SaleInfo.Name + " " + teamModel.SaleInfo.Mobile + " " + teamModel.SaleInfo.Phone;
                }
            }
            else if (sanpinModel != null)
            {
                this.lbRouteName.Text = baseModel.RouteName;
                this.lbTourCode.Text  = baseModel.TourCode;
                this.lbdayCount.Text  = baseModel.TourDays.ToString();
                this.lbstarttime.Text = UtilsCommons.GetDateString(baseModel.LDate, ProviderToDate);
                this.lbendtime.Text   = UtilsCommons.GetDateString(baseModel.RDate, ProviderToDate);
                if (baseModel.GuideList != null && baseModel.GuideList.Count > 0)
                {
                    string guidelist = string.Empty;
                    for (int i = 0; i < baseModel.GuideList.Count; i++)
                    {
                        if (i == baseModel.GuideList.Count - 1)
                        {
                            guidelist += baseModel.GuideList[i].Name;
                        }
                        else
                        {
                            guidelist += baseModel.GuideList[i].Name + "、";
                        }
                    }
                    this.lbguidename.Text = guidelist;
                }
                this.lbpeoplecount.Text = baseModel.PlanPeopleNumber.ToString();
                if (baseModel.TourPlaner != null && baseModel.TourPlaner.Count > 0)
                {
                    string planerlist = string.Empty;
                    for (int i = 0; i < baseModel.TourPlaner.Count; i++)
                    {
                        if (i == baseModel.TourPlaner.Count - 1)
                        {
                            planerlist += baseModel.TourPlaner[i].Planer;
                        }
                        else
                        {
                            planerlist += baseModel.TourPlaner[i].Planer + "、";
                        }
                    }
                    var jiDiaoInfo = new EyouSoft.BLL.ComStructure.BComUser().GetModel(baseModel.TourPlaner[0].PlanerId, CurrentUserCompanyID);
                    if (jiDiaoInfo != null)
                    {
                        planerlist += " " + jiDiaoInfo.ContactMobile + " " + jiDiaoInfo.ContactTel;
                    }
                    this.lbplander.Text = planerlist;
                }
                if (baseModel.SaleInfo != null)
                {
                    var xiaoShouYuanInfo = new EyouSoft.BLL.ComStructure.BComUser().GetModel(baseModel.SaleInfo.SellerId, CurrentUserCompanyID);
                    if (xiaoShouYuanInfo != null)
                    {
                        baseModel.SaleInfo.Mobile = xiaoShouYuanInfo.ContactMobile;
                        baseModel.SaleInfo.Phone  = xiaoShouYuanInfo.ContactTel;
                    }
                    this.lbsellerinfo.Text = baseModel.SaleInfo.Name + " " + baseModel.SaleInfo.Mobile + " " + baseModel.SaleInfo.Phone;
                }
            }
            else
            {
                return;
            }
            #endregion

            #region 计调信息
            EyouSoft.BLL.PlanStructure.BPlan           bllPlan  = new EyouSoft.BLL.PlanStructure.BPlan();
            EyouSoft.Model.PlanStructure.MPlanBaseInfo planinfo = bllPlan.GetGuidePrint(TourId);

            #region 导游安排接待行程
            if (!string.IsNullOrEmpty(planinfo.ReceiveJourney))
            {
                TReceiveJourney.Visible    = true;
                this.lbReceiveJourney.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(planinfo.ReceiveJourney);
            }
            else
            {
                TReceiveJourney.Visible = false;
            }
            #endregion

            #region 导游安排服务标准
            if (!string.IsNullOrEmpty(planinfo.ServiceStandard))
            {
                TService.Visible            = true;
                this.lbServiceStandard.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(planinfo.ServiceStandard);
            }
            else
            {
                TService.Visible = false;
            }
            #endregion

            #region 导游须知
            if (!string.IsNullOrEmpty(planinfo.GuideNotes))
            {
                TGuideNote.Visible   = true;
                this.lbGuidNote.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(planinfo.GuideNotes);
            }
            else
            {
                this.TGuideNote.Visible = false;
            }
            #endregion

            #region  团队支付详单

            #region 导游

            IList <EyouSoft.Model.PlanStructure.MPlan> GuidePlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.导游, null, null, false, null, TourId, PlanState.已落实);
            GuidePlanList = GetZhiChus(GuidePlanList);
            if (GuidePlanList != null && GuidePlanList.Count > 0)
            {
                this.guid = GuidePlanList.Count;
                this.rpt_guid.DataSource = GuidePlanList;
                this.rpt_guid.DataBind();
            }
            else
            {
                this.ph_guid.Visible = false;
            }

            #endregion

            #region 地接

            IList <EyouSoft.Model.PlanStructure.MPlan> groundPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.地接, null, null, false, null, TourId, PlanState.已落实);
            groundPlanList = GetZhiChus(groundPlanList);
            if (groundPlanList != null && groundPlanList.Count > 0)
            {
                this.dijie = groundPlanList.Count;
                this.rpt_dijie.DataSource = groundPlanList;
                this.rpt_dijie.DataBind();
            }
            else
            {
                this.ph_dijie.Visible = false;
            }

            #endregion

            #region 飞机

            IList <EyouSoft.Model.PlanStructure.MPlan> phanePlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.飞机, null, null, false, null, TourId, PlanState.已落实);
            phanePlanList = GetZhiChus(phanePlanList);
            if (phanePlanList != null && phanePlanList.Count > 0)
            {
                this.plane = phanePlanList.Count;
                this.rpt_plane.DataSource = phanePlanList;
                this.rpt_plane.DataBind();
            }
            else
            {
                this.ph_plane.Visible = false;
            }

            #endregion

            #region 购物

            IList <EyouSoft.Model.PlanStructure.MPlan> shopPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.购物, null, null, false, null, TourId, PlanState.已落实);
            shopPlanList = GetZhiChus(shopPlanList);
            if (shopPlanList != null && shopPlanList.Count > 0)
            {
                this.gouwu = shopPlanList.Count;
                this.rpt_gouwu.DataSource = shopPlanList;
                this.rpt_gouwu.DataBind();
            }
            else
            {
                this.ph_gouwu.Visible = false;
            }

            #endregion

            #region 国内游轮

            IList <EyouSoft.Model.PlanStructure.MPlan> InshipPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.国内游轮, null, null, false, null, TourId, PlanState.已落实);
            InshipPlanList = GetZhiChus(InshipPlanList);
            if (InshipPlanList != null && InshipPlanList.Count > 0)
            {
                this.guoneichuan = InshipPlanList.Count;
                this.rpt_guoneichuan.DataSource = InshipPlanList;
                this.rpt_guoneichuan.DataBind();
            }
            else
            {
                this.ph_guoneichuan.Visible = false;
            }

            #endregion

            #region 涉外游轮

            IList <EyouSoft.Model.PlanStructure.MPlan> OutshipPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.涉外游轮, null, null, false, null, TourId, PlanState.已落实);
            OutshipPlanList = GetZhiChus(OutshipPlanList);
            if (OutshipPlanList != null && OutshipPlanList.Count > 0)
            {
                this.shewaichuan = OutshipPlanList.Count;
                this.rpt_shewaichuan.DataSource = OutshipPlanList;
                this.rpt_shewaichuan.DataBind();
            }
            else
            {
                this.ph_shewaichuan.Visible = false;
            }

            #endregion

            #region 火车

            IList <EyouSoft.Model.PlanStructure.MPlan> trainPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.火车, null, null, false, null, TourId, PlanState.已落实);
            trainPlanList = GetZhiChus(trainPlanList);
            if (trainPlanList != null && trainPlanList.Count > 0)
            {
                this.train = trainPlanList.Count;
                this.rpt_train.DataSource = trainPlanList;
                this.rpt_train.DataBind();
            }
            else
            {
                this.ph_train.Visible = false;
            }

            #endregion

            #region 景点

            IList <EyouSoft.Model.PlanStructure.MPlan> scenicPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.景点, null, null, false, null, TourId, PlanState.已落实);
            scenicPlanList = GetZhiChus(scenicPlanList);
            if (scenicPlanList != null && scenicPlanList.Count > 0)
            {
                this.jingdian = scenicPlanList.Count;
                this.rpt_jingdian.DataSource = scenicPlanList;
                this.rpt_jingdian.DataBind();
            }
            else
            {
                this.ph_jingdian.Visible = false;
            }

            #endregion

            #region 酒店

            IList <EyouSoft.Model.PlanStructure.MPlan> hotelPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.酒店, null, null, false, null, TourId, PlanState.已落实);
            hotelPlanList = GetZhiChus(hotelPlanList);
            if (hotelPlanList != null && hotelPlanList.Count > 0)
            {
                this.hotel = hotelPlanList.Count;
                this.rpt_hotellistk.DataSource = hotelPlanList;
                this.rpt_hotellistk.DataBind();
            }
            else
            {
                this.ph_hotel.Visible = false;
            }

            #endregion

            #region 领料

            IList <EyouSoft.Model.PlanStructure.MPlan> lingliaolPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.领料, null, null, false, null, TourId, PlanState.已落实);
            lingliaolPlanList = GetZhiChus(lingliaolPlanList);
            if (lingliaolPlanList != null && lingliaolPlanList.Count > 0)
            {
                this.lingliao = lingliaolPlanList.Count;
                this.rpt_lingliao.DataSource = lingliaolPlanList;
                this.rpt_lingliao.DataBind();
            }
            else
            {
                this.ph_lingliao.Visible = false;
            }

            #endregion

            #region 其它

            IList <EyouSoft.Model.PlanStructure.MPlan> otherlPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.其它, null, null, false, null, TourId, PlanState.已落实);
            otherlPlanList = GetZhiChus(otherlPlanList);
            if (otherlPlanList != null && otherlPlanList.Count > 0)
            {
                this.qita = otherlPlanList.Count;
                this.rpt_qita.DataSource = otherlPlanList;
                this.rpt_qita.DataBind();
            }
            else
            {
                this.ph_qita.Visible = false;
            }

            #endregion

            #region 汽车

            IList <EyouSoft.Model.PlanStructure.MPlan> busPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.汽车, null, null, false, null, TourId, PlanState.已落实);
            busPlanList = GetZhiChus(busPlanList);
            if (busPlanList != null && busPlanList.Count > 0)
            {
                this.bus = busPlanList.Count;
                this.rpt_bus.DataSource = busPlanList;
                this.rpt_bus.DataBind();
            }
            else
            {
                this.ph_bus.Visible = false;
            }

            #endregion

            #region 用餐

            IList <EyouSoft.Model.PlanStructure.MPlan> yongcanPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.用餐, null, null, false, null, TourId, PlanState.已落实);
            yongcanPlanList = GetZhiChus(yongcanPlanList);
            if (yongcanPlanList != null && yongcanPlanList.Count > 0)
            {
                this.yongcan = yongcanPlanList.Count;
                this.rpt_yongcan.DataSource = yongcanPlanList;
                this.rpt_yongcan.DataBind();
            }
            else
            {
                this.ph_yongcan.Visible = false;
            }

            #endregion

            #region 用车

            IList <EyouSoft.Model.PlanStructure.MPlan> carPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.用车, null, null, false, null, TourId, PlanState.已落实);
            carPlanList = GetZhiChus(carPlanList);
            if (carPlanList != null && carPlanList.Count > 0)
            {
                this.chedui = carPlanList.Count;
                this.rpt_chedui.DataSource = carPlanList;
                this.rpt_chedui.DataBind();
            }
            else
            {
                this.ph_chedui.Visible = false;
            }

            #endregion

            #endregion
            #endregion
        }
Ejemplo n.º 9
0
        /// <summary>
        /// 初始化界面
        /// </summary>
        /// <param name="orderId"></param>
        private void PageInit(string orderId, string type)
        {
            EyouSoft.BLL.TourStructure.BTourOrder         bOrder = new EyouSoft.BLL.TourStructure.BTourOrder();
            EyouSoft.Model.TourStructure.MTourOrderExpand order  = bOrder.GetTourOrderExpandByOrderId(orderId);
            if (order != null)
            {
                this.LtOrderCode.Text    = order.OrderCode;
                this.LtDCompanyName.Text = order.DCompanyName;
                this.LtDContactName.Text = order.DContactName;
                this.LtDContactTel.Text  = order.DContactTel;

                this.LtSellerName.Text           = order.SellerName;
                this.LtOperator.Text             = order.Operator;
                this.LtAdults.Text               = order.Adults.ToString();
                this.LtChilds.Text               = order.Childs.ToString();
                this.LtAdultPrice.Text           = EyouSoft.Common.UtilsCommons.GetMoneyString(order.AdultPrice, this.ProviderToMoney);
                this.LtChildPrice.Text           = EyouSoft.Common.UtilsCommons.GetMoneyString(order.ChildPrice, this.ProviderToMoney);
                this.LtSaleAddCost.Text          = EyouSoft.Common.UtilsCommons.GetMoneyString(order.SaleAddCost, this.ProviderToMoney);
                this.LtSaleAddCostRemark.Text    = order.SaleAddCostRemark;
                this.LtSaleReduceCost.Text       = EyouSoft.Common.UtilsCommons.GetMoneyString(order.SaleReduceCost, this.ProviderToMoney);
                this.LtSaleReduceCostRemark.Text = order.SaleReduceCostRemark;
                this.LtSumPrice.Text             = EyouSoft.Common.UtilsCommons.GetMoneyString(order.SumPrice, this.ProviderToMoney);
                this.LtGuideIncome.Text          = EyouSoft.Common.UtilsCommons.GetMoneyString(order.GuideIncome, this.ProviderToMoney);
                this.LtSalerIncome.Text          = EyouSoft.Common.UtilsCommons.GetMoneyString(order.SalerIncome, this.ProviderToMoney);
                this.LtSaveSeatDate.Text         = order.SaveSeatDate.HasValue ? order.SaveSeatDate.Value.ToString() : string.Empty;
                this.LtOrderRemark.Text          = order.OrderRemark;

                EyouSoft.BLL.TourStructure.BTour           bll   = new EyouSoft.BLL.TourStructure.BTour();
                EyouSoft.Model.TourStructure.MTourBaseInfo model = bll.GetTourInfo(Convert.ToString(tourID));
                if (model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.组团散拼短线)
                {
                    string CarLocation = string.Empty;
                    if (order.TourOrderCarLocation != null)
                    {
                        CarLocation = order.TourOrderCarLocation.Location;
                    }
                    if (!string.IsNullOrEmpty(CarLocation))
                    {
                        this.setCarLocation.Text = CarLocation;
                    }
                    else
                    {
                        this.setCarLocation.Text = "<font class='fontred'>未设置上车地点</font>";
                    }
                    string carInfo = string.Empty;
                    if (order.TourCarTypeList != null && order.TourCarTypeList.Count > 0)
                    {
                        for (int i = 0; i < order.TourCarTypeList.Count; i++)
                        {
                            if (i == order.TourCarTypeList.Count - 1)
                            {
                                carInfo += order.TourCarTypeList[i].CarTypeName;
                            }
                            else
                            {
                                carInfo += order.TourCarTypeList[i].CarTypeName + "、";
                            }
                        }
                    }
                    if (!string.IsNullOrEmpty(carInfo))
                    {
                        this.carInfo.Text = carInfo;
                    }
                    else
                    {
                        this.carInfo.Text = "<font class='fontred'>未设置车型</font>";
                    }
                }
                else
                {
                    this.PhCarLocation.Visible = false;
                }

                if (order.MTourOrderTravellerList != null && order.MTourOrderTravellerList.Count != 0)
                {
                    this.RpTravller.DataSource = order.MTourOrderTravellerList;
                    this.RpTravller.DataBind();
                }
                else
                {
                    this.phTraveller.Visible = false;
                }
            }
        }
Ejemplo n.º 10
0
        /// <summary>
        /// 页面初始化
        /// </summary>
        private void PageInit()
        {
            this.lblApplyMan.Text      = SiteUserInfo.Name;
            this.lblApplyDateTime.Text = UtilsCommons.GetDateString(DateTime.Now, this.ProviderToDate);

            EyouSoft.BLL.TourStructure.BQuote bll = new EyouSoft.BLL.TourStructure.BQuote();

            string tourId  = Utils.GetQueryStringValue("tourId");
            string orderId = Utils.GetQueryStringValue("orderId");
            string msg     = string.Empty;
            //询价单位编号
            string buyID = string.Empty;
            //销售员编号
            string sellsID = string.Empty;
            //合计金额
            decimal price      = 0;
            decimal settePrice = 0;

            if (tourId != "")
            {
                this.hideTourId.Value = tourId;
                EyouSoft.BLL.TourStructure.BTour tourBll = new EyouSoft.BLL.TourStructure.BTour();

                EyouSoft.Model.TourStructure.MTourTeamInfo model = (EyouSoft.Model.TourStructure.MTourTeamInfo)tourBll.GetTourInfo(tourId);
                if (model != null)
                {
                    if (model.SaleInfo != null)
                    {
                        sellsID = model.SaleInfo.SellerId;
                    }
                    if (model.CompanyInfo != null)
                    {
                        buyID = model.CompanyInfo.CompanyId;
                    }
                    settePrice = price = model.SumPrice;
                }
            }

            if (orderId != "")
            {
                this.hideOrderId.Value = orderId;
                EyouSoft.BLL.TourStructure.BTourOrder         orderBll   = new EyouSoft.BLL.TourStructure.BTourOrder();
                EyouSoft.Model.TourStructure.MTourOrderExpand orderModel = orderBll.GetTourOrderExpandByOrderId(orderId);
                if (orderModel != null)
                {
                    sellsID    = orderModel.SellerId;
                    buyID      = orderModel.BuyCompanyId;
                    price      = orderModel.SumPrice;
                    settePrice = orderModel.ConfirmSettlementMoney;
                }
            }

            if (buyID != "" && sellsID != "" && price > 0)
            {
                EyouSoft.Model.FinStructure.MCustomerWarning customerWarningModel = bll.GetCustomerOverrunDetail(buyID, price, SiteUserInfo.CompanyId);
                EyouSoft.Model.FinStructure.MSalesmanWarning salesmanWarningModel = bll.GetSaleOverrunDetail(sellsID, settePrice, SiteUserInfo.CompanyId);
                if (customerWarningModel != null)
                {
                    PageHtml[0] = "<tr><td height='28' bgcolor='#FFFFFF' align='center'>" + customerWarningModel.Customer + "</td><td bgcolor='#FFFFFF' align='center'><b class='fontbsize12'>" + UtilsCommons.GetMoneyString(customerWarningModel.AmountOwed, this.ProviderToMoney) + "</b></td><td bgcolor='#FFFFFF' align='center'><a class='link1'><strong>" + UtilsCommons.GetMoneyString(customerWarningModel.Arrear, this.ProviderToMoney) + "</strong></a></td><td bgcolor='#FFFFFF' align='center'><b class='fontgreen'>" + UtilsCommons.GetMoneyString(customerWarningModel.Transfinite, this.ProviderToMoney) + "</b></td><td bgcolor='#FFFFFF' align='center'>" + UtilsCommons.GetDateString(customerWarningModel.TransfiniteTime, this.ProviderToDate) + "</td><td bgcolor='#FFFFFF' align='center'>" + customerWarningModel.Deadline.ToString() + "</td><td bgcolor='#FFFFFF' align='center'>" + (customerWarningModel.DeadDay <= 0 ? 0 : customerWarningModel.DeadDay) + "</td></tr>";
                }
                else
                {
                    this.phdKehu.Visible = false;
                }

                if (salesmanWarningModel != null)
                {
                    PageHtml[1] = "<tr><td height='28' bgcolor='#FFFFFF' align='center'>" + salesmanWarningModel.SellerName + "</td><td bgcolor='#FFFFFF' align='center'><strong>" + UtilsCommons.GetMoneyString(salesmanWarningModel.AmountOwed, this.ProviderToMoney) + "</strong></td><td bgcolor='#FFFFFF' align='center'><strong>" + UtilsCommons.GetMoneyString(salesmanWarningModel.ConfirmAdvances, this.ProviderToMoney) + "</strong></td><td bgcolor='#FFFFFF' align='center'><strong>" + UtilsCommons.GetMoneyString(salesmanWarningModel.PreIncome, this.ProviderToMoney) + "</strong></td><td bgcolor='#FFFFFF' align='center'><b class='fontblue'>" + UtilsCommons.GetMoneyString(salesmanWarningModel.SumPay, this.ProviderToMoney) + "</b></td><td bgcolor='#FFFFFF' align='center'><b class='fontbsize12'>" + UtilsCommons.GetMoneyString(salesmanWarningModel.Arrear, this.ProviderToMoney) + "</b></td><td bgcolor='#FFFFFF' align='center'><b class='fontgreen'>" + UtilsCommons.GetMoneyString(salesmanWarningModel.Transfinite, this.ProviderToMoney) + "</b></td><td bgcolor='#FFFFFF' align='center'>" + UtilsCommons.GetDateString(salesmanWarningModel.TransfiniteTime, this.ProviderToDate) + "</td></tr>";
                }
                else
                {
                    this.phdXiaoshou.Visible = false;
                }
            }
            else
            {
                this.phdKehu.Visible     = false;
                this.phdXiaoshou.Visible = false;
            }
        }
Ejemplo n.º 11
0
        private void PageInit(string tourid, string quoteid, string type)
        {
            this.txtsourcename.Text = SiteUserInfo.CompanyName;

            /*this.txtname.Text = SiteUserInfo.Name;
             * this.txttel.Text = SiteUserInfo.Telephone;
             * this.txtfax.Text = SiteUserInfo.Fax;*/

            //派团计划实体
            if (!string.IsNullOrEmpty(tourid))
            {
                EyouSoft.Model.TourStructure.MTourTeamInfo     model    = null;
                EyouSoft.BLL.TourStructure.BTour               bll      = new EyouSoft.BLL.TourStructure.BTour();
                EyouSoft.Model.EnumType.TourStructure.TourType tourtype = bll.GetTourType(tourid);
                switch (tourtype)
                {
                case EyouSoft.Model.EnumType.TourStructure.TourType.出境散拼:
                case EyouSoft.Model.EnumType.TourStructure.TourType.地接散拼:
                case EyouSoft.Model.EnumType.TourStructure.TourType.组团散拼:
                case EyouSoft.Model.EnumType.TourStructure.TourType.组团散拼短线:
                    //跳转到散拼
                    EyouSoft.BLL.ComStructure.BComSetting bcom = new EyouSoft.BLL.ComStructure.BComSetting();

                    Response.Redirect(bcom.GetPrintUri(this.SiteUserInfo.CompanyId, EyouSoft.Model.EnumType.ComStructure.PrintTemplateType.散拼行程单) + "?tourId=" + tourid);
                    break;

                case EyouSoft.Model.EnumType.TourStructure.TourType.单项服务:
                    this.TAll.Visible           = false;
                    this.TChildren.Visible      = false;
                    this.TNeedAttention.Visible = false;
                    this.TNoService.Visible     = false;
                    this.TOption.Visible        = false;
                    this.TPlanFeature.Visible   = false;
                    this.TSelfProject.Visible   = false;
                    this.TService.Visible       = false;
                    this.TShopping.Visible      = false;
                    this.TTourPrice.Visible     = false;
                    this.TWarmRemind.Visible    = false;
                    return;
                }
                if (type == "")
                {
                    model = (EyouSoft.Model.TourStructure.MTourTeamInfo)bll.GetTourInfo(tourid);
                }
                else
                {
                    model = (EyouSoft.Model.TourStructure.MTourTeamInfo)bll.GetOldTourInfo(tourid, this.SiteUserInfo.CompanyId);
                }
                if (model != null)
                {
                    this.lbTourCode.Text  = model.TourCode;
                    this.lbPeoNum.Text    = model.Adults.ToString() + "<sup>+" + model.Childs.ToString() + "</sup>";
                    this.lbAdultsNum.Text = model.Adults.ToString() + "人";
                    this.lbChildsNum.Text = model.Childs.ToString() + "人";
                    this.lbRouteName.Text = model.RouteName;
                    if (model.CompanyInfo != null)
                    {
                        this.txtunitname.Text        = model.CompanyInfo.CompanyName;
                        this.txtunitContactname.Text = model.CompanyInfo.Contact;
                        this.txtunittel.Text         = model.CompanyInfo.Phone;
                    }

                    #region 行程
                    IList <EyouSoft.Model.TourStructure.MPlanBaseInfo> planinfo = model.TourPlan.OrderBy(m => m.Days).ToList();
                    if (planinfo != null && planinfo.Count > 0)
                    {
                        StringBuilder strAllDateInfo = new StringBuilder();
                        string        Dinner         = string.Empty;//包餐(早、中、晚)
                        foreach (EyouSoft.Model.TourStructure.MPlanBaseInfo Plan in planinfo)
                        {
                            if (Plan.Breakfast)
                            {
                                Dinner += "早、";
                            }
                            if (Plan.Lunch)
                            {
                                Dinner += "中、";
                            }
                            if (Plan.Supper)
                            {
                                Dinner += "晚、";
                            }

                            string riQi = "第" + Plan.Days + "天&nbsp;";
                            if (model.LDate.HasValue)
                            {
                                riQi += model.LDate.Value.AddDays(Plan.Days - 1).ToString("yyyy-MM-dd");
                            }

                            strAllDateInfo.AppendFormat("<table width='696' border='0' align='center' cellpadding='0' cellspacing='0' class='borderline_2'><tr><td width='35%' class='small_title'><b class='font16'>{0}  {6}</b></td><td width='15%' class='small_title'><b class='font14'>交通:{1}</b></td><td width='20%' class='small_title'><b class='font14'>餐:{2}</b></td><td width='30%' class='small_title'><b class='font14'>住宿:{3}</b></td></tr></table><table width='696' border='0' align='center' cellpadding='0' cellspacing='0' style='margin-top:0px' class='list_2'><tr><td class='td_text' style='border-top:none;' width='{7}'>{4}</td>{5}</tr></table>", riQi, Plan.Traffic, Dinner, Plan.Hotel, Plan.Content, string.IsNullOrEmpty(Plan.FilePath) ? "" : "<td style='border-top:none;'><img src='http://" + Request.Url.Authority + Plan.FilePath + "' width='202' height='163' /></td>", Plan.Section, string.IsNullOrEmpty(Plan.FilePath) ? "100%" : "480px");
                            Dinner = string.Empty;
                        }
                        this.lbtourplan.Text = strAllDateInfo.ToString();
                    }
                    #endregion

                    #region 线路特色
                    if (string.IsNullOrEmpty(model.PlanFeature))
                    {
                        this.TPlanFeature.Visible = false;
                    }
                    else
                    {
                        this.lbPlanFeature.Text = model.PlanFeature;
                    }
                    #endregion

                    #region 计划服务
                    if (model.TourService != null)
                    {
                        #region  务标准

                        /*if (string.IsNullOrEmpty(model.TourService.ServiceStandard))
                         * {
                         *  this.TService.Visible = false;
                         * }
                         * else
                         * {
                         *  this.lbService.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ServiceStandard);
                         * }*/
                        TService.Visible = false;
                        #endregion

                        #region  务不含
                        if (string.IsNullOrEmpty(model.TourService.NoNeedItem))
                        {
                            this.TNoService.Visible = false;
                        }
                        else
                        {
                            this.lbnoService.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.NoNeedItem);
                        }
                        #endregion

                        #region 购物安排
                        if (string.IsNullOrEmpty(model.TourService.ShoppingItem))
                        {
                            this.TShopping.Visible = false;
                        }
                        else
                        {
                            this.lbshopping.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ShoppingItem);
                        }
                        #endregion

                        #region 儿童安排
                        if (string.IsNullOrEmpty(model.TourService.ChildServiceItem))
                        {
                            this.TChildren.Visible = false;
                        }
                        else
                        {
                            this.lbchildren.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ChildServiceItem);
                        }
                        #endregion

                        #region 自费项目
                        if (string.IsNullOrEmpty(model.TourService.OwnExpense))
                        {
                            this.TSelfProject.Visible = false;
                        }
                        else
                        {
                            this.lbselfproject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.OwnExpense);
                        }
                        #endregion

                        #region 温馨提醒
                        if (string.IsNullOrEmpty(model.TourService.WarmRemind))
                        {
                            this.TWarmRemind.Visible = false;
                        }
                        else
                        {
                            this.lbwarmremind.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.WarmRemind);
                        }
                        #endregion

                        #region 注意事项
                        if (string.IsNullOrEmpty(model.TourService.NeedAttention))
                        {
                            this.TNeedAttention.Visible = false;
                        }
                        else
                        {
                            this.lbneedattention.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.NeedAttention);
                        }
                        #endregion
                    }
                    else
                    {
                        this.TPlanService.Visible = false;
                    }
                    #endregion

                    #region  务标准
                    if (model.OutQuoteType == EyouSoft.Model.EnumType.TourStructure.TourQuoteType.整团)
                    {
                        this.TOption.Visible = false;
                        if (model.TourService != null)
                        {
                            this.lballservice.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ServiceStandard);
                        }
                    }
                    else
                    {
                        this.TAll.Visible = false;
                        IList <MTourTeamPrice> TeamPrice    = model.TourTeamPrice;
                        StringBuilder          strTeamPrice = new StringBuilder();
                        foreach (MTourTeamPrice teamprice in TeamPrice)
                        {
                            if (!string.IsNullOrEmpty(teamprice.ServiceType.ToString()))
                            {
                                strTeamPrice.AppendFormat("<tr><td width='9%' align='left'><b class='font14'>{0}</b></td><td align='left'>{1}</td><td align='center' width='13%'>{2}</td>", teamprice.ServiceType.ToString(), EyouSoft.Common.Function.StringValidate.TextToHtml(teamprice.ServiceStandard), EyouSoft.Common.UtilsCommons.GetMoneyString(teamprice.Quote, ProviderToMoney) + "/" + teamprice.Unit.ToString());
                            }
                        }
                        this.lboptionservice.Text = strTeamPrice.ToString();
                    }
                    #endregion

                    #region 团队报价
                    this.lbChildPrice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.ChildPrice, ProviderToMoney) + "/人";
                    this.lbAdultPrice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.AdultPrice, ProviderToMoney) + "/人";
                    this.lbotherprice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.OtherCost, ProviderToMoney) + "/团";
                    this.lbtotleprice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.SumPrice, ProviderToMoney);
                    this.lbremark.Text     = model.QuoteRemark;

                    #endregion

                    #region 销售员
                    if (model.SaleInfo != null)
                    {
                        var xiaoShouYuanInfo = new EyouSoft.BLL.ComStructure.BComUser().GetModel(model.SaleInfo.SellerId, SiteUserInfo.CompanyId);
                        if (xiaoShouYuanInfo != null)
                        {
                            this.txtname.Text = xiaoShouYuanInfo.ContactName;
                            this.txttel.Text  = xiaoShouYuanInfo.ContactTel;
                            this.txtfax.Text  = xiaoShouYuanInfo.ContactFax;
                        }
                    }
                    #endregion
                }
            }
            else//团队报价实体
            {
                EyouSoft.BLL.TourStructure.BQuote           bll   = new EyouSoft.BLL.TourStructure.BQuote();
                EyouSoft.Model.TourStructure.MTourQuoteInfo model = bll.GetQuoteInfo(quoteid);
                if (model != null)
                {
                    this.lbRouteName.Text        = model.RouteName;
                    this.lbPeoNum.Text           = model.Adults.ToString() + "<sup>+" + model.Childs.ToString() + "</sup>";
                    this.lbAdultsNum.Text        = model.Adults.ToString() + "人";
                    this.lbChildsNum.Text        = model.Childs.ToString() + "人";
                    this.txtunitname.Text        = model.BuyCompanyName;
                    this.txtunitContactname.Text = model.Contact;
                    this.txtunittel.Text         = model.Phone;
                    this.lbRouteName.Text        = model.RouteName;
                    #region 行程
                    IList <EyouSoft.Model.TourStructure.MPlanBaseInfo> planinfo = model.QuotePlan.OrderBy(m => m.Days).ToList();
                    if (planinfo != null && planinfo.Count > 0)
                    {
                        StringBuilder strAllDateInfo = new StringBuilder();
                        string        Dinner         = string.Empty;//包餐(早、中、晚)
                        foreach (EyouSoft.Model.TourStructure.MPlanBaseInfo Plan in planinfo)
                        {
                            if (Plan.Breakfast)
                            {
                                Dinner += "早、";
                            }
                            if (Plan.Lunch)
                            {
                                Dinner += "中、";
                            }
                            if (Plan.Supper)
                            {
                                Dinner += "晚、";
                            }
                            strAllDateInfo.AppendFormat("<table width='696' border='0' align='center' cellpadding='0' cellspacing='0' class='borderline_2'><tr><td width='35%' class='small_title'><b class='font16'>第{0}天  {6}</b></td><td width='15%' class='small_title'><b class='font14'>交通:{1}</b></td><td width='20%' class='small_title'><b class='font14'>餐:{2}</b></td><td width='30%' class='small_title'><b class='font14'>住宿:{3}</b></td></tr></table><table width='696' border='0' align='center' cellpadding='0' cellspacing='0' style='margin-top:0px' class='list_2'><tr><td class='td_text' style='border-top:none;' width='{7}'>{4}</td>{5}</tr></table>", Plan.Days.ToString(), Plan.Traffic, Dinner, Plan.Hotel, Plan.Content, string.IsNullOrEmpty(Plan.FilePath) ? "" : "<td style='border-top:none;'><img src='http://" + Request.Url.Authority + Plan.FilePath + "' width='202' height='163' /></td>", Plan.Section, string.IsNullOrEmpty(Plan.FilePath) ? "100%" : "480px");
                            Dinner = string.Empty;
                        }
                        this.lbtourplan.Text = strAllDateInfo.ToString();
                    }
                    #endregion

                    #region 线路特色
                    if (string.IsNullOrEmpty(model.PlanFeature))
                    {
                        this.TPlanFeature.Visible = false;
                    }
                    else
                    {
                        this.lbPlanFeature.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.PlanFeature);
                    }
                    #endregion

                    #region 计划服务
                    if (model.TourService != null)
                    {
                        #region  务标准
                        if (string.IsNullOrEmpty(model.TourService.ServiceStandard))
                        {
                            this.TService.Visible = false;
                        }
                        else
                        {
                            this.lbService.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ServiceStandard);
                        }
                        #endregion

                        #region  务不含
                        if (string.IsNullOrEmpty(model.TourService.NoNeedItem))
                        {
                            this.TNoService.Visible = false;
                        }
                        else
                        {
                            this.lbnoService.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.NoNeedItem);
                        }
                        #endregion

                        #region 购物安排
                        if (string.IsNullOrEmpty(model.TourService.ShoppingItem))
                        {
                            this.TShopping.Visible = false;
                        }
                        else
                        {
                            this.lbshopping.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ShoppingItem);
                        }
                        #endregion

                        #region 儿童安排
                        if (string.IsNullOrEmpty(model.TourService.ChildServiceItem))
                        {
                            this.TChildren.Visible = false;
                        }
                        else
                        {
                            this.lbchildren.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ChildServiceItem);
                        }
                        #endregion

                        #region 自费项目
                        if (string.IsNullOrEmpty(model.TourService.OwnExpense))
                        {
                            this.TSelfProject.Visible = false;
                        }
                        else
                        {
                            this.lbselfproject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.OwnExpense);
                        }
                        #endregion

                        #region 温馨提醒
                        if (string.IsNullOrEmpty(model.TourService.WarmRemind))
                        {
                            this.TWarmRemind.Visible = false;
                        }
                        else
                        {
                            this.lbwarmremind.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.WarmRemind);
                        }
                        #endregion

                        #region 注意事项
                        if (string.IsNullOrEmpty(model.TourService.NeedAttention))
                        {
                            this.TNeedAttention.Visible = false;
                        }
                        else
                        {
                            this.lbneedattention.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.NeedAttention);
                        }
                        #endregion
                    }
                    else
                    {
                        this.TPlanService.Visible = false;
                    }
                    #endregion

                    #region  务标准
                    if (model.OutQuoteType == EyouSoft.Model.EnumType.TourStructure.TourQuoteType.整团)
                    {
                        this.TOption.Visible   = false;
                        this.lballservice.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard);
                    }
                    else
                    {
                        this.TAll.Visible = false;
                        IList <MTourTeamPrice> TeamPrice    = model.TourTeamPrice;
                        StringBuilder          strTeamPrice = new StringBuilder();
                        foreach (MTourTeamPrice teamprice in TeamPrice)
                        {
                            if (!string.IsNullOrEmpty(teamprice.ServiceType.ToString()))
                            {
                                strTeamPrice.AppendFormat("<tr><td width='9%' align='left'><b class='font14'>{0}</b></td><td align='left'>{1}</td><td width='13%' align='center'>{2}</td>", teamprice.ServiceType.ToString(), EyouSoft.Common.Function.StringValidate.TextToHtml(teamprice.ServiceStandard), EyouSoft.Common.UtilsCommons.GetMoneyString(teamprice.Quote, ProviderToMoney) + "/" + teamprice.Unit.ToString());
                            }
                        }
                        this.lboptionservice.Text = strTeamPrice.ToString();
                    }
                    #endregion

                    #region 团队报价
                    this.lbChildPrice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.ChildPrice, ProviderToMoney) + "/人";
                    this.lbAdultPrice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.AdultPrice, ProviderToMoney) + "/人";
                    this.lbotherprice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.OtherCost, ProviderToMoney) + "/团";
                    this.lbtotleprice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.TotalPrice, ProviderToMoney);
                    this.lbremark.Text     = model.QuoteRemark;

                    #endregion

                    #region 销售员
                    if (model.SaleInfo != null)
                    {
                        var xiaoShouYuanInfo = new EyouSoft.BLL.ComStructure.BComUser().GetModel(model.SaleInfo.SellerId, SiteUserInfo.CompanyId);
                        if (xiaoShouYuanInfo != null)
                        {
                            this.txtname.Text = xiaoShouYuanInfo.ContactName;
                            this.txttel.Text  = xiaoShouYuanInfo.ContactTel;
                            this.txtfax.Text  = xiaoShouYuanInfo.ContactFax;
                        }
                    }
                    #endregion
                }
            }
        }
Ejemplo n.º 12
0
        /// <summary>
        /// 页面初始化
        /// </summary>
        /// <param name="id">操作tourID</param>
        protected void PageInitForTour(string tourID)
        {
            EyouSoft.BLL.TourStructure.BTour             bll           = new EyouSoft.BLL.TourStructure.BTour();
            EyouSoft.Model.TourStructure.MTourSanPinInfo tourBaseModel = (EyouSoft.Model.TourStructure.MTourSanPinInfo)bll.GetTourInfo(tourID);
            if (tourBaseModel != null)
            {
                //权限控制
                PowerControl(tourBaseModel.TourType);
                //根据计划类型显示
                if (tourBaseModel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.出境散拼)
                {
                    this.pnlTravelFrist.Visible = false;
                }
                else
                {
                    this.pnlTravelSecond.Visible = false;
                }
                this.hideTourType.Value           = ((int)tourBaseModel.TourType).ToString();
                this.hideSourceID.Value           = tourBaseModel.SourceId;
                this.PriceStand1.ShowModel        = true;
                this.PriceStand1.SetPriceStandard = tourBaseModel.MTourPriceStandard;
                this.SellsSelect1.SellsID         = SiteUserInfo.UserId;
                this.SellsSelect1.SellsName       = SiteUserInfo.Name;
                this.hideDeptID.Value             = SiteUserInfo.DeptId.ToString();
                this.hideDeptName.Value           = SiteUserInfo.DeptName;
                this.lblOrderMan.Text             = SiteUserInfo.Name;


                this.pdhJiXuLiuWei.Visible      = false;
                this.pdhBaoCun.Visible          = false;
                this.phdQuXiao.Visible          = false;
                this.phdBuShouLi.Visible        = false;
                this.phdQueRenYuLiu.Visible     = false;
                this.phsQueRenChengJiao.Visible = false;

                //如果是供应商的团
                if (tourBaseModel.SourceId != null && tourBaseModel.SourceId.Trim() != "")
                {
                    var _status = new EyouSoft.Model.EnumType.TourStructure.TourStatus[] {
                        EyouSoft.Model.EnumType.TourStructure.TourStatus.销售未派计划,
                        EyouSoft.Model.EnumType.TourStructure.TourStatus.计调未接收,
                        EyouSoft.Model.EnumType.TourStructure.TourStatus.计调配置
                    };

                    if (_status.Contains(tourBaseModel.TourStatus))
                    {
                        this.pdhBaoCun.Visible = true;
                    }
                    else
                    {
                        this.litOrderMsg.Text = "<div class='tishi_info'>该计划已经配置完毕,不可报名。</div>";
                    }
                }
                else
                {
                    var _status = new EyouSoft.Model.EnumType.TourStructure.TourStatus[] {
                        EyouSoft.Model.EnumType.TourStructure.TourStatus.销售未派计划,
                        EyouSoft.Model.EnumType.TourStructure.TourStatus.计调未接收,
                        EyouSoft.Model.EnumType.TourStructure.TourStatus.计调配置
                    };

                    if (_status.Contains(tourBaseModel.TourStatus))
                    {
                        this.phdQueRenYuLiu.Visible     = true;
                        this.phsQueRenChengJiao.Visible = true;
                    }
                    else
                    {
                        this.litOrderMsg.Text = "<div class='tishi_info'>该计划已经配置完毕,不可报名。</div>";
                    }
                }
            }
            else
            {
                Utils.ResponseGoBack();
            }
        }