예제 #1
0
        /// <summary>
        /// 返回资讯相关链接
        /// </summary>
        /// <param name="AreaName">区域名</param>
        /// <param name="AreaId">区域ID</param>
        /// <param name="ScenicId">景区ID</param>
        /// <returns></returns>
        protected string getInfoAboutHref(object AreaName, object AreaId, object ScenicId, object CompanyId)
        {
            string str = string.Empty;

            EyouSoft.BLL.CompanyStructure.CompanyInfo companyBLL = new EyouSoft.BLL.CompanyStructure.CompanyInfo();
            CompanyDetailInfo companyModel = companyBLL.GetModel(Convert.ToString(CompanyId));

            if (null != companyModel)
            {
                if (companyModel.CompanyRole.HasRole(CompanyType.地接) || companyModel.CompanyRole.HasRole(CompanyType.专线))
                {
                    if (!string.IsNullOrEmpty(Convert.ToString(AreaName)))
                    {
                        //2012-02-10 14:10信息来源:楼 链接到组团菜单中的"旅游线路库"
                        str = string.Format(@"<a href='javascript:void(0)' onclick=""topTab.open('{0}','资讯相关',{{}})"" class='font12_grean' title='{1}'>【{1}】</a>", EyouSoft.Common.Domain.UserBackCenter + "/teamservice/linelibrarylist.aspx?lineId=" + AreaId, Utils.GetText2(Eval("AreaName").ToString(), 6, true));
                    }
                }
                else if (companyModel.CompanyRole.HasRole(CompanyType.景区))
                {
                    EyouSoft.Model.ScenicStructure.MScenicArea Area = new EyouSoft.BLL.ScenicStructure.BScenicArea().GetModel(Convert.ToString(ScenicId));
                    if (null != Area)
                    {
                        str = string.Format(@"<a href=""{0}"" target=""_blank"" class='font12_grean' title='{1}'>【{1}】</a>", EyouSoft.Common.Domain.UserPublicCenter + "/ScenicManage/NewScenicDetails.aspx?ScenicId=" + Area.ScenicId, Utils.GetText2(Area.ScenicName, 6, true));
                    }
                }
            }
            return(str);
        }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            #region 页面初始化控件赋值
            this.UCRightList1.IsSearch      = true;
            this.UCRightList1.IsToolbar     = true;
            this.UCRightList1.CityID        = CityId;
            this.UCRightList1.IsPinpai      = false;
            this.CityAndMenu1.HeadMenuIndex = 2;
            #endregion

            RouteId = Utils.GetQueryStringValue("RouteID");
            if (!IsPostBack)
            {
                if (RouteId != "")
                {
                    GetTourInfo();
                }
                else
                {
                    _intRouteId = StringValidate.IsDecimal(Utils.GetQueryStringValue("intRouteId"))
                                      ? long.Parse(Utils.GetQueryStringValue("intRouteId"))
                                      : 0;
                    if (_intRouteId > 0)
                    {
                        GetTourInfo();
                    }
                    else
                    {
                        Utils.ShowError("暂无线路信息!", "Tour");
                        return;
                    }
                }
                if (IsLogin)
                {
                    if (this.SiteUserInfo != null && !string.IsNullOrEmpty(this.SiteUserInfo.CompanyID))
                    {
                        EyouSoft.Model.CompanyStructure.CompanyDetailInfo Userinfo = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(this.SiteUserInfo.CompanyID);

                        if (Userinfo != null && Userinfo.CompanyRole != null)
                        {
                            if (Userinfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.组团))
                            {
                                this.txtContactName.Text = Userinfo.ContactInfo.ContactName;
                                this.txtContactTel.Text  = Userinfo.ContactInfo.Tel;
                                IsTour = true;
                            }
                            if (Userinfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.专线))
                            {
                                IsRoute = true;
                            }
                        }
                    }
                }
            }
        }
