Пример #1
0
        protected string customlevtypeprice(string tourid)
        {
            if (userModel != null && userModel.ID > 0)
            {
                return(BindPricesList(tourid, userModel.TourCompany.CustomerLevel));
            }
            else
            {
                System.Text.StringBuilder stringPrice = new System.Text.StringBuilder();
                stringPrice.Append("<tr bgcolor=\"#dfedfc\">");
                stringPrice.Append("<td height=\"20\" align=\"center\" width=\"40%\" bgcolor=\"#d0eafb\">报价标准</td>");
                stringPrice.Append("<td style=\"text-align:left\" width=\"60%\" bgcolor=\"#d0eafb\">价格</td>");

                EyouSoft.BLL.TourStructure.TourEveryday       bl    = new EyouSoft.BLL.TourStructure.TourEveryday(userModel);
                EyouSoft.Model.TourStructure.TourEverydayInfo model = new EyouSoft.Model.TourStructure.TourEverydayInfo();
                //散客天天发信息业务实体
                model = bl.GetTourEverydayInfo(tourid);
                //报价等级集合
                IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> listStand = model.PriceStandards;
                IList <EyouSoft.Model.CompanyStructure.CustomStand>        list      = new List <EyouSoft.Model.CompanyStructure.CustomStand>();
                EyouSoft.BLL.CompanyStructure.CompanyCustomStand           bll       = new EyouSoft.BLL.CompanyStructure.CompanyCustomStand();
                //根据公司编号获取客户等级信息
                if (userModel != null)
                {
                    list = bll.GetCustomStandByCompanyId(userModel.CompanyID);
                }
                else
                {
                    EyouSoft.Model.SysStructure.SystemDomain domain = new EyouSoft.BLL.SysStructure.SystemDomain().GetDomain(Request.Url.Host.ToLower());
                    if (domain != null)
                    {
                        list = bll.GetCustomStandByCompanyId(domain.CompanyId);
                    }
                }

                for (int i = 0; i < listStand.Count; i++)
                {
                    for (int j = 0; j < listStand[i].CustomerLevels.Count; j++)
                    {
                        if (listStand[i].CustomerLevels[j].LevelType == EyouSoft.Model.EnumType.CompanyStructure.CustomLevType.门市)
                        {
                            stringPrice.Append("<tr>");
                            stringPrice.AppendFormat("<td height=\"20\" width=\"50px\" align=\"center\" bgcolor=\"#f6fafd\">{0}&nbsp;&nbsp;</td>", listStand[i].StandardName);
                            stringPrice.Append("<td style=\"text-align:left\" bgcolor=\"#f6fafd\">");
                            stringPrice.AppendFormat("成人价:{0}&nbsp;&nbsp;<br/>", Utils.FilterEndOfTheZeroDecimal(listStand[i].CustomerLevels[j].AdultPrice));
                            stringPrice.AppendFormat("儿童价:{0}", Utils.FilterEndOfTheZeroDecimal(listStand[i].CustomerLevels[j].ChildrenPrice));
                            stringPrice.Append("</td></tr>");
                            break;
                        }
                    }
                }
                stringPrice.Append("</tr>");
                prices = stringPrice.ToString();
                return(prices);
            }
        }
Пример #2
0
        /// <summary>
        /// 绑定客户等级
        /// </summary>
        void BindCustomers()
        {
            IList <EyouSoft.Model.CompanyStructure.CustomStand> list = new List <EyouSoft.Model.CompanyStructure.CustomStand>();

            EyouSoft.BLL.CompanyStructure.CompanyCustomStand bll = new EyouSoft.BLL.CompanyStructure.CompanyCustomStand();
            //int kkk = 0;
            list = bll.GetCustomStandByCompanyId(SiteUserInfo.CompanyID);
            rpt_Customer.DataSource = list;
            rpt_Customer.DataBind();
        }
Пример #3
0
        /// <summary>
        /// 绑定客户等级
        /// </summary>
        void BindCustomers()
        {
            //List<Customers> list = new List<Customers>();
            //list.Add(new Customers(3, "客户等级"));
            //rpt_Customer.DataSource = list;
            //rpt_Customer.DataBind();

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

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



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

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

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

            for (int i = 0; i < listStand.Count; i++)
            {
                for (int j = 0; j < list.Count; j++)
                {
                    //if(listStand[i].CustomerLevels[i].LevelId == list.sel)
                    if (listStand[i].CustomerLevels.Count > j)
                    {
                        var vn = list.Where(x => x.Id == listStand[i].CustomerLevels[j].LevelId).FirstOrDefault();
                        if (vn != null)
                        {
                            listStand[i].CustomerLevels[j].LevelName = vn.CustomStandName;
                        }
                        else
                        {
                            listStand[i].CustomerLevels.RemoveAt(j);
                        }
                    }
                    var xn = listStand[i].CustomerLevels.Where(x => x.LevelId == list[j].Id).FirstOrDefault();
                    if (xn == null)
                    {
                        listStand[i].CustomerLevels.Add(new EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo()
                        {
                            LevelId = list[j].Id, LevelType = list[j].LevType, LevelName = list[j].CustomStandName, AdultPrice = 0, ChildrenPrice = 0
                        });
                    }
                }
            }
            sinfo = plist;
        }
Пример #4
0
        /// <summary>
        /// 绑定信息
        /// </summary>
        void BindInfo()
        {
            EyouSoft.BLL.TourStructure.TourEveryday bl = new EyouSoft.BLL.TourStructure.TourEveryday(SiteUserInfo);
            string tourId  = Utils.GetQueryStringValue("tourid");
            string ApplyId = Utils.GetQueryStringValue("ApplyId");

            EyouSoft.Model.TourStructure.TourEverydayInfo model = bl.GetTourEverydayInfo(tourId);

            #region 价格绑定
            IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> listStand = model.PriceStandards;

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

            list = bll.GetCustomStandByCompanyId(CurrentUserCompanyID);
            int kkk = list.Count;

            IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> plist = model.PriceStandards;
            for (int i = 0; i < listStand.Count; i++)
            {
                for (int j = 0; j < list.Count; j++)
                {
                    //if(listStand[i].CustomerLevels[i].LevelId == list.sel)
                    if (listStand[i].CustomerLevels.Count > j)
                    {
                        var vn = list.Where(x => x.Id == listStand[i].CustomerLevels[j].LevelId).FirstOrDefault();
                        if (vn != null)
                        {
                            listStand[i].CustomerLevels[j].LevelName = vn.CustomStandName;
                        }
                        else
                        {
                            listStand[i].CustomerLevels.RemoveAt(j);
                        }
                    }
                    var xn = listStand[i].CustomerLevels.Where(x => x.LevelId == list[j].Id).FirstOrDefault();
                    if (xn == null)
                    {
                        listStand[i].CustomerLevels.Add(new EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo()
                        {
                            LevelId = list[j].Id, LevelType = list[j].LevType, LevelName = list[j].CustomStandName, AdultPrice = 0, ChildrenPrice = 0
                        });
                    }
                }
            }
            sinfo = plist;
            #endregion
            hd_area.Value = model.AreaId.ToString();//线路区域
            EyouSoft.Model.TourStructure.TourEverydayApplyInfo applyModel = new EyouSoft.Model.TourStructure.TourEverydayApplyInfo();
            applyModel     = bl.GetTourEverydayApplyInfo(ApplyId);
            hd_Ldate.Value = applyModel.LDate.ToShortDateString();
            txt_ykrs.Value = applyModel.PeopleNumber.ToString();
            hd_num.Value   = applyModel.PeopleNumber.ToString();
        }
