示例#1
0
        /// <summary>
        /// 绑定线路区域的下拉框
        /// </summary>
        /// <returns></returns>
        public string GetArea(string area)
        {
            System.Text.StringBuilder option = new System.Text.StringBuilder();
            option.Append("<option value=''>-请选择-</option>");
            EyouSoft.BLL.ComStructure.BComArea           bArea = new EyouSoft.BLL.ComStructure.BComArea();
            IList <EyouSoft.Model.ComStructure.MComArea> list  = bArea.GetAreaByCID(SiteUserInfo.CompanyId);

            if (list != null)
            {
                if (list.Count != 0)
                {
                    foreach (var item in list)
                    {
                        if (item.AreaId.ToString().Equals(area))
                        {
                            option.AppendFormat("<option value='{0}'  selected='selected'>{1}</option>", item.AreaId, item.AreaName);
                        }
                        else
                        {
                            option.AppendFormat("<option value='{0}' >{1}</option>", item.AreaId, item.AreaName);
                        }
                    }
                }
            }
            return(option.ToString());
        }
示例#2
0
 /// <summary>
 /// 页面初始化
 /// </summary>
 protected void PageInit()
 {
     System.Collections.Generic.List <EnumObj> list = EyouSoft.Common.EnumObj.GetList(typeof(EyouSoft.Model.EnumType.ComStructure.AreaType));
     this.ddlAreaType.DataTextField  = "Text";
     this.ddlAreaType.DataValueField = "Value";
     this.ddlAreaType.DataSource     = list;
     this.ddlAreaType.DataBind();
     if (AreaId != 0)
     {
         EyouSoft.Model.ComStructure.MComArea model = new EyouSoft.BLL.ComStructure.BComArea().GetModel(AreaId, SiteUserInfo.CompanyId);
         txtAreaName.Text = model.AreaName;
         if (model.Plan != null)
         {
             foreach (var item in model.Plan)
             {
                 SellsSelect1.SellsID   += item.OperatorId + ",";
                 SellsSelect1.SellsName += item.Planer + ",";
             }
             SellsSelect1.SellsID   = SellsSelect1.SellsID.Trim(',');
             SellsSelect1.SellsName = SellsSelect1.SellsName.Trim(',');
         }
         if (ddlAreaType.Items.FindByValue(((int)model.Type).ToString()) != null)
         {
             ddlAreaType.SelectedValue = ((int)model.Type).ToString();
         }
     }
 }
示例#3
0
        /// <summary>
        /// 绑定数据、分页控件
        /// </summary>
        public void BindSource()
        {
            pageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1);
            string levelId = SiteUserInfo.TourCompanyInfo.LevelId.ToString();

            MTourSaleSearch search = new MTourSaleSearch();

            search.AreaId    = Utils.GetInt(Utils.GetQueryStringValue("AreaId"));
            search.RouteName = Utils.GetQueryStringValue("txtRouteName");
            search.SLDate    = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("txtBeginLDate"));
            search.LLDate    = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("txtEndLDate"));

            BTour tour = new BTour();
            IList <MTourSanPinInfo> list = tour.GetTourSaleList(SiteUserInfo.CompanyId, pageSize, pageIndex, ref recordCount, search, levelId);

            this.RtPlan.DataSource = list;
            this.RtPlan.DataBind();

            //绑定线路区域
            EyouSoft.BLL.ComStructure.BComArea           bArea    = new EyouSoft.BLL.ComStructure.BComArea();
            IList <EyouSoft.Model.ComStructure.MComArea> areaList = bArea.GetAreaByCID(SiteUserInfo.CompanyId);

            this.rpArea.DataSource = areaList;
            this.rpArea.DataBind();

            BindPage();
        }
示例#4
0
        private void PageInit()
        {
            EyouSoft.BLL.ComStructure.BComArea BLL = new EyouSoft.BLL.ComStructure.BComArea();
            pageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1);
            MComAreaSearch model = new MComAreaSearch();

            model.AreaName = Utils.GetQueryStringValue("txtlineName");
            model.Type     = Utils.GetQueryStringValue("areaType") == "" ? (AreaType?)null : (AreaType)Utils.GetInt(Utils.GetQueryStringValue("areaType"));
            IList <EyouSoft.Model.ComStructure.MComArea> lst = BLL.GetList(pageIndex, pageSize, ref recordCount, this.SiteUserInfo.CompanyId, model);

            if (lst != null && lst.Count > 0)
            {
                this.rpt_list.DataSource = lst;
                this.rpt_list.DataBind();
                if (pageSize >= recordCount)
                {
                    this.ExporPageInfoSelect1.Visible = false;
                }
                else
                {
                    BindPage();
                }
            }
            else
            {
                this.rpt_list.Controls.Add(new Label()
                {
                    Text = "<tr><td colspan='3' height='23' align='center'>对不起,没有相关数据!</td></tr>"
                });
                this.ExporPageInfoSelect1.Visible = false;
            }
        }