예제 #3
0
        /// <summary>
        /// 获取子系统信息,仅取WEBMASTER修改子系统时使用的数据
        /// </summary>
        /// <param name="sysId">系统编号</param>
        /// <returns></returns>
        public Model.SysStructure.MSysInfo GetSysInfo(int sysId)
        {
            if (sysId < 1)
            {
                return(null);
            }

            Model.SysStructure.MSysInfo sysInfo = dal.GetSysInfo(sysId);

            if (sysInfo != null)
            {
                int companyId = dal.GetCompanyIdBySysId(sysId);
                EyouSoft.BLL.CompanyStructure.CompanyInfo companybll = new EyouSoft.BLL.CompanyStructure.CompanyInfo();
                sysInfo.CompanyInfo = companybll.GetModel(companyId, sysId);
                companybll          = null;

                EyouSoft.BLL.CompanyStructure.CompanyUser userbll = new EyouSoft.BLL.CompanyStructure.CompanyUser();
                sysInfo.AdminInfo = userbll.GetAdminModel(companyId);
                userbll           = null;

                EyouSoft.BLL.CompanyStructure.Department departmentbll = new EyouSoft.BLL.CompanyStructure.Department();
                sysInfo.DepartmentInfo = departmentbll.GetModel(dal.GetHeadOfficeIdByCompanyId(companyId));
                departmentbll          = null;

                EyouSoft.BLL.CompanyStructure.CompanySetting settingbll = new EyouSoft.BLL.CompanyStructure.CompanySetting();
                sysInfo.Setting = settingbll.GetSetting(companyId);
                settingbll      = null;

                EyouSoft.BLL.SysStructure.SystemDomain domainbll = new EyouSoft.BLL.SysStructure.SystemDomain();
                sysInfo.Domains = domainbll.GetDomains(sysId);
                domainbll       = null;

                if (sysInfo.ModuleIds == null || sysInfo.ModuleIds.Length < 1)
                {
                    sysInfo.ModuleIds = new int[] { -1 };
                }

                if (sysInfo.PartIds == null || sysInfo.PartIds.Length < 1)
                {
                    sysInfo.PartIds = new int[] { -1 };
                }

                if (sysInfo.PermissionIds == null || sysInfo.PermissionIds.Length < 1)
                {
                    sysInfo.PermissionIds = new int[] { -1 };
                }
            }

            return(sysInfo);
        }
예제 #4
0
파일: Utils.cs 프로젝트: windygu/bbl
        /// <summary>
        /// 生成页面标题
        /// </summary>
        /// <param name="title">要设置的标题</param>
        /// <param name="page">当前page对象</param>
        /// <returns></returns>
        public static string GetTitleByCompany(string title, System.Web.UI.Page page)
        {
            string pageTitle = "";

            string urlHost = "";

            if (page == null)
            {
                urlHost = HttpContext.Current.Request.Url.Host.ToLower();
            }
            else
            {
                urlHost = page.Request.Url.Host.ToLower();
            }

            EyouSoft.Model.SysStructure.SystemDomain domain = new EyouSoft.BLL.SysStructure.SystemDomain().GetDomain(urlHost);
            if (domain != null)
            {
                EyouSoft.Model.CompanyStructure.CompanyInfo companyInfo = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(domain.CompanyId, domain.SysId);
                if (companyInfo != null)
                {
                    if (title == "")
                    {
                        pageTitle = companyInfo.CompanyName;
                    }
                    else
                    {
                        pageTitle = title + "_" + companyInfo.CompanyName;
                    }
                }

                //声明基础设置实体对象
                EyouSoft.Model.SiteStructure.SiteBasicConfig configModel = new EyouSoft.BLL.SiteStructure.SiteBasicConfig().GetSiteBasicConfig(domain.CompanyId);
                if (configModel != null)
                {
                    if (configModel.SiteTitle.Trim() != "")
                    {
                        if (title == "")
                        {
                            pageTitle = configModel.SiteTitle;
                        }
                        else
                        {
                            pageTitle = title + "_" + configModel.SiteTitle;
                        }
                    }
                }
            }
            return(pageTitle);
        }
예제 #5
0
파일: login.aspx.cs 프로젝트: windygu/bbl
        protected void Page_Load(object sender, EventArgs e)
        {
            //初始化BigLogo,CompanyName
            BigLogo = "";

            EyouSoft.Model.SysStructure.SystemDomain domain = GetCompanyIdByHost(Request.Url.Host.ToLower());

            if (domain != null)
            {
                EyouSoft.Model.CompanyStructure.CompanyInfo companyInfo =
                    new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(domain.CompanyId, domain.SysId);

                if (companyInfo != null)
                {
                    CompanyName = companyInfo.CompanyName;

                    BigLogo = new EyouSoft.BLL.CompanyStructure.CompanySetting().GetCompanyLogo(domain.CompanyId, EyouSoft.Model.EnumType.CompanyStructure.CompanyUserType.专线用户);
                }
            }
        }
예제 #6
0
파일: Default.aspx.cs 프로젝트: windygu/bbl
        /// <summary>
        /// 绑定欠款信息
        /// </summary>
        private void InitBindMsg()
        {
            EyouSoft.BLL.CompanyStructure.Customer custBll = new EyouSoft.BLL.CompanyStructure.Customer();//客户资料bll
            //已欠款金额
            decimal debtAmount = 0;
            //最高欠款金额
            decimal maxDebtAmount = 0;

            custBll.GetCustomerDebt(CurrentUserCompanyID, out debtAmount, out maxDebtAmount);
            if (debtAmount >= maxDebtAmount)
            {
                lblMsg.Text = "您已超过最高欠款额度,请结账后再继续预订,咨询电话:";
                EyouSoft.BLL.CompanyStructure.CompanyInfo   companyBll = new EyouSoft.BLL.CompanyStructure.CompanyInfo();
                EyouSoft.Model.CompanyStructure.CompanyInfo infoModel  = companyBll.GetModel(SiteUserInfo.CompanyID, SiteUserInfo.SysId);//公司信息实体

                if (infoModel != null)
                {
                    lblMsg.Text += infoModel.ContactTel.ToString();//电话
                }
            }
        }