Пример #5
0
        protected void BindPrices()
        {
            EyouSoft.BLL.TourStructure.TourEveryday       bl    = new EyouSoft.BLL.TourStructure.TourEveryday(SiteUserInfo);
            EyouSoft.Model.TourStructure.TourEverydayInfo model = new EyouSoft.Model.TourStructure.TourEverydayInfo();
            model = bl.GetTourEverydayInfo(Request.QueryString["tourid"]);
            IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> listStand = model.PriceStandards;
            IList <EyouSoft.Model.CompanyStructure.CustomStand>        list      = new List <EyouSoft.Model.CompanyStructure.CustomStand>();

            EyouSoft.BLL.CompanyStructure.CompanyCustomStand bll = new EyouSoft.BLL.CompanyStructure.CompanyCustomStand();
            list = bll.GetCustomStandByCompanyId(SiteUserInfo.CompanyID);
            int kkk = list.Count;
            IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> plist = model.PriceStandards;

            for (int i = 0; i < listStand.Count; i++)
            {
                for (int j = 0; j < list.Count; j++)
                {
                    if (listStand[i].CustomerLevels.Count > j)
                    {
                        var vn = list.Where(x => x.Id == listStand[i].CustomerLevels[j].LevelId).FirstOrDefault();
                        if (vn != null)
                        {
                            listStand[i].CustomerLevels[j].LevelName = vn.CustomStandName;
                        }
                        else
                        {
                            listStand[i].CustomerLevels.RemoveAt(j);
                        }
                    }
                    var xn = listStand[i].CustomerLevels.Where(x => x.LevelId == list[j].Id).FirstOrDefault();
                    if (xn == null)
                    {
                        listStand[i].CustomerLevels.Add(new EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo()
                        {
                            LevelId = list[j].Id, LevelType = list[j].LevType, LevelName = list[j].CustomStandName, AdultPrice = 0, ChildrenPrice = 0
                        });
                    }
                }
            }
            sinfo = plist;
        }
Пример #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!CheckGrant(global::Common.Enum.TravelPermission.系统设置_基础设置_客户等级栏目))
            {
                Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.系统设置_基础设置_客户等级栏目, true);
                return;
            }
            int custId = Utils.GetInt(Utils.GetQueryStringValue("custId"));//客户等级Id

            pageIndex  = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1);
            itemIndex2 = (pageIndex - 1) * pageSize + 1;
            EyouSoft.BLL.CompanyStructure.CompanyCustomStand customStandBll = new EyouSoft.BLL.CompanyStructure.CompanyCustomStand();//初始化custbll
            //报价Id不为空执行删除操作
            if (custId != 0)
            {
                if (Utils.GetQueryStringValue("method") == "ispublish")                                                                    //验证该区域是否有线路存在
                {
                    EyouSoft.BLL.CompanyStructure.CompanyPriceStand priceStandBll = new EyouSoft.BLL.CompanyStructure.CompanyPriceStand(); //初始化报价bll
                    Utils.ResponseMeg(priceStandBll.IsUsed(custId, CurrentUserCompanyID, 0), "");
                    return;
                }
                bool result = customStandBll.Delete(custId);
                MessageBox.ShowAndRedirect(this, result ? "删除成功" : "删除失败", "/systemset/basicinfo/CustomerLevel.aspx");
                return;
            }
            //绑定客户等级列表
            IList <EyouSoft.Model.CompanyStructure.CustomStand> list = customStandBll.GetList(pageSize, pageIndex, ref recordCount, CurrentUserCompanyID);

            if (list != null && list.Count > 0)
            {
                rptCustLevel.DataSource = list;
                rptCustLevel.DataBind();
                BindExportPage();
            }
            else
            {
                rptCustLevel.EmptyText       = "<tr><td colspan='6' align='center'>对不起,暂无客户等级信息!</td></tr>";
                this.ExportPageInfo1.Visible = false;
            }
        }
Пример #7
0
        protected string BindPricesList(string Tourid, int CustomerLevel)
        {
            System.Text.StringBuilder stringPrice               = new System.Text.StringBuilder();
            EyouSoft.BLL.TourStructure.TourEveryday       bl    = new EyouSoft.BLL.TourStructure.TourEveryday(userModel);
            EyouSoft.Model.TourStructure.TourEverydayInfo model = new EyouSoft.Model.TourStructure.TourEverydayInfo();
            //散客天天发信息业务实体
            model = bl.GetTourEverydayInfo(Tourid);
            //报价等级集合
            IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> listStand = model.PriceStandards;
            IList <EyouSoft.Model.CompanyStructure.CustomStand>        list      = new List <EyouSoft.Model.CompanyStructure.CustomStand>();

            EyouSoft.BLL.CompanyStructure.CompanyCustomStand bll = new EyouSoft.BLL.CompanyStructure.CompanyCustomStand();
            //根据公司编号获取客户等级信息
            list = bll.GetCustomStandByCompanyId(userModel.CompanyID);
            stringPrice.Append("<tr bgcolor=\"#dfedfc\">");
            stringPrice.Append("<td height=\"20\" align=\"center\" width=\"40%\" bgcolor=\"#d0eafb\">报价标准</td>");
            stringPrice.Append("<td style=\"text-align:left\" width=\"60%\" bgcolor=\"#d0eafb\">价格</td>");
            for (int i = 0; i < listStand.Count; i++)
            {
                for (int j = 0; j < listStand[i].CustomerLevels.Count; j++)
                {
                    if (listStand[i].CustomerLevels[j].LevelId == CustomerLevel)
                    {
                        stringPrice.Append("<tr>");
                        stringPrice.AppendFormat("<td height=\"20\" width=\"50px\" align=\"center\" bgcolor=\"#f6fafd\">{0}&nbsp;&nbsp;</td>", listStand[i].StandardName);
                        stringPrice.Append("<td style=\"text-align:left\" bgcolor=\"#f6fafd\">");
                        stringPrice.AppendFormat("成人价:{0}&nbsp;&nbsp;<br/>", Utils.FilterEndOfTheZeroDecimal(listStand[i].CustomerLevels[j].AdultPrice));
                        stringPrice.AppendFormat("儿童价:{0}", Utils.FilterEndOfTheZeroDecimal(listStand[i].CustomerLevels[j].ChildrenPrice));
                        stringPrice.Append("</td></tr>");
                        break;
                    }
                }
            }
            stringPrice.Append("</tr>");
            prices = stringPrice.ToString();
            return(prices);
        }
Пример #8
0
        protected bool IsSystem;    //是否系统默认
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!CheckGrant(global::Common.Enum.TravelPermission.系统设置_基础设置_客户等级栏目))
            {
                Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.系统设置_基础设置_客户等级栏目, false);
                return;
            }
            custLevel = Utils.GetFormValue("txtCustLevel");                                                                             //获取客户等级
            int    custId   = Utils.GetInt(Utils.GetQueryStringValue("custId"));                                                        //客户等级Id
            string method   = Utils.GetFormValue("hidMethod");                                                                          //获取当前操作(保存/继续)
            string showMess = "数据保存完成";                                                                                                 //提示消息

            EyouSoft.BLL.CompanyStructure.CompanyCustomStand customStandBll   = new EyouSoft.BLL.CompanyStructure.CompanyCustomStand(); //初始化custbll
            EyouSoft.Model.CompanyStructure.CustomStand      customStandModel = null;
            //无操作方式则为获取数据
            if (method == "")
            {
                #region 初次加载数据
                if (custId != 0)
                {
                    customStandModel = customStandBll.GetModel(custId);
                    if (customStandModel != null)
                    {
                        custLevel = customStandModel.CustomStandName;
                        IsSystem  = customStandModel.IsSystem;
                    }
                    return;
                }
                #endregion
            }
            else
            {
                #region 保存
                if (custLevel == "")
                {
                    MessageBox.Show(this, "客户等级不为空!");
                }
                bool result = false;
                customStandModel = new EyouSoft.Model.CompanyStructure.CustomStand();
                customStandModel.CustomStandName = custLevel;
                customStandModel.CompanyId       = CurrentUserCompanyID;
                customStandModel.IssueTime       = DateTime.Now;
                customStandModel.IsSystem        = false;
                customStandModel.OperatorId      = 0;
                customStandModel.LevType         = EyouSoft.Model.EnumType.CompanyStructure.CustomLevType.其他;
                if (custId != 0)
                {
                    customStandModel.Id = custId;
                    result = customStandBll.Update(customStandModel);
                }
                else
                {
                    result = customStandBll.Add(customStandModel);
                }
                if (!result)
                {
                    showMess = "数据保存失败";
                }
                //继续添加则刷新页面,否则关闭当前窗口
                if (method == "continue")
                {
                    MessageBox.ShowAndRedirect(this, showMess, "CustomerLevelEdit.aspx");
                }
                else
                {
                    MessageBox.ResponseScript(this, string.Format(";alert('{0}');window.parent.location='/systemset/basicinfo/CustomerLevel.aspx';window.parent.Boxy.getIframeDialog('{1}').hide();", showMess, Utils.GetQueryStringValue("iframeId")));
                }
                #endregion
            }
        }