示例#5
0
        /// <summary>
        /// 线路区域初始化
        /// </summary>
        private void AreaInit()
        {
            IList <EyouSoft.Model.ComStructure.MComArea> list = new EyouSoft.BLL.ComStructure.BComArea().GetAreaByCID(this.SiteUserInfo.CompanyId);

            if (list != null && list.Count > 0)
            {
                this.rptAreaList.DataSource = list;
                this.rptAreaList.DataBind();
            }
        }
示例#6
0
        /// <summary>
        /// 保存执行方法
        /// </summary>
        private string PageSave()
        {
            EyouSoft.BLL.ComStructure.BComArea   bll   = new EyouSoft.BLL.ComStructure.BComArea();
            EyouSoft.Model.ComStructure.MComArea model = new EyouSoft.Model.ComStructure.MComArea();
            string areaName   = Utils.GetFormValue(this.txtAreaName.UniqueID);
            string planerName = Utils.GetFormValue(SellsSelect1.SellsNameClient);
            string planerID   = Utils.GetFormValue(SellsSelect1.SellsIDClient);
            string areatype   = Utils.GetFormValue("selecttype");

            if (string.IsNullOrEmpty(planerName.Trim()))
            {
                return(EyouSoft.Common.UtilsCommons.AjaxReturnJson("0", "请选择责任计调"));
            }
            model.AreaName   = areaName;
            model.CompanyId  = this.SiteUserInfo.CompanyId;
            model.IssueTime  = DateTime.Now;
            model.OperatorId = this.SiteUserInfo.UserId;
            model.Type       = (EyouSoft.Model.EnumType.ComStructure.AreaType)Utils.GetInt(areatype);
            //责任计调
            MComAreaPlan plan = new MComAreaPlan();

            if (planerName.Split(',').Length > 0)
            {
                for (int i = 0; i < planerName.Split(',').Length; i++)
                {
                    plan.OperatorId = planerName.Split(',')[i].ToString();
                }
            }
            else
            {
                plan.OperatorId = planerName;
            }
            IList <MComAreaPlan> planlist = new List <MComAreaPlan>();

            planlist.Add(plan);
            model.Plan = planlist;
            string msg    = string.Empty;
            int    result = bll.Add(model);

            if (result > 0)
            {
                Dictionary <string, object> dic = new Dictionary <string, object>();
                dic.Add("id", result);
                dic.Add("type", model.Type);
                dic.Add("name", model.AreaName);
                msg = UtilsCommons.AjaxReturnJson("1", "新增成功", dic);
            }
            else
            {
                msg = UtilsCommons.AjaxReturnJson("0", "新增失败");
            }
            return(msg);
        }
示例#7
0
        /// <summary>
        /// 获取线路区域
        /// </summary>
        /// <returns></returns>
        public string GetArea()
        {
            string area = string.Empty;

            EyouSoft.BLL.ComStructure.BComArea           bArea = new EyouSoft.BLL.ComStructure.BComArea();
            IList <EyouSoft.Model.ComStructure.MComArea> list  = bArea.GetAreaByCID(SiteUserInfo.CompanyId);

            if (list != null)
            {
                if (list.Count != 0)
                {
                    area = Newtonsoft.Json.JsonConvert.SerializeObject(list);
                }
            }
            return(area);
        }
示例#8
0
        protected void PageInit()
        {
            pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1);
            IList <EyouSoft.Model.ComStructure.MComArea> list = new EyouSoft.BLL.ComStructure.BComArea().GetList(pageIndex, pageSize, ref recordCount, SiteUserInfo.CompanyId);

            if (list != null && list.Count > 0)
            {
                this.repList.DataSource = list;
                this.repList.DataBind();
                BindPage();
            }
            else
            {
                this.repList.EmptyText            = "<tr><td colspan=\"5\">暂无线路区域!</td></tr>";
                this.ExporPageInfoSelect1.Visible = false;
                this.ExporPageInfoSelect2.Visible = false;
            }
        }