예제 #7
0
        /// <summary>
        /// 散客下订单
        /// </summary>
        /// <returns></returns>
        protected string GetLoginUrl(string tourID)
        {
            string url = string.Empty;

            EyouSoft.Model.CompanyStructure.CompanyDetailInfo UserInfo = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(this.Master.CompanyId);
            if (UserInfo != null)
            {
                if (UserInfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.专线))
                {
                    url = EyouSoft.Common.Domain.UserBackCenter + "/Order/RouteAgency/AddOrderByRoute.aspx?tourID=" + tourID;
                }
                if (UserInfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.组团))
                {
                    url = EyouSoft.Common.Domain.UserBackCenter + "/Order/OrderByTour.aspx?tourID=" + tourID;
                }
                if (UserInfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.专线) && UserInfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.组团))
                {
                    url = EyouSoft.Common.Domain.UserBackCenter + "/Order/OrderByTour.aspx?tourID=" + tourID;
                }
            }
            return(EyouSoft.Security.Membership.UserProvider.GetMinLoginPageUrl(url, "_parent", ""));
        }
예제 #8
0
        /// <summary>
        /// 获取当前登录用户的身份
        /// </summary>
        protected void GetUserRole()
        {
            if (IsLogin)
            {
                if (this.SiteUserInfo != null && !string.IsNullOrEmpty(this.SiteUserInfo.CompanyID))
                {
                    EyouSoft.Model.CompanyStructure.CompanyDetailInfo Userinfo = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(this.SiteUserInfo.CompanyID);

                    if (Userinfo != null && Userinfo.CompanyRole != null)
                    {
                        if (Userinfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.组团))
                        {
                            IsTour = true;
                        }
                        if (Userinfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.专线))
                        {
                            IsRoute = true;
                        }
                    }
                }
            }
        }
예제 #9
0
        /// <summary>
        /// 获取线路所属公司信息
        /// </summary>
        /// <param name="companyid"></param>
        private void GetCompanyinfo(string companyid)
        {
            EyouSoft.Model.CompanyStructure.CompanyDetailInfo companyinfo = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(companyid);
            if (companyinfo != null)
            {
                if (companyinfo.ContactInfo != null && companyinfo.ContactInfo.MQ != null)
                {
                    CompanyMQ = companyinfo.ContactInfo.MQ;
                }
            }

            //如果品牌名称为空的话,取公司简称,如果再为空则截取公司名称前6个字
            if (companyinfo != null)
            {
                if (string.IsNullOrEmpty(companyinfo.CompanyBrand))
                {
                    if (string.IsNullOrEmpty(companyinfo.Introduction))
                    {
                        if (!string.IsNullOrEmpty(companyinfo.CompanyName))
                        {
                            lbpinpai.Text = Utils.GetCompanyLevImg(companyinfo.CompanyLev) + Utils.GetText2(companyinfo.CompanyName, 6, false);
                        }
                    }
                    else
                    {
                        lbpinpai.Text = Utils.GetCompanyLevImg(companyinfo.CompanyLev) + companyinfo.Introduction;
                    }
                }
                else
                {
                    lbpinpai.Text = Utils.GetCompanyLevImg(companyinfo.CompanyLev) + companyinfo.CompanyBrand;
                }
            }
            else
            {
                lbpinpai.Text = "无品牌名称";
            }
        }
예제 #10
0
        void Bind()
        {
            //声明bll对象
            EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo);
            string tourId = Utils.GetQueryStringValue("tourId");

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


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

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

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


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

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

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

                    txt_Money.Text = s.ToString();
                }
            }
        }