Пример #9
0
        protected void rpt_price_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (list == null)
            {
                list = new List <EyouSoft.Model.CompanyStructure.CustomStand>();
                EyouSoft.BLL.CompanyStructure.CompanyCustomStand bll = new EyouSoft.BLL.CompanyStructure.CompanyCustomStand();
                int kkk = 0;
                list = bll.GetList(100, 1, ref kkk, CurrentUserCompanyID);
            }
            EyouSoft.Model.TourStructure.TourPriceStandardInfo mm = e.Item.DataItem as EyouSoft.Model.TourStructure.TourPriceStandardInfo;
            Repeater rpt = e.Item.FindControl("rpt_list") as Repeater;

            if (model != null)
            {
                //IList<EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo> plist = model.PriceStandards[e.Item.ItemIndex].CustomerLevels;


                EyouSoft.BLL.TourStructure.Tour tour = new EyouSoft.BLL.TourStructure.Tour();
                IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo>      listStand = ((EyouSoft.Model.TourStructure.TourInfo)tour.GetTourInfo(Request.QueryString["tourId"])).PriceStandards;
                IList <EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo> plist     = listStand[e.Item.ItemIndex].CustomerLevels;
                //for (int j = 0; j < ilist.Count; j++)
                //{
                //    //if(listStand[i].CustomerLevels[i].LevelId == list.sel)
                //    if (list != null)
                //    {
                //        var vn = list.Where(x => x.Id == ilist[j].LevelId).FirstOrDefault();
                //        if (vn != null)
                //            ilist[j].LevelName = vn.CustomStandName;
                //    }
                //}
                for (int i = 0; i < listStand.Count; i++)
                {
                    for (int j = 0; j < list.Count; j++)
                    {
                        //if(listStand[i].CustomerLevels[i].LevelId == list.sel)
                        if (listStand[i].CustomerLevels.Count > j)
                        {
                            var vn = list.Where(x => x.Id == listStand[i].CustomerLevels[j].LevelId).FirstOrDefault();
                            if (vn != null)
                            {
                                listStand[i].CustomerLevels[j].LevelName = vn.CustomStandName;
                            }
                            else
                            {
                                listStand[i].CustomerLevels.RemoveAt(j);
                            }
                        }
                        var xn = listStand[i].CustomerLevels.Where(x => x.LevelId == list[j].Id).FirstOrDefault();
                        if (xn == null)
                        {
                            listStand[i].CustomerLevels.Add(new EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo()
                            {
                                LevelId = list[j].Id, LevelType = list[j].LevType, LevelName = list[j].CustomStandName, AdultPrice = 0, ChildrenPrice = 0
                            });
                        }
                    }
                }
                rpt.DataSource = plist;
                rpt.DataBind();
            }
        }
Пример #10
0
        void SaveInfo()
        {
            xlId = EyouSoft.Common.Utils.GetInt(Request.QueryString["id"]);
            EyouSoft.BLL.RouteStructure.Route       rout  = new EyouSoft.BLL.RouteStructure.Route();
            EyouSoft.Model.RouteStructure.RouteInfo model = rout.GetRouteInfo(xlId);
            EyouSoft.BLL.TourStructure.Tour         tour  = new EyouSoft.BLL.TourStructure.Tour();
            EyouSoft.Model.TourStructure.TourInfo   info  = new EyouSoft.Model.TourStructure.TourInfo();

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

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

            int kkk = 0;

            listcus        = bllCom.GetList(100, 1, ref kkk, CurrentUserCompanyID);
            info.AreaId    = model.AreaId;
            info.Attachs   = null;
            info.CompanyId = CurrentUserCompanyID;

            EyouSoft.Model.TourStructure.TourCreateRuleInfo rule = new EyouSoft.Model.TourStructure.TourCreateRuleInfo();
            rule.Cycle = null;
            rule.SDate = null;
            rule.Rule  = EyouSoft.Model.EnumType.TourStructure.CreateTourRule.日期;
            IList <EyouSoft.Model.TourStructure.TourChildrenInfo> childlist = new List <EyouSoft.Model.TourStructure.TourChildrenInfo>();

            string[] childteamnumber = EyouSoft.Common.Utils.GetFormValue("hidToursNumbers").Split(',');
            for (int i = 0; i < childteamnumber.Length; i++)
            {
                EyouSoft.Model.TourStructure.TourChildrenInfo cinfo = new EyouSoft.Model.TourStructure.TourChildrenInfo();
                cinfo.LDate    = EyouSoft.Common.Utils.GetDateTime(childteamnumber[i].Split('{')[0]);
                cinfo.TourCode = childteamnumber[i].Split('}')[1];
                childlist.Add(cinfo);
            }

            info.Childrens = childlist;

            info.LTraffic   = Txt_StartTraffic.Value;
            info.OperatorId = SiteUserInfo.ID;   //用户ID

            info.PlanPeopleNumber = EyouSoft.Common.Utils.GetInt(Txt_PreControlNumber.Value);

            info.Coordinator = new EyouSoft.Model.TourStructure.TourCoordinatorInfo();
            info.Coordinator.CoordinatorId = Utils.GetInt(Utils.GetFormValue("sel_oprator"));

            IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> pricelist = new List <EyouSoft.Model.TourStructure.TourPriceStandardInfo>();

            for (int k = 0; k < Utils.GetFormValues("ddl_price").Length; k++)
            {
                EyouSoft.Model.TourStructure.TourPriceStandardInfo price = new EyouSoft.Model.TourStructure.TourPriceStandardInfo();
                price.StandardId   = Utils.GetInt(Utils.GetFormValues("ddl_price")[k].Split('|')[0]);
                price.StandardName = Utils.GetFormValues("ddl_price")[k].Split('|')[1];
                IList <EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo> listLevels = new List <EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo>();


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

                for (int i = 0; i < kkk; i++)
                {
                    EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo level = new EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo();
                    level.AdultPrice    = Utils.GetDecimal(Utils.GetFormValues("txt_cr_price")[i + kkk * k]);
                    level.ChildrenPrice = Utils.GetDecimal(Utils.GetFormValues("txt_rt_price")[i + kkk * k]);
                    level.LevelType     = EyouSoft.Model.EnumType.CompanyStructure.CustomLevType.其他;
                    level.LevelName     = Utils.GetFormValues("hd_cusStandName")[i];
                    level.LevelId       = Utils.GetInt(Utils.GetFormValues("hd_cusStandId")[i]);
                    listLevels.Add(level);
                }
                price.CustomerLevels = listLevels;
                pricelist.Add(price);
            }
            info.PriceStandards = pricelist;
            info.RouteId        = Utils.GetInt(EyouSoft.Common.Utils.GetQueryStringValue("ID"));
            info.RouteName      = model.RouteName;
            info.RTraffic       = Txt_EndTraffic.Value;
            info.Status         = EyouSoft.Model.EnumType.TourStructure.TourStatus.正在收客;

            info.TicketStatus = EyouSoft.Model.EnumType.PlanStructure.TicketState.None;

            model         = rout.GetRouteInfo(info.RouteId);
            info.TourDays = model.RouteDays;

            info.TourType = EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划;
            if (model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal)
            {
                info.ReleaseType    = model.ReleaseType;
                info.TourNormalInfo = model.RouteNormalInfo;
            }
            else
            {
                info.ReleaseType   = model.ReleaseType;
                info.TourQuickInfo = model.RouteQuickInfo;
            }

            if (tour.InsertTourInfo(info) > 0)
            {
                Response.Write("<script>alert('添加成功!');window.parent.location.href=window.parent.location.href;</script>");
            }
            else
            {
                Response.Write("<script>alert('添加失败!');window.parent.location.href=window.parent.location.href;</script>");
            }
        }