示例#9
0
        /// <summary>
        /// 绑定线路区域
        /// </summary>
        private void BindAreaList(int selectIndex)
        {
            StringBuilder sb = new StringBuilder();
            IList <EyouSoft.Model.ComStructure.MComArea> list = new EyouSoft.BLL.ComStructure.BComArea().GetAreaByCID(SiteUserInfo.CompanyId);

            sb.Append("<option value=\"0\">-请选择-</option>");
            if (list != null && list.Count > 0)
            {
                string type = string.Empty;
                for (int i = 0; i < list.Count; i++)
                {
                    switch (list[i].Type)
                    {
                    case EyouSoft.Model.EnumType.ComStructure.AreaType.国内线: type = "0";
                        break;

                    case EyouSoft.Model.EnumType.ComStructure.AreaType.省内线: type = "1";
                        break;

                    case EyouSoft.Model.EnumType.ComStructure.AreaType.出境线: type = "2";
                        break;
                    }
                    if (list[i].AreaId != selectIndex)
                    {
                        sb.Append("<option data-type='" + type + "' value=\"" + list[i].AreaId + "\">" + list[i].AreaName + "</option>");
                    }
                    else
                    {
                        sb.Append("<option data-type='" + type + "' value=\"" + list[i].AreaId + "\" selected=\"selected\">" + list[i].AreaName + "</option>");
                    }
                }
            }
            this.litArea.Text = sb.ToString();
            EyouSoft.Model.ComStructure.MComSetting comSettingModel = new EyouSoft.BLL.ComStructure.BComSetting().GetModel(SiteUserInfo.CompanyId);
            if (comSettingModel != null)
            {
                this.hideSysStopCount.Value = "" + comSettingModel.CountryArea.ToString() + "," + comSettingModel.ProvinceArea.ToString() + "," + comSettingModel.ExitArea.ToString() + "";
            }
        }
示例#10
0
        /// <summary>
        /// 初始化团队信息
        /// </summary>
        /// <param name="tourID">团号</param>
        protected void DataInit(string tourID)
        {
            if (!string.IsNullOrEmpty(tourID))
            {
                EyouSoft.Model.TourStructure.MTourBaseInfo tourInfo = new EyouSoft.BLL.TourStructure.BTour().GetTourInfo(tourID);
                if (tourInfo != null)
                {
                    this.litTourCode.Text = tourInfo.TourCode;
                    if (!string.IsNullOrEmpty(tourInfo.AreaId.ToString()))
                    {
                        EyouSoft.Model.ComStructure.MComArea AreaModel = new EyouSoft.BLL.ComStructure.BComArea().GetModel(tourInfo.AreaId, SiteUserInfo.CompanyId);
                        if (AreaModel != null)
                        {
                            this.litAreaName.Text = AreaModel.AreaName;
                        }
                        AreaModel = null;
                    }
                    this.litRouteName.Text = tourInfo.RouteName;
                    this.litDays.Text      = tourInfo.TourDays.ToString();
                    this.litStartDate.Text = UtilsCommons.GetDateString(tourInfo.LDate, ProviderToDate);
                    this.litPeoples.Text   = tourInfo.PlanPeopleNumber.ToString();
                    this.litEndDate.Text   = UtilsCommons.GetDateString(tourInfo.RDate, ProviderToDate);
                    //带团导游
                    if (tourInfo.GuideList != null && tourInfo.GuideList.Count > 0)
                    {
                        this.litGuidNames.Text = UtilsCommons.PingGuide(tourInfo.GuideList);
                    }

                    //销售员
                    if (tourInfo.SaleInfo != null)
                    {
                        this.litSellers.Text = tourInfo.SaleInfo.Name;
                    }
                    //计调员
                    if (tourInfo.TourPlaner != null && tourInfo.TourPlaner.Count > 0)
                    {
                        this.litOperaters.Text = UtilsCommons.PingPlaner(tourInfo.TourPlaner);
                    }
                    //计调项
                    if (tourInfo.TourPlanItem != null && tourInfo.TourPlanItem.Count > 0)
                    {
                        for (int i = 0; i < tourInfo.TourPlanItem.Count; i++)
                        {
                            if (i == tourInfo.TourPlanItem.Count - 1)
                            {
                                this.litPlanItems.Text += "" + tourInfo.TourPlanItem[i].PlanType.ToString() + "";
                            }
                            else
                            {
                                this.litPlanItems.Text += "" + tourInfo.TourPlanItem[i].PlanType.ToString() + ",";
                            }
                        }
                    }

                    //团队状态
                    if (ret)
                    {
                        this.BtnglobalAction.Visible = !EyouSoft.Common.UtilsCommons.GetTourStatusByTourID(SiteUserInfo.CompanyId, tourID);
                    }
                    else
                    {
                        this.BtnglobalAction.Visible = false;
                    }

                    if (tourInfo.TourService != null)
                    {
                        ltrNeiBuXinXi.Text = tourInfo.TourService.InsiderInfor;
                    }
                    ltrChengBenHeSuan.Text = tourInfo.CostCalculation;
                }
            }
        }