예제 #11
0
        /// <summary>
        /// 绑定数据
        /// </summary>
        void BindXC()
        {
            tabxcquick.Visible   = false;
            tabProject.Visible   = false;
            tabProject20.Visible = false;
            //声明bll对象
            EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo);
            //声明散拼计划对象
            EyouSoft.Model.TourStructure.TourTeamInfo model = (EyouSoft.Model.TourStructure.TourTeamInfo)bll.GetTourInfo(Utils.GetQueryStringValue("tourId"));
            if (model != null)
            {
                #region 标准,快速 公有数据
                xcTime             = model.LDate;
                lblGoTraffic.Text  = model.LTraffic;
                lblEndTraffic.Text = model.RTraffic;
                lblTid.Text        = model.TourCode;
                #endregion
                #region 组团社联系信息
                this.lblSetMan.Text = model.BuyerCName;
                EyouSoft.Model.CompanyStructure.CustomerInfo cusModel = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomerModel(model.BuyerCId);
                if (cusModel != null)
                {
                    //组团 联系人电话
                    this.lblSetPhone.Text  = cusModel.Phone;
                    this.lblSetPhone2.Text = cusModel.Phone;
                    //组团联系人Fax
                    this.lblSetFAX.Text  = cusModel.Fax;
                    this.lblSetMan.Text  = cusModel.Name;
                    this.lblSetMan2.Text = cusModel.Name;
                    this.lblSetName.Text = cusModel.ContactName;
                }
                #endregion

                #region 专线
                EyouSoft.Model.CompanyStructure.ContactPersonInfo userInfoModel = new EyouSoft.BLL.CompanyStructure.CompanyUser().GetUserBasicInfo(model.OperatorId);
                if (userInfoModel != null)
                {
                    ////主要联系人电话
                    //this.lblGetMan.Text = userInfoModel.ContactTel;
                    ////专线FAX
                    //this.lblGetFAX.Text = userInfoModel.ContactFax;

                    EyouSoft.Model.CompanyStructure.CompanyInfo companyModel = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(model.CompanyId, SiteUserInfo.SysId);
                    if (companyModel != null)
                    {
                        this.lblGetPhone.Text  = companyModel.ContactTel;
                        this.lblGetPhone2.Text = companyModel.ContactTel;
                        this.lblGetMan.Text    = companyModel.CompanyName;
                        this.lblGetMan2.Text   = companyModel.CompanyName;
                        this.lblGetName.Text   = companyModel.ContactName;
                        this.lblGetFAX.Text    = companyModel.ContactFax;
                    }
                }
                #endregion

                if (model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal)
                {
                    #region 标准发布
                    if (model.TourNormalInfo != null)
                    {
                        this.lblLineName.Text   = model.RouteName == "" ? "" : model.RouteName;
                        this.lblDaySum.Text     = model.TourDays.ToString() == "" ? "0" : model.TourDays.ToString();
                        this.lblGoTraffic.Text  = model.LTraffic;
                        this.lblEndTraffic.Text = model.RTraffic;
                        this.lblManSum.Text     = model.PlanPeopleNumber.ToString();

                        if (model.TourNormalInfo.Plans != null && model.TourNormalInfo.Plans.Count > 0)
                        {
                            xc_list.DataSource = model.TourNormalInfo.Plans;
                            xc_list.DataBind();
                        }

                        lblBuHanXiangMu.Text   = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.BuHanXiangMu);
                        lblZiFeiXIangMu.Text   = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZiFeiXIangMu);
                        lblErTongAnPai.Text    = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ErTongAnPai);
                        lblGouWuAnPai.Text     = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.GouWuAnPai);
                        lblZhuYiShiXiang.Text  = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZhuYiShiXiang);
                        lblTotalAmount.Text    = model.TotalAmount.ToString("#0.00") + "元";
                        lblGatheringPlace.Text = model.GatheringPlace;
                        lblGatheringTime.Text  = model.GatheringTime;

                        if (model.Services != null && model.Services.Count > 0)
                        {
                            rpt_sList.DataSource = model.Services;
                            rpt_sList.DataBind();
                            sListRowsCount = model.Services.Count;
                        }

                        tabProject.Visible   = true;
                        tabProject20.Visible = true;
                    }
                    #endregion
                }
                else
                {
                    #region 快速发布
                    tabxcquick.Visible      = true;
                    this.lblLineName.Text   = model.RouteName == "" ? "" : model.RouteName;
                    this.lblDaySum.Text     = model.TourDays.ToString() == "" ? "0" : model.TourDays.ToString();
                    this.lblGoTraffic.Text  = model.LTraffic;
                    this.lblEndTraffic.Text = model.RTraffic;
                    this.lblManSum.Text     = model.PlanPeopleNumber.ToString();
                    if (model.TourQuickInfo != null)
                    {
                        lblKs.Text        = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourQuickInfo.Remark);
                        lblQuickPlan.Text = model.TourQuickInfo.QuickPlan;
                    }
                    #endregion
                }
            }
            else
            {
                Response.Clear();
                Response.Write("未找到信息");
                Response.End();
            }
        }