Пример #11
0
        protected bool IsStartState = true; //当前账户是否是停用状态
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                this.AccountDaylist.Items.Clear();
                string[] intarry = new string[32];
                for (int i = 0; i < 32; i++)
                {
                    if (i == 0)
                    {
                        intarry[0] = "请选择";
                    }
                    else
                    {
                        intarry[i] = (i).ToString();
                    }
                }
                if (intarry != null && intarry.Length > 0)
                {
                    this.AccountDaylist.DataSource = intarry;
                    this.AccountDaylist.DataBind();
                }
            }
            #region 设置公司ID初始化省份城市列表
            ucProvince1.CompanyId = CurrentUserCompanyID;
            ucProvince1.IsFav     = true;
            ucCity1.CompanyId     = CurrentUserCompanyID;
            ucCity1.IsFav         = true;
            #endregion

            EyouSoft.BLL.CompanyStructure.Customer       custBll   = new EyouSoft.BLL.CompanyStructure.Customer(); //客户资料bll
            EyouSoft.Model.CompanyStructure.CustomerInfo custModel = null;                                         //客户资料实体
            string method = Utils.GetFormValue("hidMethod");                                                       //当前操作
            int    custId = Utils.GetInt(Utils.GetQueryStringValue("custId"));                                     //客户Id
            string type   = Utils.GetQueryStringValue("type");
            if (type == "show")
            {
                isshow = true;
            }
            EyouSoft.BLL.CompanyStructure.CompanyUser user = new EyouSoft.BLL.CompanyStructure.CompanyUser();
            if (method == "save")
            {
                #region 保存客户资料
                custModel                 = new EyouSoft.Model.CompanyStructure.CustomerInfo();
                custModel.Name            = Utils.InputText(txtCompany.Value);                                                                                 //单位名称
                custModel.Licence         = Utils.InputText(txtLicense.Value);                                                                                 //许可证号
                custModel.Adress          = Utils.InputText(txtAddress.Value);                                                                                 //地址
                custModel.PostalCode      = Utils.InputText(txtPostalCode.Value);                                                                              //邮编
                custModel.BankAccount     = Utils.InputText(txtBankCode.Value);                                                                                //银行账号
                custModel.PreDeposit      = Utils.GetDecimal(Utils.InputText(txtBeforeMoney.Value));                                                           //预存款
                custModel.MaxDebts        = Utils.GetDecimal(Utils.InputText(txtArrears.Value));                                                               //最高欠款
                custModel.CommissionType  = (EyouSoft.Model.EnumType.CompanyStructure.CommissionType)Utils.GetInt(Utils.InputText(rdiBackType.SelectedValue)); //反佣类型
                custModel.CommissionCount = Utils.GetDecimal(Utils.InputText(txtBackMoney.Value));                                                             //反佣金额
                custModel.CustomerLev     = Utils.GetInt(Utils.GetFormValue(selCustLevel.UniqueID));                                                           //客户等级

                custModel.JieSuanType        = (EyouSoft.Model.EnumType.CompanyStructure.KHJieSuanType)Utils.GetInt(ddl_checkType.SelectedValue);
                custModel.IsRequiredTourCode = rad_IsShowGroupNo.SelectedValue == "true" ? true : false;

                //ddl_checkType
                //结算日期
                if (Utils.GetFormValue("AccountTypeRadio") == "1")
                {
                    custModel.AccountDayType = EyouSoft.Model.EnumType.CompanyStructure.AccountDayType.Month;
                    custModel.AccountDay     = Utils.GetInt(Utils.GetFormValue(AccountDaylist.UniqueID));
                }
                else
                {
                    custModel.AccountDayType = EyouSoft.Model.EnumType.CompanyStructure.AccountDayType.Week;
                    custModel.AccountDay     = Utils.GetInt(Utils.GetFormValue("checkDay"));
                }

                custModel.AccountWay   = Utils.InputText(Utils.GetFormValue(AccountType.UniqueID)); //结算方式
                custModel.ContactName  = Utils.InputText(txtMainContact.Value);                     //主要联系人
                custModel.Phone        = Utils.InputText(txtMainTel.Value);                         //电话
                custModel.Mobile       = Utils.InputText(txtMainMobile.Value);                      //手机
                custModel.Fax          = Utils.InputText(txtMainFax.Value);                         //传真
                custModel.Remark       = Utils.InputText(txtRemark.Value);                          //备注
                custModel.ProviceId    = this.ucProvince1.ProvinceId;
                custModel.CityId       = this.ucCity1.CityId;
                custModel.ProvinceName = Utils.GetFormValue("pName");
                if (custModel.ProvinceName == "请选择")
                {
                    custModel.ProvinceName = "";
                }
                custModel.CityName = Utils.GetFormValue("cName");
                if (custModel.CityName == "请选择")
                {
                    custModel.CityName = "";
                }
                custModel.CompanyId = CurrentUserCompanyID;
                custModel.SaleId    = Utils.GetInt(Utils.GetFormValue(selDutySaler.UniqueID));
                custModel.Saler     = Utils.GetFormValue("hidSaler");
                custModel.IssueTime = DateTime.Now;
                custModel.IsEnable  = true;
                custModel.IsDelete  = false;

                custModel.BrandId = Utils.GetInt(Utils.GetFormValue(selBrand.UniqueID));
                string   showMess     = "数据保存成功!";
                string[] contactId    = Utils.GetFormValues("contactId");
                string[] custName     = Utils.GetFormValues("txtContact");                                           //姓名
                string[] custSex      = Utils.GetFormValues("selSex");                                               //性别
                string[] custDepart   = Utils.GetFormValues("txtDepart");                                            //部门
                string[] custBirth    = Utils.GetFormValues("txtBirth");                                             //生日
                string[] custDuty     = Utils.GetFormValues("txtDuty");                                              //职务
                string[] custMobile   = Utils.GetFormValues("txtMobile");                                            //手机
                string[] custTel      = Utils.GetFormValues("txtTel");                                               //电话
                string[] cusFax       = Utils.GetFormValues("txtFax");                                               //传真
                string[] custQQ       = Utils.GetFormValues("txtQQ");                                                //QQ
                string[] custEmail    = Utils.GetFormValues("txtEmail");                                             //用户邮箱
                string[] custUserName = Utils.GetFormValues("txtUserName");                                          //用户名
                string[] custUserId   = Utils.GetFormValues("userId");                                               //用户ID
                string[] custPwd      = Utils.GetFormValues("txtPwd");                                               //密码
                string[] custPwdSure  = Utils.GetFormValues("txtPwdSure");                                           //确认密码
                string[] splitStr     = new string[] { "|," };
                string[] custAreaId   = Utils.GetFormValue("custHidArea").Split(splitStr, StringSplitOptions.None);  //线路区域
                string[] custAreaName = Utils.GetFormValue("txtRouteArea").Split(splitStr, StringSplitOptions.None); //线路区域
                IList <EyouSoft.Model.CompanyStructure.CustomerContactInfo> custList = new List <EyouSoft.Model.CompanyStructure.CustomerContactInfo>();
                StringBuilder repartUserName = new StringBuilder();
                for (int i = 0, len = custName.Length; i < len; i++)
                {
                    if (i == 0 && string.IsNullOrEmpty(custName[i]) || custName[i] == "")
                    {
                        continue;
                    }
                    if (String.IsNullOrEmpty(custName[i]))
                    {
                        MessageBox.ShowAndRedirect(this, "请填写完整姓名!", this.Request.Url.ToString());
                        break;
                    }
                    if (custUserId[i] == "0")
                    {
                        if (user.IsExists(0, custUserName[i], CurrentUserCompanyID))
                        {
                            repartUserName.AppendFormat("{0},", custUserName[i]);
                            //continue;
                        }
                    }
                    EyouSoft.Model.CompanyStructure.CustomerContactInfo custInfo = new EyouSoft.Model.CompanyStructure.CustomerContactInfo();
                    custInfo.BirthDay   = Utils.GetDateTime(custBirth[i], DateTime.Now);
                    custInfo.Department = custDepart[i];
                    custInfo.IsDelete   = "0";
                    custInfo.Email      = string.Empty;
                    custInfo.Job        = custDuty[i];
                    custInfo.Mobile     = custMobile[i];
                    custInfo.Tel        = custTel[i];
                    custInfo.Fax        = cusFax[i];
                    custInfo.ID         = Utils.GetInt(contactId[i]);
                    custInfo.Name       = custName[i];
                    custInfo.qq         = custQQ[i];
                    custInfo.Sex        = custSex[i];
                    custModel.IssueTime = DateTime.Now;
                    if (!user.IsExists(Utils.GetInt(custUserId[i]), custUserName[i], CurrentUserCompanyID) || Utils.GetInt(custUserId[i]) != 0)
                    {
                        custInfo.UserAccount              = new EyouSoft.Model.CompanyStructure.UserAccount();
                        custInfo.UserAccount.CompanyId    = CurrentUserCompanyID;
                        custInfo.UserAccount.UserName     = custUserName[i];
                        custInfo.UserAccount.UserAreaList = new List <EyouSoft.Model.CompanyStructure.UserArea>();
                        string areaIds   = custAreaId[i].Trim('|');
                        string areaNames = custAreaName[i].Trim('|');
                        custInfo.AreaIds   = areaIds;
                        custInfo.AreaNames = areaNames;
                        custInfo.UserAccount.PassWordInfo = new EyouSoft.Model.CompanyStructure.PassWord {
                            NoEncryptPassword = custPwd[i]
                        };
                    }
                    custList.Add(custInfo);
                }
                custModel.CustomerContactList = custList;
                string strRepeat = repartUserName.ToString().TrimEnd(',');

                bool result    = false;
                int  resultInt = 0;
                if (custId != 0)
                {
                    //修改
                    custModel.Id = custId;
                    resultInt    = custBll.UpdateCustomer(custModel);
                    result       = resultInt == 1 || resultInt == 9;
                    var      splitStr2 = new string[] { "," };
                    string[] delIds    = Utils.GetFormValue("delIds").Split(splitStr2, StringSplitOptions.RemoveEmptyEntries);
                    if (delIds.Length > 0)
                    {
                        result = custBll.DeleteCustomerContacter(delIds);
                    }
                }
                else
                {
                    //添加
                    resultInt = custBll.AddCustomer(custModel);
                    result    = resultInt == 1 || resultInt == 9;
                }
                if (!result)
                {
                    showMess = "数据保存失败";
                }
                else
                {
                    if (strRepeat != "")
                    {
                        showMess = strRepeat + "账户已经存在将不会添加!";
                    }
                }
                Utils.ShowMsgAndCloseBoxy(showMess, Utils.GetQueryStringValue("iframeId"), true);
                //MessageBox.ResponseScript(this, string.Format(";alert('{0}');window.parent.location='/CRM/customerinfos/CustomerList.aspx';window.parent.Boxy.getIframeDialog('{1}').hide()", showMess, Utils.GetQueryStringValue("iframeId")));
                #endregion
            }
            else
            {
                #region 初始化加载客户资料
                EyouSoft.BLL.CompanyStructure.CompanyBrand brandBll = new EyouSoft.BLL.CompanyStructure.CompanyBrand();
                int recordCount = 0;
                //初始化绑定品牌列表
                IList <EyouSoft.Model.CompanyStructure.CompanyBrand> listB = brandBll.GetList(100000, 1, ref recordCount, CurrentUserCompanyID);
                selBrand.DataTextField  = "BrandName";
                selBrand.DataValueField = "Id";
                selBrand.DataSource     = listB;
                selBrand.DataBind();
                selBrand.Items.Insert(0, new ListItem("请选择", ""));
                //初始化绑定客户等级列表
                EyouSoft.BLL.CompanyStructure.CompanyCustomStand    customStandBll = new EyouSoft.BLL.CompanyStructure.CompanyCustomStand();//初始化custbll
                IList <EyouSoft.Model.CompanyStructure.CustomStand> list           = customStandBll.GetList(100000, 1, ref recordCount, CurrentUserCompanyID);
                selCustLevel.DataTextField  = "CustomStandName";
                selCustLevel.DataValueField = "Id";
                selCustLevel.DataSource     = list;
                selCustLevel.DataBind();
                selCustLevel.Items.Insert(0, new ListItem("请选择", ""));
                //初始化绑定部门员工列表
                EyouSoft.BLL.CompanyStructure.CompanyUser           userBll  = new EyouSoft.BLL.CompanyStructure.CompanyUser();
                IList <EyouSoft.Model.CompanyStructure.CompanyUser> userList = userBll.GetCompanyUser(CurrentUserCompanyID);
                if (userList != null && userList.Count > 0)
                {
                    foreach (EyouSoft.Model.CompanyStructure.CompanyUser userItem in userList)
                    {
                        selDutySaler.Items.Add(new ListItem(userItem.PersonInfo.ContactName, userItem.ID.ToString()));
                    }
                }
                selDutySaler.Items.Insert(0, new ListItem("请选择", ""));
                //判断是否有分配账号权限(隐藏或显示分配账号按钮)
                if (CheckGrant(global::Common.Enum.TravelPermission.客户关系管理_客户资料_分配帐号))
                {
                    hasAccountPermit = true;
                }
                if (custId != 0)
                {
                    //初始化数据获取客户资料实体
                    custModel = custBll.GetCustomerModel(custId);
                    if (custModel != null)
                    {
                        IsStartState              = custModel.IsEnable;
                        txtCompany.Value          = custModel.Name;                             //单位名称
                        txtLicense.Value          = custModel.Licence;                          //许可证号
                        txtAddress.Value          = custModel.Adress;                           //地址
                        txtPostalCode.Value       = custModel.PostalCode;                       //邮编
                        txtBankCode.Value         = custModel.BankAccount;                      //银行账号
                        txtBeforeMoney.Value      = custModel.PreDeposit.ToString("F2");        //预存款
                        txtArrears.Value          = custModel.MaxDebts.ToString("F2");          //最高欠款
                        rdiBackType.SelectedValue = ((int)custModel.CommissionType).ToString(); //反佣类型
                        txtBackMoney.Value        = custModel.CommissionCount.ToString("F2");   //反佣金额
                        selCustLevel.Value        = custModel.CustomerLev.ToString();           //客户等级


                        ddl_checkType.SelectedValue     = ((int)custModel.JieSuanType).ToString();
                        rad_IsShowGroupNo.SelectedValue = (bool)custModel.IsRequiredTourCode ? "true" : "false";

                        //结算日期 按周
                        if (custModel.AccountDayType == EyouSoft.Model.EnumType.CompanyStructure.AccountDayType.Week)
                        {
                            this.AccountTypeRadio1.Checked = false;
                            this.AccountTypeRadio2.Checked = true;
                            this.AccountDaylist.Attributes.Add("disabled", "disabled");
                            if (custModel.AccountDay != 0)
                            {
                                switch (custModel.AccountDay)
                                {
                                case 1:
                                    this.checkDay1.Checked = true;
                                    break;

                                case 2:
                                    this.checkDay1.Checked = false;
                                    this.checkDay2.Checked = true;
                                    break;

                                case 3:
                                    this.checkDay1.Checked = false;
                                    this.checkDay3.Checked = true;
                                    break;

                                case 4:
                                    this.checkDay1.Checked = false;
                                    this.checkDay4.Checked = true;
                                    break;

                                case 5:
                                    this.checkDay1.Checked = false;
                                    this.checkDay5.Checked = true;
                                    break;

                                case 6:
                                    this.checkDay1.Checked = false;
                                    this.checkDay6.Checked = true;
                                    break;

                                case 7:
                                    this.checkDay1.Checked = false;
                                    this.checkDay7.Checked = true;
                                    break;
                                }
                            }
                        }//按每月X几
                        else
                        {
                            this.AccountTypeRadio1.Checked = true;
                            this.AccountTypeRadio2.Checked = false;
                            this.checkDay1.Attributes.Add("disabled", "disabled"); this.checkDay3.Attributes.Add("disabled", "disabled");
                            this.checkDay2.Attributes.Add("disabled", "disabled"); this.checkDay4.Attributes.Add("disabled", "disabled");
                            this.checkDay5.Attributes.Add("disabled", "disabled"); this.checkDay6.Attributes.Add("disabled", "disabled"); this.checkDay7.Attributes.Add("disabled", "disabled");
                            if (custModel.AccountDay != 0)
                            {
                                this.AccountDaylist.Items.FindByValue(custModel.AccountDay.ToString()).Selected = true;
                            }
                        }

                        //结算方式
                        this.AccountType.Value = custModel.AccountWay;
                        txtMainContact.Value   = custModel.ContactName;        //主要联系人
                        txtMainTel.Value       = custModel.Phone;              //电话
                        txtMainMobile.Value    = custModel.Mobile;             //手机
                        txtMainFax.Value       = custModel.Fax;                //传真
                        txtRemark.Value        = custModel.Remark;             //备注
                        selBrand.Value         = custModel.BrandId.ToString(); //品牌
                        selDutySaler.Value     = custModel.SaleId.ToString();  //责任销售

                        ucProvince1.ProvinceId = custModel.ProviceId;          //省份
                        ucCity1.CityId         = custModel.CityId;             //城市
                        ucCity1.ProvinceId     = custModel.ProviceId;
                        //获取联系人集合
                        IList <EyouSoft.Model.CompanyStructure.CustomerContactInfo> custList = custModel.CustomerContactList;
                        if (custList != null && custList.Count > 0)
                        {
                            GetContactHtml(custList);
                        }
                        //如果有修改权限则显示保存按钮
                        if (CheckGrant(global::Common.Enum.TravelPermission.客户关系管理_客户资料_修改客户))
                        {
                            HasPermit = true;
                        }
                    }
                }
                else
                {   //如果有新增权限则显示保存按钮
                    if (CheckGrant(global::Common.Enum.TravelPermission.客户关系管理_客户资料_新增客户))
                    {
                        HasPermit = true;
                    }
                }
                #endregion
            }
        }