示例#11
0
        /// <summary>
        /// 初始化团队信息
        /// </summary>
        /// <param name="tourID"></param>
        protected void DataInitTourInfo(string tourID)
        {
            if (!string.IsNullOrEmpty(tourID))
            {
                EyouSoft.Model.TourStructure.MTourBaseInfo tourInfo = new EyouSoft.BLL.TourStructure.BTour().GetTourInfo(tourID);
                if (tourInfo != null)
                {
                    TourType = (int)tourInfo.TourType;
                    this.litTourCode.Text = tourInfo.TourCode;
                    EyouSoft.Model.ComStructure.MComArea AreaModel = new EyouSoft.BLL.ComStructure.BComArea().GetModel(tourInfo.AreaId, SiteUserInfo.CompanyId);
                    if (AreaModel != null)
                    {
                        this.litAreaName.Text = AreaModel.AreaName;
                    }
                    AreaModel = null;

                    this.litRouteName.Text = tourInfo.RouteName;
                    this.litDays.Text      = tourInfo.TourDays.ToString();
                    this.litStartDate.Text = EyouSoft.Common.UtilsCommons.GetDateString(tourInfo.LDate, ProviderToDate);
                    this.litEndDate.Text   = EyouSoft.Common.UtilsCommons.GetDateString(tourInfo.RDate, ProviderToDate);

                    //人数
                    this.litPeoples.Text = tourInfo.PlanPeopleNumber.ToString();
                    //导游人数
                    if (tourInfo.GuideList != null && tourInfo.GuideList.Count > 0)
                    {
                        this.litGuidNames.Text = UtilsCommons.PingGuide(tourInfo.GuideList);
                    }
                    //需安排计调项
                    if (tourInfo.TourPlanItem != null && tourInfo.TourPlanItem.Count > 0)
                    {
                        for (int i = 0; i < tourInfo.TourPlanItem.Count; i++)
                        {
                            if (i == tourInfo.TourPlanItem.Count - 1)
                            {
                                strOperaterPlanHtml += "" + tourInfo.TourPlanItem[i].PlanType.ToString();
                            }
                            else
                            {
                                strOperaterPlanHtml += "" + tourInfo.TourPlanItem[i].PlanType.ToString() + "、";
                            }
                        }
                    }
                    else
                    {
                        this.planItemView.Visible = false;
                    }

                    //销售员
                    if (tourInfo.SaleInfo != null)
                    {
                        this.litSellers.Text = tourInfo.SaleInfo.Name;
                    }
                    //计调员
                    if (tourInfo.TourPlaner != null && tourInfo.TourPlaner.Count > 0)
                    {
                        this.litOperaters.Text = UtilsCommons.PingPlaner(tourInfo.TourPlaner);
                    }

                    if (tourInfo.TourService != null)
                    {
                        //内部信息
                        this.LitInterInfo.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(tourInfo.TourService.InsiderInfor);
                        //服务标准
                        //this.litCostAccount.Text = tourInfo.TourService.ServiceStandard;
                        //不含项目
                        this.litObjectItem.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(tourInfo.TourService.NoNeedItem);
                        //购物安排
                        this.litShoppPlan.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(tourInfo.TourService.ShoppingItem);
                        //儿童安排
                        this.litChildrenPlan.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(tourInfo.TourService.ChildServiceItem);
                        //自费项目
                        this.litExpenceObj.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(tourInfo.TourService.OwnExpense);
                        //注意事项
                        this.litAttenTion.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(tourInfo.TourService.NeedAttention);
                        //温馨提醒
                        this.litWenxinTix.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(tourInfo.TourService.WarmRemind);
                    }
                    //成本核算
                    this.litCostCalculation.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(tourInfo.CostCalculation);
                    //行程安排
                    this.dt = tourInfo.LDate.HasValue ? tourInfo.LDate.Value : DateTime.Now;
                    if (tourInfo.TourPlan != null && tourInfo.TourPlan.Count > 0)
                    {
                        this.repSchedulePlan.DataSource = tourInfo.TourPlan;
                        this.repSchedulePlan.DataBind();
                    }
                    //团队类型 散拼 组团
                    if (tourInfo.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.组团散拼 || tourInfo.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.地接散拼 || tourInfo.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.出境散拼)
                    {
                        //价格组成
                        EyouSoft.Model.TourStructure.MTourSanPinInfo SanpinInfo = (EyouSoft.Model.TourStructure.MTourSanPinInfo)tourInfo;
                        if (SanpinInfo != null)
                        {
                            if (SanpinInfo.MTourPriceStandard != null && SanpinInfo.MTourPriceStandard.Count > 0)
                            {
                                //客户等级列
                                System.Text.StringBuilder priceLeaveCols = new System.Text.StringBuilder();
                                priceLeaveCols.Append("<tr>");
                                //标价标准表头
                                TourPriceStandardHtml.Append("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"jd-table01\" style=\"border-bottom: 1px solid #A9D7EC;\">");
                                TourPriceStandardHtml.Append("<tr><th width=\"100\" rowspan=\"2\" align=\"center\" class=\"border-l\">标准</th>");

                                if (SanpinInfo.MTourPriceStandard[0].PriceLevel != null && SanpinInfo.MTourPriceStandard[0].PriceLevel.Count > 0)
                                {
                                    for (int i = 0; i < SanpinInfo.MTourPriceStandard[0].PriceLevel.Count; i++)
                                    {
                                        TourPriceStandardHtml.Append("<th colspan=\"2\" align=\"center\">" + SanpinInfo.MTourPriceStandard[0].PriceLevel[i].LevelName + "</th>");

                                        priceLeaveCols.Append("<th align=\"center\">成人</th><th align=\"center\">儿童</th>");
                                    }
                                    TourPriceStandardHtml.Append("</tr>");
                                    priceLeaveCols.Append("</tr>");
                                }
                                TourPriceStandardHtml.Append("" + priceLeaveCols.ToString() + "");

                                //报价标准价格
                                for (int j = 0; j < SanpinInfo.MTourPriceStandard.Count; j++)
                                {
                                    TourPriceStandardHtml.Append("<tr><td align=\"center\" class=\"border-l\">" + SanpinInfo.MTourPriceStandard[j].StandardName + "</td>");
                                    for (int k = 0; k < SanpinInfo.MTourPriceStandard[j].PriceLevel.Count; k++)
                                    {
                                        TourPriceStandardHtml.Append("<th align=\"center\">" + Utils.FilterEndOfTheZeroDecimal(SanpinInfo.MTourPriceStandard[j].PriceLevel[k].AdultPrice) + "</th><th align=\"center\">" + Utils.FilterEndOfTheZeroDecimal(SanpinInfo.MTourPriceStandard[j].PriceLevel[k].ChildPrice) + "</th>");
                                    }
                                }
                                TourPriceStandardHtml.Append("</tr></table>");
                            }

                            if (SanpinInfo.TourService != null)
                            {
                                litCostAccount.Text = SanpinInfo.TourService.ServiceStandard;
                                phFWBZ.Visible      = true;
                            }
                        }
                        SanpinInfo = null;
                    }
                    if (tourInfo.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.出境团队 || tourInfo.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.地接团队 || tourInfo.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.组团团队)
                    {
                        //对外报价 整团 分项
                        EyouSoft.Model.TourStructure.MTourTeamInfo TeamInfo = (EyouSoft.Model.TourStructure.MTourTeamInfo)tourInfo;
                        if (TeamInfo != null)
                        {
                            if (TeamInfo.OutQuoteType == EyouSoft.Model.EnumType.TourStructure.TourQuoteType.分项)
                            {
                                //分项报价
                                if (TeamInfo.TourTeamPrice != null && TeamInfo.TourTeamPrice.Count > 0)
                                {
                                    this.repQuoteList.DataSource = TeamInfo.TourTeamPrice;
                                    this.repQuoteList.DataBind();
                                }
                            }
                            else
                            {
                                this.litServerStandard.Text = TeamInfo.TourService != null?EyouSoft.Common.Function.StringValidate.TextToHtml(TeamInfo.TourService.ServiceStandard) : "";
                            }
                            BaoJiaType = (int)TeamInfo.OutQuoteType;
                            //成人价
                            this.litAdultPrices.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(TeamInfo.AdultPrice, ProviderToMoney);
                            //儿童价
                            this.litChilrenPrices.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(TeamInfo.ChildPrice, ProviderToMoney);
                            //其它费用
                            this.litOtherPrices.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(TeamInfo.OtherCost, ProviderToMoney);
                            //合计费用
                            this.litAccountPrices.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(TeamInfo.SumPrice, ProviderToMoney);
                        }
                        TeamInfo = null;
                    }
                }
                tourInfo = null;
            }
        }