예제 #12
0
        protected void initData(string id)
        {
            if (string.IsNullOrEmpty(id))
            {
                return;
            }
            IPeerNews BLL   = BPeerNews.CreateInstance();
            MPeerNews Model = BLL.GetPeerNews(id);

            if (null == Model)
            {
                return;
            }
            this.lbTitle.Text = Model.Title;//标 题
            //资讯相关
            EyouSoft.BLL.CompanyStructure.CompanyInfo companyBLL = new EyouSoft.BLL.CompanyStructure.CompanyInfo();
            CompanyDetailInfo companyModel = companyBLL.GetModel(Model.CompanyId);

            if (null != companyModel)
            {
                string strAboutInfo = string.Empty;
                if (companyModel.CompanyRole.HasRole(CompanyType.地接) || companyModel.CompanyRole.HasRole(CompanyType.专线))
                {
                    if (!string.IsNullOrEmpty(Model.AreaName))
                    {
                        //2012-02-10 14:10信息来源:楼 链接到组团菜单中的"旅游线路库"
                        strAboutInfo = string.Format(@"<a href='javascript:void(0)' onclick=""topTab.open('{0}','资讯相关',{{}})"" class='font12_grean' title='{1}'>{1}</a>", EyouSoft.Common.Domain.UserBackCenter + "/teamservice/linelibrarylist.aspx?lineId=" + Model.AreaId, Model.AreaName);
                    }
                }
                else if (companyModel.CompanyRole.HasRole(CompanyType.景区))
                {
                    EyouSoft.Model.ScenicStructure.MScenicArea Area = new EyouSoft.BLL.ScenicStructure.BScenicArea().GetModel(Model.ScenicId);
                    if (null != Area)
                    {
                        strAboutInfo = string.Format("<a href='{0}' target='_blank'>{1}</a>", EyouSoft.Common.Domain.UserPublicCenter + "/ScenicManage/NewScenicDetails.aspx?ScenicId=" + Area.ScenicId, Area.ScenicName);
                    }
                }
                this.lbRoute.Text = strAboutInfo.Length > 0 ? strAboutInfo : "暂无";
            }
            this.lbCompany.Text = Model.CompanyName;                                //发布企业
            this.lbType.Text    = Convert.ToString(Model.TypeId);                   //类别
            this.lbTime.Text    = string.Format("{0:yyyy-MM-dd}", Model.IssueTime); //发布时间
            this.lbContent.Text = Model.Content;                                    //内容
            IList <MPeerNewsAttachInfo> lst = Model.AttachInfo;
            StringBuilder strPic            = new StringBuilder();
            StringBuilder strFile           = new StringBuilder();

            if (null != lst && lst.Count > 0)
            {
                for (int i = 0; i < lst.Count; i++)
                {
                    switch (lst[i].Type)
                    {
                    case AttachInfoType.图片:
                        strPic.AppendFormat("<a href='{0}' title='{1}' target='_blank'>查看</a>", Domain.FileSystem + lst[i].Path, lst[i].FileName);
                        break;

                    case AttachInfoType.文件:
                        strFile.AppendFormat("<a href='{0}' title='{1}' target='blank'>{2}</a>", Domain.FileSystem + lst[i].Path, lst[i].FileName, lst[i].FileName);
                        break;
                    }
                }
            }
            this.lbPic.Text  = strPic.Length > 0 ? strPic.ToString() : "暂无图片";   //图片
            this.lbFile.Text = strFile.Length > 0 ? strFile.ToString() : "暂无附件"; //附件下载
            //点击次数加1
            BLL.UpdateClickNum(id);
        }
예제 #13
0
        /// <summary>
        /// 初始化方法
        /// </summary>
        void BindXC()
        {
            string tourId = Utils.GetQueryStringValue("tourId");

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

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

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

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

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


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

                    this.lblCompanyName.Text  = SiteUserInfo.CompanyName;
                    this.lblBankName.Text     = account.BankName;
                    this.lblBankNum.Text      = account.BankNo;
                    this.lblBankUserName.Text = account.AccountName;
                }
            }
        }
예제 #14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Master.CTAB = SeniorOnlineShop.master.T4TAB.散拼计划;
            string RouteID = Utils.GetQueryStringValue("routeId");

            if (!Page.IsPostBack)
            {
                EyouSoft.Model.CompanyStructure.CompanyDetailInfo Userinfo = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(this.Master.CompanyId);
                if (Userinfo != null)
                {
                    if (Userinfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.专线))
                    {
                        Role = "1";
                    }
                    if (Userinfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.组团))
                    {
                        Role = "2";
                    }
                    if (!Userinfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.专线) && !Userinfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.组团))
                    {
                        Role = "3";
                    }
                }

                if (IsLogin)
                {
                    if (Userinfo != null)
                    {
                        if (Userinfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.组团))
                        {
                            Contect    = this.Master.CompanyInfo.ContactInfo.ContactName;
                            contecttel = this.Master.CompanyInfo.ContactInfo.Tel;
                        }
                    }
                }

                //根据团号取成人市场价
                string tourid = Utils.GetQueryStringValue("tourid");
                if (tourid != null && !string.IsNullOrEmpty(tourid))
                {
                    EyouSoft.Model.NewTourStructure.MPowderList PowderList = EyouSoft.BLL.NewTourStructure.BPowderList.CreateInstance().GetModel(tourid);
                    if (PowderList != null)
                    {
                        Response.Clear();
                        Response.Write("" + Utils.FilterEndOfTheZeroDecimal(PowderList.RetailAdultPrice) + "");
                        Response.End();
                    }
                }

                if (RouteID != "")
                {
                    PrintUrl = "<a href=\"" + Domain.UserBackCenter + "/PrintPage/LineTourInfo.aspx?RouteId=" + RouteID + "\" target=\"_blank\"><img src=\"" + ImageServerPath + "/images/but03.gif\" border=\"0\" /></a>";
                    //初始化团队信息
                    this.GetTourInfo(RouteID);
                    GetPowerList(RouteID);
                }
                else
                {
                    Response.Clear();
                    Response.Redirect("" + Domain.SeniorOnlineShop + "/seniorshop/TourList.aspx");
                    Response.End();
                }
            }
        }