Пример #12
0
        protected string getPeoPlePrice(string Tourid)
        {
            string Prices = "";

            EyouSoft.BLL.TourStructure.TourEveryday       bl    = new EyouSoft.BLL.TourStructure.TourEveryday(userModel);
            EyouSoft.Model.TourStructure.TourEverydayInfo model = new EyouSoft.Model.TourStructure.TourEverydayInfo();
            //散客天天发信息业务实体
            model = bl.GetTourEverydayInfo(Tourid);
            //报价等级集合
            IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> listStand = model.PriceStandards;
            IList <EyouSoft.Model.CompanyStructure.CustomStand>        list      = new List <EyouSoft.Model.CompanyStructure.CustomStand>();

            EyouSoft.BLL.CompanyStructure.CompanyCustomStand bll = new EyouSoft.BLL.CompanyStructure.CompanyCustomStand();
            //根据公司编号获取客户等级信息
            if (userModel != null)
            {
                list = bll.GetCustomStandByCompanyId(userModel.CompanyID);
            }
            else
            {
                EyouSoft.Model.SysStructure.SystemDomain domain = new EyouSoft.BLL.SysStructure.SystemDomain().GetDomain(Request.Url.Host.ToLower());
                if (domain != null)
                {
                    list = bll.GetCustomStandByCompanyId(domain.CompanyId);
                }
            }

            #region 登录状态
            if (userModel != null && userModel.ID > 0)
            {
                if (listStand != null && listStand.Count > 0)
                {
                    for (int i = 0; i < listStand.Count; i++)
                    {
                        if (listStand[0].CustomerLevels != null)
                        {
                            for (int j = 0; j < listStand[0].CustomerLevels.Count; j++)
                            {
                                if (listStand[0].CustomerLevels[j].LevelId == userModel.TourCompany.CustomerLevel)
                                {
                                    Prices = Utils.FilterEndOfTheZeroString(listStand[0].CustomerLevels[j].AdultPrice.ToString("0.00")) + "/" + Utils.FilterEndOfTheZeroString(listStand[0].CustomerLevels[j].ChildrenPrice.ToString("0.00"));
                                    break;
                                }
                                else
                                {
                                    Prices = "";
                                }
                            }
                        }
                    }
                }
            }
            #endregion

            #region 未登录
            if (userModel == null)
            {
                for (int i = 0; i < listStand.Count; i++)
                {
                    if (listStand[i].CustomerLevels != null)
                    {
                        for (int j = 0; j < listStand[i].CustomerLevels.Count; j++)
                        {
                            if (listStand[i].CustomerLevels[j].LevelType == EyouSoft.Model.EnumType.CompanyStructure.CustomLevType.门市)
                            {
                                Prices = Utils.FilterEndOfTheZeroString(listStand[i].CustomerLevels[j].AdultPrice.ToString("0.00")) + "/" + Utils.FilterEndOfTheZeroString(listStand[i].CustomerLevels[j].ChildrenPrice.ToString("0.00"));
                            }
                        }
                    }
                }
            }
            #endregion

            return(Prices);
        }