예제 #15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindCusList();

                string tourId = Utils.GetQueryStringValue("tourId");
                //声明bll对象
                EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo);
                //声明团队计划对象
                EyouSoft.Model.TourStructure.TourInfo model = (EyouSoft.Model.TourStructure.TourInfo)bll.GetTourInfo(tourId);
                if (model != null)
                {
                    lt_routName.Text = model.RouteName;

                    #region 专线
                    EyouSoft.Model.CompanyStructure.ContactPersonInfo userInfoModel = new EyouSoft.BLL.CompanyStructure.CompanyUser().GetUserBasicInfo(model.OperatorId);
                    if (userInfoModel != null)
                    {
                        txt_Ldate.Value = model.LDate.ToString("yyyy-MM-dd");
                        txt_lxr2.Value  = userInfoModel.ContactName;
                        //主要联系人电话
                        this.txt_tel2.Value = userInfoModel.ContactTel;
                        //专线FAX
                        this.txt_fax2.Value = userInfoModel.ContactFax;
                        EyouSoft.Model.CompanyStructure.CompanyInfo companyModel = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(model.CompanyId, SiteUserInfo.SysId);
                        if (companyModel != null)
                        {
                            txt_fax2.Value      = companyModel.ContactFax;
                            txt_tel2.Value      = companyModel.ContactTel;
                            txt_lxr2.Value      = companyModel.ContactName;
                            this.txtyfJbr.Value = companyModel.ContactName;
                        }
                    }
                    #endregion

                    txt_HCHB.Value = model.RTraffic;
                    txt_QCHB.Value = model.LTraffic;
                    if (model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal)
                    {
                        txt_jhDate.Value = model.GatheringTime;
                        //txt_str.Value = model.SentPeoples.FirstOrDefault().OperatorName;
                        EyouSoft.Model.TourStructure.TourSentPeopleInfo sentModel = model.SentPeoples.FirstOrDefault();
                        if (sentModel != null)
                        {
                            txt_str.Value = sentModel.OperatorName;
                        }
                        txt_jhdd.Value            = model.GatheringPlace;
                        txt_jhBZ.Value            = model.GatheringSign;
                        xc_Normarl.Visible        = true;
                        tb_service_normal.Visible = true;
                        //出团日期
                        LeaveDate = model.LDate;
                        this.rptTravel.DataSource = model.TourNormalInfo.Plans;
                        this.rptTravel.DataBind();  //不含项目
                        this.lblNoProject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.BuHanXiangMu);
                        //购物安排
                        this.lblBuy.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.GouWuAnPai);
                        //儿童安排
                        this.lblChildPlan.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ErTongAnPai);
                        //自费项目
                        this.lblSelfProject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZiFeiXIangMu);
                        //注意事项
                        this.lblNote.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZhuYiShiXiang);
                        //温馨提示
                        this.lblTips.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.WenXinTiXing);
                        //行程安排
                        this.rptTravel.DataSource = model.TourNormalInfo.Plans;
                        this.rptTravel.DataBind();
                        //包含项目
                        this.rptProject.DataSource = model.TourNormalInfo.Services;
                        this.rptProject.DataBind();
                    }
                    else
                    {
                        tb_service_quick.Visible = true;
                        xc_quick.Visible         = true;
                        litTravel.Text           = model.TourQuickInfo.QuickPlan;
                        litService.Text          = model.TourQuickInfo.Service;
                    }
                }
            }
        }
예제 #16
0
        protected void GetSingleServer(string Tourid, string planId)
        {
            EyouSoft.BLL.TourStructure.Tour             tourBll   = new EyouSoft.BLL.TourStructure.Tour(this.SiteUserInfo);
            EyouSoft.Model.TourStructure.TourSingleInfo EditModel = null;
            EditModel = (EyouSoft.Model.TourStructure.TourSingleInfo)tourBll.GetTourInfo(Tourid);
            if (EditModel != null)
            {
                //计划人数
                this.PelpeoNumber.Value = EditModel.PlanPeopleNumber.ToString();
                //确认时间
                this.ConfirmDate.Value = System.DateTime.Now.ToString("yyyy-MM-dd");
                //供应商信息集合
                IList <EyouSoft.Model.TourStructure.PlanSingleInfo> planlist = EditModel.Plans;

                if (planId != "")
                {
                    EyouSoft.Model.TourStructure.PlanSingleInfo singleModel = new EyouSoft.BLL.TourStructure.Tour().GetSinglePlanInfo(planId);
                    if (singleModel != null)
                    {
                        //获取供应商信息--供应商名称
                        this.txtTo.Value = singleModel.SupplierName;
                        //获取供应商信息--供应商Id
                        int supplierid = singleModel.SupplierId;
                        //实例化供应商基础信息BLL
                        EyouSoft.BLL.CompanyStructure.SupplierBaseHandle csBLL = new EyouSoft.BLL.CompanyStructure.SupplierBaseHandle();
                        //实例化供应商基础信息Model
                        EyouSoft.Model.CompanyStructure.SupplierBasic model = new EyouSoft.Model.CompanyStructure.SupplierBasic();
                        //根据供应商基础信息ID获取供应商实体
                        model = csBLL.GetSupplierBase(supplierid);
                        //供应商基础信息不为空并且联系人不为空
                        if (model != null && model.SupplierContact != null)
                        {
                            //供应商 联系人电话
                            this.txtTel.Value = model.SupplierContact[0].ContactTel;
                            //供应商联系人Fax
                            this.txtFax.Value = model.SupplierContact[0].ContactFax;
                        }


                        this.lblServiceType.Text  = "<strong>服务类别:</strong>" + singleModel.ServiceType.ToString();
                        this.lblSupplierName.Text = "<strong>供应商:</strong>" + singleModel.SupplierName;
                        this.lblArrange.Text      = "<strong>具体安排:</strong>" + singleModel.Arrange;
                    }
                    else
                    {
                        this.pnlIsShow.Visible       = false;
                        this.Repeaterlist.DataSource = planlist;
                        this.Repeaterlist.DataBind();
                    }
                }
                else
                {
                    //客户单位名称
                    this.txtTo.Value = EditModel.BuyerCName;
                    EyouSoft.Model.CompanyStructure.CustomerInfo cusModel = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomerModel(EditModel.BuyerCId);
                    if (cusModel != null)
                    {
                        //组团 联系人电话
                        this.txtTel.Value = cusModel.Phone;
                        //组团联系人Fax
                        this.txtFax.Value = cusModel.Fax;
                    }
                    this.pnlIsShow.Visible       = false;
                    this.Repeaterlist.DataSource = planlist;
                    this.Repeaterlist.DataBind();
                }



                #region 专线
                EyouSoft.Model.CompanyStructure.ContactPersonInfo userInfoModel = new EyouSoft.BLL.CompanyStructure.CompanyUser().GetUserBasicInfo(EditModel.OperatorId);
                if (userInfoModel != null)
                {
                    //主要联系人电话
                    this.txtTelS.Value = userInfoModel.ContactTel;
                    //专线FAX
                    this.txtFaxS.Value = userInfoModel.ContactFax;

                    EyouSoft.Model.CompanyStructure.CompanyInfo companyModel = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(EditModel.CompanyId, SiteUserInfo.SysId);
                    if (companyModel != null)
                    {
                        this.txtFr.Value = companyModel.CompanyName;
                    }
                }
                #endregion


                //游客信息
                IList <EyouSoft.Model.TourStructure.TourOrderCustomer> customer = EditModel.Customers.Where(x => x.CustomerStatus == EyouSoft.Model.EnumType.TourStructure.CustomerStatus.正常).ToList();
                ;
                if (customer.Count > 0 && customer != null)
                {
                    this.repCustomer.DataSource = customer;
                    this.repCustomer.DataBind();
                }
            }
        }
예제 #17
0
        /// <summary>
        /// 初始化数据
        /// </summary>
        /// <param name="tourId"></param>
        protected void DataInit(string tourId)
        {
            EyouSoft.BLL.TourStructure.Tour           bll   = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo);
            EyouSoft.Model.TourStructure.TourBaseInfo model = bll.GetTourInfo(tourId);

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

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

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

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

                    this.litbuyCompanyName.Text = teamModel.BuyerCName;

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

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

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

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


            //公司账户信息
            EyouSoft.Model.CompanyStructure.CompanyInfo info = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(CurrentUserCompanyID, CurrentUserCompanyID);
            if (info != null)
            {
                if (info.CompanyAccountList != null && info.CompanyAccountList.Count > 0)
                {
                    if (string.IsNullOrEmpty(info.CompanyAccountList[0].AccountName))
                    {
                        this.trAccountNameView.Visible = false;
                    }
                    else
                    {
                        this.lithuming.Text = info.CompanyAccountList[0].AccountName;
                    }
                    if (string.IsNullOrEmpty(info.CompanyAccountList[0].BankName) && string.IsNullOrEmpty(info.CompanyAccountList[0].BankNo))
                    {
                        this.trBankView.Visible = false;
                    }
                    else
                    {
                        this.litkaihuhang.Text = info.CompanyAccountList[0].BankName;
                        this.litzhanghao.Text  = info.CompanyAccountList[0].BankNo;
                    }
                }
                else
                {
                    this.trBankView.Visible        = false;
                    this.trAccountNameView.Visible = false;
                }
            }
        }