Пример #13
0
        //销售列表详细数据初始化
        private void onInit()
        {
            if (OrderID != "")
            {
                EyouSoft.BLL.TourStructure.TourOrder   TourOrderBll   = new EyouSoft.BLL.TourStructure.TourOrder();
                EyouSoft.Model.TourStructure.TourOrder TourOrderModel = TourOrderBll.GetOrderModel(CurrentUserCompanyID, OrderID);
                System.Text.StringBuilder stringPrice = new System.Text.StringBuilder();

                if (TourOrderModel != null)
                {
                    #region 结算价绑定
                    //只有散拼有报价标准,单项服务与团队计划都没有报价标准
                    if (TourOrderModel.TourClassId == EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划)
                    {
                        EyouSoft.BLL.CompanyStructure.CompanyPriceStand  CompanyPriceStandBll  = new EyouSoft.BLL.CompanyStructure.CompanyPriceStand();
                        EyouSoft.BLL.CompanyStructure.CompanyCustomStand CompanyCustomStandBll = new EyouSoft.BLL.CompanyStructure.CompanyCustomStand();
                        EyouSoft.BLL.TourStructure.Tour tourBLl = new EyouSoft.BLL.TourStructure.Tour();
                        PriceList             = tourBLl.GetPriceStandards(TourOrderModel.TourId);
                        CompanyPriceStandList = CompanyPriceStandBll.GetPriceStandByCompanyId(SiteUserInfo.CompanyID);
                        CustomStandList       = CompanyCustomStandBll.GetCustomStandByCompanyId(SiteUserInfo.CompanyID);
                        for (int j = 0; j < CompanyPriceStandList.Count; j++)
                        {
                            if (j == 0)
                            {
                                stringPrice.Append("<tr><td align=\"center\">报价标准</td>");
                                for (int i = 0; i < CustomStandList.Count; i++)
                                {
                                    EyouSoft.Model.CompanyStructure.CustomStand CustomStand = CustomStandList[i];
                                    stringPrice.AppendFormat("<td><div style=\"text-align: center;\">{0}</div></td>", CustomStand.CustomStandName);
                                }
                                stringPrice.Append("</tr>");
                            }
                            EyouSoft.Model.CompanyStructure.CompanyPriceStand CompanyPriceStand = CompanyPriceStandList[j];
                            stringPrice.Append("<tr>");
                            stringPrice.AppendFormat("<td><div class=\"divPrice\" val=\"{0}\">", CompanyPriceStand.Id);
                            stringPrice.AppendFormat("<div style=\"text-align: center;\">{0}</div></td>", CompanyPriceStand.PriceStandName);
                            for (int i = 0; i < CustomStandList.Count; i++)
                            {
                                EyouSoft.Model.CompanyStructure.CustomStand CustomStand = CustomStandList[i];
                                stringPrice.Append("<td>");

                                stringPrice.AppendFormat("<input type=\"radio\" name=\"radio\" id=\"radio{0}\" value=\"{0}\" />", CustomStand.Id);
                                stringPrice.AppendFormat("成人价:<span name=\"sp_cr_price\">{0}</span>", FilterEndOfTheZeroDecimal(GetPriceBy(CompanyPriceStand.Id, CustomStand.Id, true)));
                                stringPrice.AppendFormat("儿童价:<span name=\"sp_et_price\">{0}</span>", FilterEndOfTheZeroDecimal(GetPriceBy(CompanyPriceStand.Id, CustomStand.Id, false)));
                            }
                            stringPrice.Append("</td></tr>");
                        }
                        price = stringPrice.ToString();
                    }
                    //如果该订单是团队计划订单,则不显示成人数与儿童数,显示总人数
                    else if (TourOrderModel.TourClassId == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划)
                    {
                        this.SanPingPersonNum.Visible = false;
                        this.lblTeamPersonNum.Visible = true;
                        this.lblTeamPersonNum.Enabled = false;
                    }
                    PriceStandId  = TourOrderModel.PriceStandId.ToString();
                    CustomerLevId = TourOrderModel.CustomerLevId.ToString();
                    #endregion
                    #region 订单基本数据
                    //线路名称
                    this.lblLineName.Text = TourOrderModel.RouteName;
                    //出团日期
                    this.lblChuTuanDate.Text = TourOrderModel.LeaveDate.ToString("yyyy-MM-dd");
                    //当前空位
                    this.lblCurFreePosi.Text = TourOrderModel.RemainNum.ToString();
                    //出发交通
                    this.lblChuFanTra.Text = TourOrderModel.LeaveTraffic;
                    //返回交通
                    this.lblBackTra.Text = TourOrderModel.ReturnTraffic;
                    //联系人
                    this.lblContactName.Text = TourOrderModel.ContactName;
                    //电话
                    this.lblContactPhone.Text = TourOrderModel.ContactTel;
                    //手机
                    this.lblContactMobile.Text = TourOrderModel.ContactMobile;
                    //传真
                    this.lblContactFax.Text = TourOrderModel.ContactFax;
                    //特殊要求说明
                    this.txtSpecialRe.Text = TourOrderModel.SpecialContent;
                    //操作留言
                    this.txtOperMes.Text = TourOrderModel.OperatorContent;
                    //人数(成人)
                    this.txtDdultCount.Text = TourOrderModel.AdultNumber.ToString();
                    //人数(儿童)
                    this.txtChildCount.Text = TourOrderModel.ChildNumber.ToString();
                    //总金额
                    this.txtTotalMoney.Text = Utils.FilterEndOfTheZeroString(TourOrderModel.SumPrice.ToString());
                    //总人数
                    this.lblTeamPersonNum.Text = TourOrderModel.PeopleNumber.ToString();
                    if (!string.IsNullOrEmpty(TourOrderModel.CustomerFilePath))
                    {
                        this.hykCusFile.NavigateUrl = TourOrderModel.CustomerFilePath;
                        this.hykCusFile.Visible     = true;
                    }

                    ltrBuyerTourCode.Text = TourOrderModel.BuyerTourCode;
                    #endregion
                    #region 订单游客数据
                    System.Collections.Generic.IList <EyouSoft.Model.TourStructure.TourOrderCustomer> curList = TourOrderModel.CustomerList;
                    System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder();
                    if (curList != null && curList.Count > 0)
                    {
                        for (int i = 0; i < curList.Count; i++)
                        {
                            if (curList[i].VisitorType == EyouSoft.Model.EnumType.TourStructure.VisitorType.成人)
                            {
                                stringBuilder.AppendFormat("<tr itemtype=\"{0}\">", "adult");
                            }
                            else if (curList[i].VisitorType == EyouSoft.Model.EnumType.TourStructure.VisitorType.儿童)
                            {
                                stringBuilder.AppendFormat("<tr itemtype=\"{0}\">", "child");
                            }
                            else
                            {
                                stringBuilder.AppendFormat("<tr itemtype=\"{0}\">", "other");
                            }
                            stringBuilder.AppendFormat("<td style=\"width: 5%\" bgcolor=\"#e3f1fc\" index=\"{0}\" align=\"center\">{0}</td><td height=\"25\" bgcolor=\"#e3f1fc\" align=\"center\">", i + 1);
                            stringBuilder.AppendFormat("<input type=\"text\" class=\"searchinput\" id=\"cusName\" name=\"cusName\" value=\"{0}\" /></td>", curList[i].VisitorName);
                            stringBuilder.Append("<td bgcolor=\"#e3f1fc\" align=\"center\">");

                            #region 游客类型
                            if (curList[i].VisitorType == EyouSoft.Model.EnumType.TourStructure.VisitorType.成人)
                            {
                                stringBuilder.Append("<select disabled=\"disabled\" id=\"cusType\" name=\"cusType\">");
                                stringBuilder.Append("<option value=\"0\">请选择</option>");
                                stringBuilder.Append("<option value=\"1\" selected=\"selected\">成人</option>");
                                stringBuilder.Append("<option value=\"2\">儿童</option>");
                                stringBuilder.Append(" </select>");
                            }
                            //儿童
                            else if (curList[i].VisitorType == EyouSoft.Model.EnumType.TourStructure.VisitorType.儿童)
                            {
                                stringBuilder.Append("<select disabled=\"disabled\" id=\"cusType\" name=\"cusType\">");
                                stringBuilder.Append("<option value=\"0\">请选择</option>");
                                stringBuilder.Append("<option value=\"1\" >成人</option>");
                                stringBuilder.Append("<option value=\"2\" selected=\"selected\">儿童</option>");
                                stringBuilder.Append(" </select>");
                            }
                            //其它
                            else
                            {
                                stringBuilder.Append("<select disabled=\"disabled\" id=\"cusType\" name=\"cusType\">");
                                stringBuilder.Append("<option value=\"0\"  selected=\"selected\">请选择</option>");
                                stringBuilder.Append("<option value=\"1\" >成人</option>");
                                stringBuilder.Append("<option value=\"2\">儿童</option>");
                                stringBuilder.Append(" </select>");
                            }
                            #endregion

                            stringBuilder.Append("</td>");
                            stringBuilder.Append("<td bgcolor=\"#e3f1fc\" align=\"center\">");

                            #region 游客证件类型
                            switch (curList[i].CradType)
                            {
                            case EyouSoft.Model.EnumType.TourStructure.CradType.身份证:
                            {
                                stringBuilder.Append("<select id=\"cusCardType\" name=\"cusCardType\">");
                                stringBuilder.Append("<option value=\"0\">请选择证件</option>");
                                stringBuilder.Append("<option value=\"1\" selected=\"selected\">身份证</option>");
                                stringBuilder.Append("<option value=\"2\">护照</option>");
                                stringBuilder.Append("<option value=\"3\">军官证</option>");
                                stringBuilder.Append("<option value=\"4\">台胞证</option>");
                                stringBuilder.Append("<option value=\"5\">港澳通行证</option>");
                                stringBuilder.Append("</select>");
                                break;
                            }

                            case EyouSoft.Model.EnumType.TourStructure.CradType.护照:
                            {
                                stringBuilder.Append("<select id=\"cusCardType\" name=\"cusCardType\">");
                                stringBuilder.Append("<option value=\"0\">请选择证件</option>");
                                stringBuilder.Append("<option value=\"1\">身份证</option>");
                                stringBuilder.Append("<option value=\"2\" selected=\"selected\">护照</option>");
                                stringBuilder.Append("<option value=\"3\">军官证</option>");
                                stringBuilder.Append("<option value=\"4\">台胞证</option>");
                                stringBuilder.Append("<option value=\"5\">港澳通行证</option>");
                                stringBuilder.Append("</select>");
                                break;
                            }

                            case EyouSoft.Model.EnumType.TourStructure.CradType.军官证:
                            {
                                stringBuilder.Append("<select id=\"cusCardType\" name=\"cusCardType\">");
                                stringBuilder.Append("<option value=\"0\">请选择证件</option>");
                                stringBuilder.Append("<option value=\"1\">身份证</option>");
                                stringBuilder.Append("<option value=\"2\">护照</option>");
                                stringBuilder.Append("<option value=\"3\" selected=\"selected\">军官证</option>");
                                stringBuilder.Append("<option value=\"4\">台胞证</option>");
                                stringBuilder.Append("<option value=\"5\">港澳通行证</option>");
                                stringBuilder.Append("</select>");
                                break;
                            }

                            case EyouSoft.Model.EnumType.TourStructure.CradType.台胞证:
                            {
                                stringBuilder.Append("<select id=\"cusCardType\" name=\"cusCardType\">");
                                stringBuilder.Append("<option value=\"0\">请选择证件</option>");
                                stringBuilder.Append("<option value=\"1\">身份证</option>");
                                stringBuilder.Append("<option value=\"2\">护照</option>");
                                stringBuilder.Append("<option value=\"3\">军官证</option>");
                                stringBuilder.Append("<option value=\"4\" selected=\"selected\">台胞证</option>");
                                stringBuilder.Append("<option value=\"5\">港澳通行证</option>");
                                stringBuilder.Append("</select>");
                                break;
                            }

                            case EyouSoft.Model.EnumType.TourStructure.CradType.港澳通行证:
                            {
                                stringBuilder.Append("<select id=\"cusCardType\" name=\"cusCardType\">");
                                stringBuilder.Append("<option value=\"0\">请选择证件</option>");
                                stringBuilder.Append("<option value=\"1\">身份证</option>");
                                stringBuilder.Append("<option value=\"2\">护照</option>");
                                stringBuilder.Append("<option value=\"3\">军官证</option>");
                                stringBuilder.Append("<option value=\"4\">台胞证</option>");
                                stringBuilder.Append("<option value=\"5\" selected=\"selected\">港澳通行证</option>");
                                stringBuilder.Append("</select>");
                                break;
                            }

                            default:
                            {
                                stringBuilder.Append("<select id=\"cusCardType\" name=\"cusCardType\">");
                                stringBuilder.Append("<option value=\"0\" selected=\"selected\">请选择证件</option>");
                                stringBuilder.Append("<option value=\"1\" >身份证</option>");
                                stringBuilder.Append("<option value=\"2\">护照</option>");
                                stringBuilder.Append("<option value=\"3\">军官证</option>");
                                stringBuilder.Append("<option value=\"4\">台胞证</option>");
                                stringBuilder.Append("<option value=\"5\">港澳通行证</option>");
                                stringBuilder.Append("</select>");
                                break;
                            }
                            }
                            #endregion

                            stringBuilder.Append("</td>");
                            stringBuilder.Append("<td bgcolor=\"#e3f1fc\" align=\"center\">");
                            stringBuilder.AppendFormat("<input type=\"text\" class=\"searchinput searchinput02\" id=\"cusCardNo\" onblur='getSex(this)' name=\"cusCardNo\" value=\"{0}\">", curList[i].CradNumber);
                            stringBuilder.Append("</td>");
                            stringBuilder.Append("<td bgcolor=\"#e3f1fc\" align=\"center\">");

                            #region 游客性别
                            switch (curList[i].Sex)
                            {
                            case EyouSoft.Model.EnumType.CompanyStructure.Sex.男:
                            {
                                stringBuilder.Append("<select id=\"cusSex\" class='ddlSex' name=\"cusSex\">");
                                stringBuilder.Append("<option value=\"0\">请选择</option>");
                                stringBuilder.Append("<option value=\"1\" selected=\"selected\">男</option>");
                                stringBuilder.Append("<option value=\"2\">女</option>");
                                stringBuilder.Append("</select>");
                                break;
                            }

                            case EyouSoft.Model.EnumType.CompanyStructure.Sex.女:
                            {
                                stringBuilder.Append("<select id=\"cusSex\" class='ddlSex' name=\"cusSex\">");
                                stringBuilder.Append("<option value=\"0\">请选择</option>");
                                stringBuilder.Append("<option value=\"1\">男</option>");
                                stringBuilder.Append("<option value=\"2\" selected=\"selected\">女</option>");
                                stringBuilder.Append("</select>");
                                break;
                            }

                            default:
                            {
                                stringBuilder.Append("<select id=\"cusSex\" class='ddlSex' name=\"cusSex\">");
                                stringBuilder.Append("<option value=\"0\" selected=\"selected\">请选择</option>");
                                stringBuilder.Append("<option value=\"1\">男</option>");
                                stringBuilder.Append("<option value=\"2\">女</option>");
                                break;
                            }
                            }

                            #endregion

                            stringBuilder.Append("</td>");
                            stringBuilder.Append("<td bgcolor=\"#e3f1fc\" align=\"center\">");
                            stringBuilder.AppendFormat("<input type=\"text\" class=\"searchinput\" id=\"cusPhone\" name=\"cusPhone\" value=\"{0}\">", curList[i].ContactTel);
                            stringBuilder.Append("</td>");
                            stringBuilder.Append("<td bgcolor=\"#e3f1fc\" align=\"center\"  width=\"6%\">");
                            if (curList[i].SpecialServiceInfo != null)
                            {
                                string str = string.Format("txtItem={0}&txtServiceContent={1}&txtCost={2}&ddlOperate={3}", curList[i].SpecialServiceInfo.ProjectName, curList[i].SpecialServiceInfo.ServiceDetail, curList[i].SpecialServiceInfo.Fee, (curList[i].SpecialServiceInfo.IsAdd.ToString() == "true" ? "1" : "0"));
                                stringBuilder.AppendFormat("<input id=\"spe{0}\" type=\"hidden\" name=\"specive\" value=\"{1}\" />", curList[i].ID, str);
                            }
                            else
                            {
                                stringBuilder.AppendFormat("<input id=\"spe{0}\" type=\"hidden\" name=\"specive\" value=\"\" />", curList[i].ID);
                            }
                            stringBuilder.AppendFormat("<a sign=\"speService\" href=\"javascript:void(0)\" onclick=\"OrderEdit.OpenSpecive('spe{0}',$(this))\">特服</a></td>", curList[i].ID);
                            stringBuilder.Append("</tr>");
                        }
                    }
                    cusHtml = stringBuilder.ToString();
                    #endregion

                    if (TourOrderModel.BuyerContactId > 0)
                    {
                        var buyerContactInfo = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomerContactModel(TourOrderModel.BuyerContactId);
                        if (buyerContactInfo != null)
                        {
                            this.ltrBuyerContact.Text = string.Format("姓名:{0}&nbsp;&nbsp;电话:{1}&nbsp;&nbsp;手机:{2}&nbsp;&nbsp;QQ:{3}", buyerContactInfo.Name
                                                                      , buyerContactInfo.Tel
                                                                      , buyerContactInfo.Mobile
                                                                      , buyerContactInfo.qq);
                            buyerContactInfo = null;
                        }
                    }
                }

                TourOrderBll   = null;
                TourOrderModel = null;
            }
        }