예제 #18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //判断权限
            if (!CheckGrant(global::Common.Enum.TravelPermission.系统设置_公司信息_公司信息栏目))
            {
                Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.系统设置_公司信息_公司信息栏目, true);
                return;
            }
            EyouSoft.BLL.CompanyStructure.CompanyInfo   companyBll = new EyouSoft.BLL.CompanyStructure.CompanyInfo();
            EyouSoft.Model.CompanyStructure.CompanyInfo infoModel  = null;//公司信息实体
            string method = Utils.GetFormValue("hidMethod");

            if (method == "save")
            {
                #region 保存公司信息
                if (Utils.InputText(txtCompanyName.Value) == "")
                {
                    MessageBox.Show(this, "公司名称不为空");
                    return;
                }
                //保存
                EyouSoft.Model.CompanyStructure.CompanyAccount account = new EyouSoft.Model.CompanyStructure.CompanyAccount(); //公司账户
                infoModel = new EyouSoft.Model.CompanyStructure.CompanyInfo();                                                 //公司信息实体
                infoModel.CompanyAddress     = Utils.InputText(txtAddress.Value);                                              //地址
                infoModel.ContactName        = Utils.InputText(txtAdmin.Value);                                                //负责人
                account.BankName             = Utils.InputText(txtBank.Value);                                                 //开户行
                account.CompanyId            = CurrentUserCompanyID;                                                           //公司编号
                infoModel.CompanyZip         = Utils.InputText(txtEmail.Value);                                                //邮箱
                account.AccountName          = Utils.InputText(txtUserName.Value);                                             //户名
                account.BankNo               = Utils.InputText(txtUserNo.Value);                                               //账号
                infoModel.CompanyEnglishName = Utils.InputText(txtEngName.Value);                                              //公司英文名
                infoModel.ContactFax         = Utils.InputText(txtFax.Value);                                                  //公司传真
                infoModel.License            = Utils.InputText(txtLicence.Value);                                              //公司许可证
                infoModel.ContactMobile      = Utils.InputText(txtMoible.Value);                                               //公司手机
                infoModel.CompanyName        = Utils.InputText(txtCompanyName.Value);                                          //公司名
                infoModel.ContactTel         = Utils.InputText(txtTel.Value);                                                  //电话
                infoModel.CompanyType        = Utils.InputText(txtType.Value);                                                 //旅行社类别
                infoModel.CompanySiteUrl     = Utils.InputText(txtWeb.Value);                                                  //网站
                infoModel.CompanyAccountList = new List <EyouSoft.Model.CompanyStructure.CompanyAccount>();
                infoModel.CompanyAccountList.Add(account);                                                                     //添加到账户集合
                infoModel.SystemId = CurrentUserCompanyID;                                                                     //系统号
                infoModel.Id       = CurrentUserCompanyID;                                                                     //公司号
                bool result = false;
                result = companyBll.Update(infoModel);
                MessageBox.ShowAndRedirect(this, result?"保存成功!":"保存失败!", "/systemset/CompanyInfo.aspx");
                #endregion
            }
            else
            {
                #region 初始化公司信息
                //初始化
                infoModel = companyBll.GetModel(CurrentUserCompanyID, CurrentUserCompanyID);
                if (infoModel != null)
                {
                    EyouSoft.Model.CompanyStructure.CompanyAccount account = null;//公司账户
                    if (infoModel.CompanyAccountList != null && infoModel.CompanyAccountList.Count > 0)
                    {
                        account = infoModel.CompanyAccountList[0];
                    }
                    txtAddress.Value     = infoModel.CompanyAddress;     //地址
                    txtAdmin.Value       = infoModel.ContactName;        //负责人
                    txtEmail.Value       = infoModel.CompanyZip;         //邮箱
                    txtEngName.Value     = infoModel.CompanyEnglishName; //公司英文名
                    txtFax.Value         = infoModel.ContactFax;         //公司传真
                    txtLicence.Value     = infoModel.License;            //公司许可证
                    txtMoible.Value      = infoModel.ContactMobile;      //公司手机
                    txtCompanyName.Value = infoModel.CompanyName;        //公司名
                    txtTel.Value         = infoModel.ContactTel;         //电话
                    txtType.Value        = infoModel.CompanyType;        //旅行社类别
                    if (account != null)
                    {
                        txtBank.Value     = account.BankName;    //开户行
                        txtUserName.Value = account.AccountName; //户名
                        txtUserNo.Value   = account.BankNo;      //账号
                    }
                    txtWeb.Value = infoModel.CompanySiteUrl;     //网站
                }
                #endregion
            }
        }