Beispiel #1
0
        /// <summary>
        /// 获取公司的详细信息
        /// </summary>
        /// <returns></returns>
        public string GetCompanyInfo(object companyinfo, string type)
        {
            EyouSoft.Model.CompanyStructure.CompanyInfo modelcompany = (EyouSoft.Model.CompanyStructure.CompanyInfo)companyinfo;
            string result = "";

            if (type == "ContactInfo")
            {
                result = "<a href=" + "javascript:void(0)" + " onmouseout=" + "wsug(event,0)" + " onmouseover=" + "wsug(event,'联系人:" + modelcompany.ContactInfo.ContactName + "&lt;br/&gt;手机:" + modelcompany.ContactInfo.Mobile + "&lt;br/&gt;电话:" + modelcompany.ContactInfo.Tel + "&lt;br/&gt;传真:" + modelcompany.ContactInfo.Fax + "&lt;br/&gt;QQ:" + modelcompany.ContactInfo.QQ + "')" + ">"
                         + "联系人:" + modelcompany.ContactInfo.ContactName + "<br />"
                         + "联系电话:" + modelcompany.ContactInfo.Tel + "</a>";
            }
            else if (type == "CompanyName")
            {
                if (modelcompany.CompanyName != "")
                {
                    result = modelcompany.CompanyName;
                }
            }
            else if (type == "CompanyId")
            {
                if (modelcompany.ID != "")
                {
                    result = modelcompany.ID;
                }
            }
            return(result);
        }
Beispiel #2
0
        protected void BindTour()
        {
            if (!CheckGrant(TravelPermission.组团_线路散客订单管理))
            {
                Utils.ResponseNoPermit();
                return;
            }
            pageIndex = Utils.GetInt(Request.QueryString["Page"], 1);  //获取当前页
            string companyId = Utils.GetQueryStringValue("companyid"); //专线商ID

            EyouSoft.Model.CompanyStructure.CompanyInfo companyModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(companyId);
            //获取公司名,许可证,负责人
            if (companyModel != null)
            {
                companyName = companyModel.CompanyName;
                cer         = companyModel.License;
                admin       = companyModel.ContactInfo.ContactName;
            }
            //获取产品列表
            EyouSoft.IBLL.TourStructure.ITour tourBll = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
            IList <EyouSoft.Model.TourStructure.TourBasicInfo> tourInfoList = tourBll.GetNotStartingTours(pageSize, pageIndex, ref recordCount, companyId, null);

            if (tourInfoList != null && tourInfoList.Count > 0)
            {
                rl_rpt_TourList.DataSource = tourInfoList;
                rl_rpt_TourList.DataBind();
                BindPage();//设置分页
            }
            else
            {
                rl_rpt_TourList.EmptyText    = "暂无团队信息";
                this.ExportPageInfo1.Visible = false;
            }
            tourInfoList = null;
        }
Beispiel #3
0
 /// <summary>
 /// 获取公司信息
 /// </summary>
 /// <returns></returns>
 private EyouSoft.Model.CompanyStructure.CompanyInfo GetCompanyInfo(string CompanyID)
 {
     EyouSoft.IBLL.CompanyStructure.ICompanyInfo ICompanyInfobll  = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance();
     EyouSoft.Model.CompanyStructure.CompanyInfo companyInfoModel = ICompanyInfobll.GetModel(CompanyID);
     ICompanyInfobll = null;
     return(companyInfoModel);
 }
Beispiel #4
0
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="model">公司信息实体</param>
        /// <returns></returns>
        public bool Update(EyouSoft.Model.CompanyStructure.CompanyInfo model)
        {
            bool      IsTrue            = false;
            string    CompanyAccountXML = CreateCompanyAccountXML(model.CompanyAccountList);
            DbCommand dc = this._db.GetStoredProcCommand("proc_CompanyInfo_Update");

            this._db.AddInParameter(dc, "Id", DbType.Int32, model.Id);
            this._db.AddInParameter(dc, "SystemId", DbType.Int32, model.SystemId);
            this._db.AddInParameter(dc, "CompanyEnglishName", DbType.String, model.CompanyEnglishName);
            this._db.AddInParameter(dc, "CompanyName", DbType.String, model.CompanyName);
            this._db.AddInParameter(dc, "CompanySiteUrl", DbType.String, model.CompanySiteUrl);
            this._db.AddInParameter(dc, "CompanyType", DbType.String, model.CompanyType);
            this._db.AddInParameter(dc, "CompanyZip", DbType.String, model.CompanyZip);
            this._db.AddInParameter(dc, "ContactFax", DbType.AnsiString, model.ContactFax);
            this._db.AddInParameter(dc, "ContactMobile", DbType.AnsiString, model.ContactMobile);
            this._db.AddInParameter(dc, "ContactName", DbType.String, model.ContactName);
            this._db.AddInParameter(dc, "ContactTel", DbType.AnsiString, model.ContactTel);
            this._db.AddInParameter(dc, "License", DbType.String, model.License);
            this._db.AddInParameter(dc, "CompanyAddress", DbType.String, model.CompanyAddress);
            this._db.AddInParameter(dc, "CompanyAccountXML", DbType.String, CompanyAccountXML);
            this._db.AddOutParameter(dc, "Result", DbType.Int32, 4);
            DbHelper.RunProcedure(dc, this._db);
            object Result = this._db.GetParameterValue(dc, "Result");

            if (!Result.Equals(null))
            {
                IsTrue = int.Parse(Result.ToString()) > 0 ? true : false;
            }
            return(IsTrue);
        }
Beispiel #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!CheckGrant(TravelPermission.系统设置_权限管理))
            {
                Utils.ResponseNoPermit();
                return;
            }
            applyBll = EyouSoft.BLL.SystemStructure.SysApplyService.CreateInstance();
            string isCustomer = Utils.GetQueryStringValue("iscustomer");

            if (isCustomer == "yes")
            {
                sznb1.Visible = false;
            }
            companyName = SiteUserInfo.CompanyName;
            string method = Utils.GetFormValue("method");

            if (method == "applyMQ")
            {
                Apply_MQ();
                return;
            }
            if (applyBll.IsApply(SiteUserInfo.CompanyID, EyouSoft.Model.CompanyStructure.SysService.MQ))
            {
                EyouSoft.Model.SystemStructure.SysApplyServiceInfo serviceInfo = EyouSoft.BLL.SystemStructure.SysApplyService.CreateInstance().GetApplyInfo(SiteUserInfo.CompanyID, EyouSoft.Model.CompanyStructure.SysService.MQ);
                if (serviceInfo != null)
                {
                    am_txtAddress.Visible = false;
                    am_txtContact.Visible = false;
                    am_txtMoible.Visible  = false;
                    am_txtTel.Visible     = false;
                    contantName           = "<span>" + serviceInfo.ContactName + "</span>";
                    moible     = "<span>" + serviceInfo.ContactMobile + "</span>";
                    tel        = "<span>" + serviceInfo.ContactTel + "</span>";
                    adress     = "<span>" + serviceInfo.ContactAddress + "</span>";
                    mq_message = "你已经申请开通MQ会员,目前处于审核当中……";
                }

                isApply = "style='display:none'";
            }
            else
            {
                am_txtContact.Value = SiteUserInfo.ContactInfo.ContactName;
                am_txtMoible.Value  = SiteUserInfo.ContactInfo.Mobile;
                am_txtTel.Value     = SiteUserInfo.ContactInfo.Tel;
                EyouSoft.Model.CompanyStructure.CompanyInfo companyModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(SiteUserInfo.CompanyID);
                if (companyModel != null)
                {
                    am_txtAddress.Value = companyModel.CompanyAddress;
                }
            }
        }
Beispiel #6
0
        /// <summary>
        /// 获取公司信息实体
        /// </summary>
        /// <param name="CompanyId">公司编号</param>
        /// <param name="SystemId">系统编号</param>
        /// <returns></returns>
        public EyouSoft.Model.CompanyStructure.CompanyInfo GetModel(int CompanyId, int SystemId)
        {
            IList <EyouSoft.Model.CompanyStructure.CompanyAccount> CompanyAccountList = null;

            EyouSoft.Model.CompanyStructure.CompanyInfo model = null;
            string    StrSql = string.Format("SELECT * FROM tbl_CompanyInfo where id={0} AND SystemId={1}  SELECT * FROM tbl_CompanyAccount WHERE CompanyId={0}", CompanyId, SystemId);
            DbCommand dc     = this._db.GetSqlStringCommand(StrSql);

            using (IDataReader dr = DbHelper.ExecuteReader(dc, this._db))
            {
                if (dr.Read())
                {
                    model = new EyouSoft.Model.CompanyStructure.CompanyInfo()
                    {
                        CompanyAddress     = dr.IsDBNull(dr.GetOrdinal("CompanyAddress")) ? "" : dr.GetString(dr.GetOrdinal("CompanyAddress")),
                        CompanyEnglishName = dr.IsDBNull(dr.GetOrdinal("CompanyEnglishName")) ? "" : dr.GetString(dr.GetOrdinal("CompanyEnglishName")),
                        CompanyName        = dr.IsDBNull(dr.GetOrdinal("CompanyName")) ? "" : dr.GetString(dr.GetOrdinal("CompanyName")),
                        CompanySiteUrl     = dr.IsDBNull(dr.GetOrdinal("CompanySiteUrl")) ? "" : dr.GetString(dr.GetOrdinal("CompanySiteUrl")),
                        CompanyType        = dr.IsDBNull(dr.GetOrdinal("CompanyType")) ? "" : dr.GetString(dr.GetOrdinal("CompanyType")),
                        CompanyZip         = dr.IsDBNull(dr.GetOrdinal("CompanyZip")) ? "" : dr.GetString(dr.GetOrdinal("CompanyZip")),
                        ContactFax         = dr.IsDBNull(dr.GetOrdinal("ContactFax")) ? "" : dr.GetString(dr.GetOrdinal("ContactFax")),
                        ContactMobile      = dr.IsDBNull(dr.GetOrdinal("ContactMobile")) ? "" : dr.GetString(dr.GetOrdinal("ContactMobile")),
                        ContactName        = dr.IsDBNull(dr.GetOrdinal("ContactName")) ? "" : dr.GetString(dr.GetOrdinal("ContactName")),
                        ContactTel         = dr.IsDBNull(dr.GetOrdinal("ContactTel")) ? "" : dr.GetString(dr.GetOrdinal("ContactTel")),
                        License            = dr.IsDBNull(dr.GetOrdinal("License")) ? "" : dr.GetString(dr.GetOrdinal("License")),
                        SystemId           = dr.GetInt32(dr.GetOrdinal("SystemId")),
                        Id        = dr.GetInt32(dr.GetOrdinal("Id")),
                        IssueTime = dr.GetDateTime(dr.GetOrdinal("IssueTime"))
                    };
                    if (dr.NextResult())
                    {
                        CompanyAccountList = new List <EyouSoft.Model.CompanyStructure.CompanyAccount>();
                        while (dr.Read())
                        {
                            EyouSoft.Model.CompanyStructure.CompanyAccount Account = new EyouSoft.Model.CompanyStructure.CompanyAccount()
                            {
                                AccountName = dr.IsDBNull(dr.GetOrdinal("AccountName")) ? "" : dr.GetString(dr.GetOrdinal("AccountName")),
                                BankName    = dr.IsDBNull(dr.GetOrdinal("BankName")) ? "" : dr.GetString(dr.GetOrdinal("BankName")),
                                BankNo      = dr.IsDBNull(dr.GetOrdinal("BankNo")) ? "" : dr.GetString(dr.GetOrdinal("BankNo")),
                                CompanyId   = dr.GetInt32(dr.GetOrdinal("CompanyId")),
                            };
                            CompanyAccountList.Add(Account);
                            Account = null;
                        }
                        model.CompanyAccountList = CompanyAccountList;
                    }
                }
            }
            return(model);
        }
Beispiel #7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         #region 获取所属公司信息
         EyouSoft.IBLL.CompanyStructure.ICompanyInfo ICompanyInfobll  = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance();
         EyouSoft.Model.CompanyStructure.CompanyInfo companyInfoModel = ICompanyInfobll.GetModel(Utils.GetQueryStringValue("CompanyID"));
         ContactName      = companyInfoModel.ContactInfo.ContactName;
         MQ               = companyInfoModel.ContactInfo.MQ;
         QQ               = companyInfoModel.ContactInfo.QQ;
         Phone            = companyInfoModel.ContactInfo.Mobile;
         Fax              = companyInfoModel.ContactInfo.Fax;
         Tel              = companyInfoModel.ContactInfo.Tel;
         ICompanyInfobll  = null;
         companyInfoModel = null;
         #endregion
     }
 }
Beispiel #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsLogin)//是否登录
            {
                EyouSoft.Security.Membership.UserProvider.RedirectLoginOpenTopPage("/Default.aspx");
                return;
            }
            //if (!CheckGrant(TravelPermission.客户管理_管理栏目))
            //{
            //    Utils.ResponseNoPermit();
            //    return;
            //}
            EyouSoft.Model.CompanyStructure.CompanyDetailInfo companyModel1 = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(SiteUserInfo.CompanyID);
            //是否开通收费MQ
            //if (!companyModel1.StateMore.CompanyService.IsServiceAvailable(EyouSoft.Model.CompanyStructure.SysService.MQ))
            //{
            //    Server.Transfer("/SystemSet/ApplyMQ.aspx?iscustomer=yes&urltype=tab", false);
            //    return;
            //}
            companyId = Utils.GetQueryStringValue("companyid");//专线商
            EyouSoft.Model.CompanyStructure.CompanyInfo companyModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(companyId);
            companyName = companyModel.CompanyName;
            cer         = companyModel.License;
            admin       = companyModel.ContactInfo.ContactName;
            //获取当前页
            pageIndex = Utils.GetInt(Request.QueryString["Page"], 1);
            EyouSoft.IBLL.TourStructure.ITour tourBll = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
            areaBll = EyouSoft.BLL.SystemStructure.SysArea.CreateInstance();
            //绑定产品列表
            IList <EyouSoft.Model.TourStructure.TourBasicInfo> tourInfoList = tourBll.GetNotStartingTours(pageSize, pageIndex, ref recordCount, companyId, null);

            if (tourInfoList != null && tourInfoList.Count > 0)
            {
                tl_rpt_TourList.DataSource = tourInfoList;
                tl_rpt_TourList.DataBind();
                BindPage();
            }
            else
            {
                tl_rpt_TourList.EmptyText    = "暂无团队信息";
                this.ExportPageInfo1.Visible = false;
            }
            tourInfoList = null;
        }
Beispiel #9
0
        /// <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();//电话
                }
            }
        }
Beispiel #10
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="model">公司信息实体</param>
        /// <returns></returns>
        public bool Add(EyouSoft.Model.CompanyStructure.CompanyInfo model)
        {
            bool IsTrue = false;

            EyouSoft.Data.CompanyInfo DataModel = new EyouSoft.Data.CompanyInfo();
            DataModel.CompanyEnglishName = model.CompanyEnglishName;
            DataModel.CompanyName        = model.CompanyName;
            DataModel.CompanySiteUrl     = model.CompanySiteUrl;
            DataModel.CompanyType        = model.CompanyType;
            DataModel.CompanyZip         = model.CompanyZip;
            DataModel.ContactFax         = model.ContactFax;
            DataModel.ContactMobile      = model.ContactMobile;
            DataModel.ContactName        = model.ContactName;
            DataModel.ContactTel         = model.ContactTel;
            DataModel.License            = model.License;
            DataModel.SystemId           = model.SystemId;
            DataModel.IssueTime          = System.DateTime.Now;
            if (model.CompanyAccountList != null && model.CompanyAccountList.Count > 0)
            {
                ((List <EyouSoft.Model.CompanyStructure.CompanyAccount>)model.CompanyAccountList).ForEach(item =>
                {
                    EyouSoft.Data.CompanyAccount DataAccountModel = new EyouSoft.Data.CompanyAccount();
                    DataAccountModel.AccountName = item.AccountName;
                    DataAccountModel.BankName    = item.BankName;
                    DataAccountModel.BankNo      = item.BankNo;
                    DataAccountModel.CompanyId   = model.Id;
                    DataModel.CompanyCompanyAccountList.Add(DataAccountModel);
                    DataAccountModel = null;
                });
            }
            dcDal.CompanyInfo.InsertOnSubmit(DataModel);
            dcDal.SubmitChanges();
            if (dcDal.ChangeConflicts.Count == 0)
            {
                IsTrue = true;
            }
            return(IsTrue);
        }
Beispiel #11
0
        protected void rptLocalAgencyList_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                EyouSoft.Model.CompanyStructure.CompanyInfo model   = (EyouSoft.Model.CompanyStructure.CompanyInfo)e.Item.DataItem;
                System.Web.UI.HtmlControls.HtmlImage        imgLogo = (System.Web.UI.HtmlControls.HtmlImage)e.Item.FindControl("imgLogo");

                if (AttachList != null && AttachList.Count > 0)
                {
                    foreach (EyouSoft.Model.CompanyStructure.CompanyAttachInfo AttachModel in AttachList)
                    {
                        if (AttachModel.CompanyId == model.ID)
                        {
                            imgLogo.Src = Utils.GetNewImgUrl(AttachModel.CompanyLogo.ImagePath, 3);
                            break;
                        }
                    }
                }
                System.Web.UI.WebControls.Label        lblCityName = (System.Web.UI.WebControls.Label)e.Item.FindControl("lblCityName");
                EyouSoft.Model.SystemStructure.SysCity cityModel   = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(model.CityId);
                if (cityModel != null)
                {
                    lblCityName.Text = cityModel.CityName;
                }
                cityModel = null;

                System.Web.UI.WebControls.Literal ltrContactInfo = (System.Web.UI.WebControls.Literal)e.Item.FindControl("ltrContactInfo");
                StringBuilder str = new StringBuilder();
                if (model.ContactInfo != null)
                {
                    str.AppendFormat("<td>联系人:<strong>{0}</strong></td>", model.ContactInfo.ContactName);
                    str.AppendFormat("<td><strong>电&nbsp;&nbsp;话:</strong><span class=\"hong\">{0}</span></td>", model.ContactInfo.Tel);
                    str.AppendFormat("<td>传&nbsp;&nbsp;真:<span class=\"hong\">{0}</span></td>", model.ContactInfo.Fax);
                }
                ltrContactInfo.Text = str.ToString();
            }
        }
Beispiel #12
0
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="model">公司信息实体</param>
        /// <returns></returns>
        public bool Update(EyouSoft.Model.CompanyStructure.CompanyInfo model)
        {
            bool IsTrue = false;

            IsTrue = idal.Update(model);
            #region LGWR
            if (IsTrue)
            {
                EyouSoft.Model.CompanyStructure.SysHandleLogs logInfo = new EyouSoft.Model.CompanyStructure.SysHandleLogs();
                logInfo.CompanyId    = 0;
                logInfo.DepatId      = 0;
                logInfo.EventCode    = EyouSoft.Model.CompanyStructure.SysHandleLogsNO.EventCode;
                logInfo.EventIp      = string.Empty;
                logInfo.EventMessage = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "{0}在" + EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.系统设置_公司信息.ToString() + "修改了公司信息数据。";
                logInfo.EventTime    = DateTime.Now;
                logInfo.EventTitle   = "修改公司信息";
                logInfo.ModuleId     = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.系统设置_公司信息;
                logInfo.OperatorId   = 0;
                this.Logwr(logInfo);
                logInfo = null;
            }
            #endregion
            return(IsTrue);
        }
Beispiel #13
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";

            string logId = context.Request.QueryString["logId"];

            if (!String.IsNullOrEmpty(logId))
            {
                EyouSoft.Model.TicketStructure.TicketFreightBuyLog model = EyouSoft.BLL.TicketStructure.FreightBuyLog.CreateInstance().GetModel(logId);
                string url = "";

                /*
                 * 常规购买:套餐项目-常规  类型-团队  运价数-19 开始10.1-10.3
                 * 套餐购买:套餐项目-华东区  类型-团队  航空公司-CA 始发地-上海 目的地-所有 开始10.1-10.3
                 * 促销购买:套餐项目-华东区  类型-团队  航空公司-CA 始发地-上海 目的地-北京 开始10.1-10.3
                 */
                string batch_no = "";
                companyModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(model.CompanyId);
                string bankType = context.Request.QueryString["bankType"];
                if (companyModel == null || String.IsNullOrEmpty(context.Request.QueryString["uid"]) || String.IsNullOrEmpty(bankType))
                {
                    context.Response.Write("error");
                    return;
                }
                switch (bankType)
                {
                case "ZFB":
                    switch (model.PackageType)
                    {
                    case EyouSoft.Model.TicketStructure.PackageTypes.常规: url = this.GetPayUrlByZFB(model.OrderNo, string.Format("常规购买:套餐项目-{0}、类型-团队、运价数-{1}、开始{2}-{3}", model.PackageName, model.BuyCount.ToString(), model.StartMonth.ToString("yyyy.MM"), model.EndMonth.ToString("yyyy.MM")), "暂无", Utils.GetDecimal((model.SumPrice * 100).ToString("0")) / 100); break;

                    case EyouSoft.Model.TicketStructure.PackageTypes.套餐: url = this.GetPayUrlByZFB(model.OrderNo, string.Format("套餐购买:套餐项目-{0}、类型-团队、航空公司-{1}、始发地-{2}、目的地-{3}、开始{4}-{5}", model.PackageName, model.FlightName, model.HomeCityName, model.DestCityNames, model.StartMonth.ToString("yyyy.MM"), model.EndMonth.ToString("yyyy.MM")), "暂无", Utils.GetDecimal((model.SumPrice * 100).ToString("0")) / 100); break;

                    default: url = this.GetPayUrlByZFB(model.OrderNo, string.Format("促销购买:套餐项目-{0}、类型-团队  航空公司-{1}、始发地-{2}、目的地-{3}、开始{4}-{5}", model.PackageName, model.FlightName, model.HomeCityName, model.DestCityNames, model.StartMonth.ToString("yyyy.MM"), model.EndMonth.ToString("yyyy.MM")), "暂无", Utils.GetDecimal((model.SumPrice * 100).ToString("0")) / 100); break;
                    }

                    EyouSoft.BLL.TicketStructure.FreightBuyLog.CreateInstance().AddTicketPay(model.Id, model.OrderNo, context.Request.QueryString["uid"], companyModel.ID, Utils.GetDecimal((model.SumPrice * 100).ToString("0")) / 100, EyouSoft.Model.TicketStructure.TicketAccountType.支付宝, out batch_no); break;

                case "CFT":
                    switch (model.PackageType)
                    {
                    case EyouSoft.Model.TicketStructure.PackageTypes.常规: url = this.GetPayUrlByCFT(model.OrderNo, string.Format("常规购买:套餐项目-{0}、类型-团队、运价数-{1}、开始{2}-{3}", model.PackageName, model.BuyCount.ToString(), model.StartMonth.ToString("yyyy.MM"), model.EndMonth.ToString("yyyy.MM")), Utils.GetDecimal((model.SumPrice * 100).ToString("0")), context); break;

                    case EyouSoft.Model.TicketStructure.PackageTypes.套餐: url = this.GetPayUrlByCFT(model.OrderNo, string.Format("套餐购买:套餐项目-{0}、类型-团队、航空公司-{1}、始发地-{2}、目的地-{3}、开始{4}-{5}", model.PackageName, model.FlightName, model.HomeCityName, model.DestCityNames, model.StartMonth.ToString("yyyy.MM"), model.EndMonth.ToString("yyyy.MM")), Utils.GetDecimal((model.SumPrice * 100).ToString("0")), context); break;

                    default: url = this.GetPayUrlByCFT(model.OrderNo, string.Format("促销购买:套餐项目-{0}、类型-团队、航空公司-{1}、始发地-{2}、目的地-{3}、开始{4}-{5}", model.PackageName, model.FlightName, model.HomeCityName, model.DestCityNames, model.StartMonth.ToString("yyyy.MM"), model.EndMonth.ToString("yyyy.MM")), Utils.GetDecimal((model.SumPrice * 100).ToString("0")), context); break;
                    }
                    EyouSoft.BLL.TicketStructure.FreightBuyLog.CreateInstance().AddTicketPay(model.Id, model.OrderNo, context.Request.QueryString["uid"], companyModel.ID, Utils.GetDecimal((model.SumPrice * 100).ToString("0")) / 100, EyouSoft.Model.TicketStructure.TicketAccountType.财付通, out batch_no);
                    break;

                default: context.Response.Write("error"); return;
                }


                if (url != "")
                {
                    context.Response.Write(url);
                }
                else
                {
                    context.Response.Write("error");
                }
                return;
            }

            //购买数
            int buyCount = Utils.GetInt(context.Request.QueryString["buyCount"]);
            //公司ID
            string companyId = context.Request.QueryString["companyId"];
            //开始时间
            DateTime?startMonth = Utils.GetDateTimeNullable(context.Request.QueryString["SartDateTime"]);
            //套餐编号
            int packageId = Utils.GetInt(context.Request.QueryString["packageId"]);
            //购买时间类型
            string type = Utils.GetQueryStringValue("type");
            //购买类型: cg = 常规  cs = 套餐 + 促销
            string p = context.Request.QueryString["p"];
            //购买运价类型 2 = 套餐  3 = 促销
            string packageType = context.Request.QueryString["packageType"];

            if (startMonth == null)
            {
                context.Response.Write("error");
                return;
            }

            if (p != null)
            {
                //获得公司信息
                companyModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(companyId);
                if (companyModel == null)
                {
                    context.Response.Write("error");
                    return;
                }
                //获取购买运价信息
                packageModel = EyouSoft.BLL.TicketStructure.FreightPackageInfo.CreateInstance().GetModel(packageId);
                if (packageModel == null)
                {
                    context.Response.Write("error");
                    return;
                }
                decimal onePrice = 0.00M;
                //结束时间计算
                DateTime endTime   = DateTime.Now;
                DateTime startDate = Convert.ToDateTime(startMonth);
                //如果开始日期是本月
                if (Convert.ToDateTime(startMonth).Month == DateTime.Now.Month)
                {
                    //计算当月的剩余天数的比例
                    int today = Convert.ToDateTime(startMonth).Day;

                    decimal ratio = Decimal.Parse((DateTime.DaysInMonth(startDate.Year, startDate.Month) - today + 1).ToString("0.00")) / Decimal.Parse(Convert.ToDecimal(DateTime.DaysInMonth(startDate.Year, startDate.Month)).ToString("0.00"));
                    switch (type)
                    {
                    case "1":
                        //单价 = 当月剩余天数比率 * 每月价格
                        onePrice = packageModel.MonthPrice * ratio;
                        endTime  = Convert.ToDateTime(startDate.Year + "-" + startDate.Month + "-" + DateTime.DaysInMonth(startDate.Year, startDate.Month));
                        break;

                    case "2":
                        //单价 = 当月剩余天数比率 * 每月价格 + 其它两月的价格
                        onePrice = ratio * packageModel.QuarterPrice / 3 + packageModel.QuarterPrice / 3 * 2;
                        endTime  = Convert.ToDateTime(startDate.AddMonths(2).Year + "-" + startDate.AddMonths(2).Month + "-" + DateTime.DaysInMonth(startDate.AddMonths(2).Year, startDate.AddMonths(2).Month));
                        break;

                    default:
                        //单价 = 当月剩余天数比率 * 每月价格 + 其它五月的价格
                        onePrice = ratio * packageModel.HalfYearPrice / 6 + packageModel.HalfYearPrice / 6 * 5;
                        endTime  = Convert.ToDateTime(startDate.AddMonths(5).Year + "-" + startDate.AddMonths(5).Month + "-" + DateTime.DaysInMonth(startDate.AddMonths(5).Year, startDate.AddMonths(5).Month));
                        break;
                    }
                }
                //如果开始日期是大于本月
                else
                {
                    //设置开始日期为每月 1 号
                    startDate = Convert.ToDateTime(startDate.Year + "-" + startDate.Month + "-01");

                    switch (type)
                    {
                    case "1":
                        //单价 = 当月剩余天数比率 * 每月价格
                        onePrice = packageModel.MonthPrice;
                        endTime  = Convert.ToDateTime(startDate.Year + "-" + startDate.Month + "-" + DateTime.DaysInMonth(startDate.Year, startDate.Month));
                        break;

                    case "2":
                        //单价 = 当月剩余天数比率 * 每月价格 + 其它两月的价格
                        onePrice = packageModel.QuarterPrice;
                        endTime  = Convert.ToDateTime(startDate.AddMonths(2).Year + "-" + startDate.AddMonths(2).Month + "-" + DateTime.DaysInMonth(startDate.AddMonths(2).Year, startDate.AddMonths(2).Month));
                        break;

                    default:
                        //单价 = 当月剩余天数比率 * 每月价格 + 其它五月的价格
                        onePrice = packageModel.HalfYearPrice;
                        endTime  = Convert.ToDateTime(startDate.AddMonths(5).Year + "-" + startDate.AddMonths(5).Month + "-" + DateTime.DaysInMonth(startDate.AddMonths(5).Year, startDate.AddMonths(5).Month));
                        break;
                    }
                }

                if (p == "cg")
                {
                    if (buyCount == 0 || string.IsNullOrEmpty(companyId) || packageId == 0 || type == "" || string.IsNullOrEmpty(p))
                    {
                        context.Response.Write("error");
                        return;
                    }

                    //获得支付总金额
                    decimal sumPrice = onePrice * buyCount;
                    EyouSoft.Model.TicketStructure.TicketFreightBuyLog model = new EyouSoft.Model.TicketStructure.TicketFreightBuyLog();
                    model.BuyCount  = buyCount;
                    model.BuyTime   = DateTime.Now;
                    model.CompanyId = companyId;
                    model.EndMonth  = endTime;
                    model.FlightId  = packageModel.FlightId;

                    EyouSoft.Model.TicketStructure.TicketFlightCompany flightCompanyModel = EyouSoft.BLL.TicketStructure.TicketFlightCompany.CreateInstance().GetTicketFlightCompany(packageModel.FlightId);

                    if (flightCompanyModel != null)
                    {
                        model.FlightName = flightCompanyModel.AirportName;
                    }

                    if (string.IsNullOrEmpty(model.FlightName))
                    {
                        model.FlightName = string.Empty;
                    }

                    model.OperatorId = companyModel.ID;
                    model.PackageId  = packageId;

                    EyouSoft.Model.TicketStructure.TicketFreightPackageInfo ticketFreightModel = EyouSoft.BLL.TicketStructure.FreightPackageInfo.CreateInstance().GetModel(packageId);

                    if (ticketFreightModel != null)
                    {
                        model.PackageName = ticketFreightModel.PackageName;
                    }
                    model.PackageType = EyouSoft.Model.TicketStructure.PackageTypes.常规;

                    model.PayState   = false;
                    model.RateType   = EyouSoft.Model.TicketStructure.RateType.团队散拼;
                    model.StartMonth = Convert.ToDateTime(startMonth);
                    model.SumPrice   = Utils.GetDecimal((sumPrice * 100).ToString("0")) / 100;

                    bool result = EyouSoft.BLL.TicketStructure.FreightBuyLog.CreateInstance().Add(model);
                    if (result)
                    {
                        context.Response.Write(model.Id);
                    }
                    else
                    {
                        context.Response.Write("error");
                    }
                }

                if (p == "cs")
                {
                    if (string.IsNullOrEmpty(companyId) || startMonth == null || packageId == 0 || type == "" || string.IsNullOrEmpty(p))
                    {
                        context.Response.Write("error");
                        return;
                    }

                    //获得支付总金额
                    decimal sumPrice = onePrice;
                    EyouSoft.Model.TicketStructure.TicketFreightBuyLog model = new EyouSoft.Model.TicketStructure.TicketFreightBuyLog();
                    model.BuyCount  = buyCount;
                    model.BuyTime   = DateTime.Now;
                    model.CompanyId = companyId;
                    model.EndMonth  = endTime;
                    model.FlightId  = packageModel.FlightId;
                    if (EyouSoft.BLL.TicketStructure.TicketFlightCompany.CreateInstance().GetTicketFlightCompany(packageModel.FlightId) != null)
                    {
                        model.FlightName = EyouSoft.BLL.TicketStructure.TicketFlightCompany.CreateInstance().GetTicketFlightCompany(packageModel.FlightId).AirportName;
                    }
                    model.OperatorId  = companyModel.ID;
                    model.PackageId   = packageId;
                    model.PackageName = EyouSoft.BLL.TicketStructure.FreightPackageInfo.CreateInstance().GetModel(packageId).PackageName;
                    if (packageType == "2")
                    {
                        model.PackageType = EyouSoft.Model.TicketStructure.PackageTypes.套餐;
                    }
                    else
                    {
                        model.PackageType = EyouSoft.Model.TicketStructure.PackageTypes.促销;
                    }
                    model.PayState      = false;
                    model.RateType      = EyouSoft.Model.TicketStructure.RateType.团队散拼;
                    model.StartMonth    = Convert.ToDateTime(startMonth);
                    model.SumPrice      = Utils.GetDecimal((sumPrice * 100).ToString("0")) / 100;
                    model.HomeCityId    = packageModel.HomeCityId;
                    model.HomeCityName  = GetCityNameById(packageModel.HomeCityId.ToString());
                    model.DestCityIds   = packageModel.DestCityIds;
                    model.DestCityNames = GetCityNameById(packageModel.DestCityIds).Replace('、', ',');

                    bool result = EyouSoft.BLL.TicketStructure.FreightBuyLog.CreateInstance().Add(model);
                    if (result)
                    {
                        context.Response.Write(model.Id);
                    }
                    else
                    {
                        context.Response.Write("error");
                    }
                }
            }
        }
Beispiel #14
0
        /// <summary>
        /// 删除
        /// </summary>
        protected string DeletCompany()
        {
            string Result = "未选择要删除的公司!";

            string[] strCompanyId = Request.Form.GetValues("ckCompanyId");
            if (strCompanyId != null)
            {
                bool isManage = CheckMasterGrant(EyouSoft.Common.YuYingPermission.会员管理_管理该栏目);
                bool isTure   = false;
                //是否拥有删除的权限
                for (int i = 0; i < strCompanyId.Length; i++)
                {
                    EyouSoft.Model.CompanyStructure.CompanyInfo CompanyInfo = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(strCompanyId[i]);
                    if (CompanyInfo != null)
                    {
                        EyouSoft.Model.CompanyStructure.BusinessProperties CompanyType = CompanyInfo.BusinessProperties;
                        if (CompanyType == EyouSoft.Model.CompanyStructure.BusinessProperties.旅游社)
                        {
                            if (isManage && CheckMasterGrant(EyouSoft.Common.YuYingPermission.旅行社汇总管理_删除))
                            {
                                isTure = true;
                            }
                            else
                            {
                                Result = "您无权删除旅行社会员!";
                                break;
                            }
                        }
                        if (CompanyType == EyouSoft.Model.CompanyStructure.BusinessProperties.酒店)
                        {
                            if (isManage && CheckMasterGrant(EyouSoft.Common.YuYingPermission.酒店汇总管理_删除))
                            {
                                isTure = true;
                            }
                            else
                            {
                                Result = "您无权删除酒店会员!";
                                break;
                            }
                        }
                        if (CompanyType == EyouSoft.Model.CompanyStructure.BusinessProperties.景区)
                        {
                            if (isManage && CheckMasterGrant(EyouSoft.Common.YuYingPermission.景区汇总管理_删除))
                            {
                                isTure = true;
                            }
                            else
                            {
                                Result = "您无权删除景区会员!";
                                break;
                            }
                        }
                        if (CompanyType == EyouSoft.Model.CompanyStructure.BusinessProperties.车队)
                        {
                            if (isManage && CheckMasterGrant(EyouSoft.Common.YuYingPermission.车队汇总管理_删除))
                            {
                                isTure = true;
                            }
                            else
                            {
                                Result = "您无权删除车队会员!";
                                break;
                            }
                        }
                        if (CompanyType == EyouSoft.Model.CompanyStructure.BusinessProperties.旅游用品店)
                        {
                            if (isManage && CheckMasterGrant(EyouSoft.Common.YuYingPermission.旅游用品店汇总管理_删除))
                            {
                                isTure = true;
                            }
                            else
                            {
                                Result = "您无权删除旅游用品会员!";
                                break;
                            }
                        }
                        if (CompanyType == EyouSoft.Model.CompanyStructure.BusinessProperties.购物店)
                        {
                            if (isManage && CheckMasterGrant(EyouSoft.Common.YuYingPermission.购物店汇总管理_删除))
                            {
                                isTure = true;
                            }
                            else
                            {
                                Result = "您无权删除购物点会员!";
                                break;
                            }
                        }
                        if (CompanyType == EyouSoft.Model.CompanyStructure.BusinessProperties.机票供应商)
                        {
                            if (isManage && CheckMasterGrant(EyouSoft.Common.YuYingPermission.机票供应商管理_删除))
                            {
                                isTure = true;
                            }
                            else
                            {
                                Result = "您无权删除机票供应商会员!";
                                break;
                            }
                        }
                        if (CompanyType == EyouSoft.Model.CompanyStructure.BusinessProperties.其他采购商)
                        {
                            if (isManage && CheckMasterGrant(EyouSoft.Common.YuYingPermission.其他采购商管理_删除))
                            {
                                isTure = true;
                            }
                            else
                            {
                                Result = "您无权删除其他采购商会员!";
                                break;
                            }
                        }
                    }
                }
                if (isTure)
                {
                    if (EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().Remove(strCompanyId))
                    {
                        Result = "True";
                    }
                    else
                    {
                        Result = "删除失败!";
                    }
                }
            }
            return(Result);
        }
Beispiel #15
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
            }
        }
Beispiel #16
0
        /// <summary>
        /// 添加保存
        /// </summary>
        private void AddSave()
        {
            MRoute routeModel = EyouSoft.BLL.NewTourStructure.BRoute.CreateInstance().GetModel(Utils.GetFormValue("RouteId"));

            if (routeModel != null)
            {
                //提前天数
                int         advanceDayRegistration = routeModel.AdvanceDayRegistration;
                MPowderList model = new MPowderList();

                #region 线路信息赋值
                //线路Id
                model.RouteId        = Utils.GetFormValue("RouteId");
                model.Characteristic = routeModel.Characteristic;
                //线路名称
                model.RouteName = routeModel.RouteName;
                //专线类型
                model.AreaId   = routeModel.AreaId;
                model.AreaName = routeModel.AreaName;
                //发布人编号
                model.OperatorId   = routeModel.OperatorId;
                model.OperatorName = routeModel.OperatorName;
                //公司编号
                model.Publishers     = CompanyId;
                model.BrowseCitys    = routeModel.BrowseCitys;
                model.BrowseCountrys = routeModel.BrowseCountrys;
                model.Citys          = routeModel.Citys;
                model.ClickNum       = 0;
                model.EndCity        = routeModel.EndCity;
                model.EndCityName    = routeModel.EndCityName;
                model.Day            = routeModel.Day;
                model.EndTraffic     = routeModel.EndTraffic;
                model.FitQuotation   = routeModel.FitQuotation;
                model.IssueTime      = DateTime.Now;
                model.Late           = routeModel.Late;
                //收客状态
                model.PowderTourStatus = PowderTourStatus.收客;
                model.RecommendType    = RecommendType.新品;
                model.RouteImg         = routeModel.RouteImg;
                model.RouteImg1        = routeModel.RouteImg1;
                model.RouteImg2        = routeModel.RouteImg2;
                model.ServiceStandard  = routeModel.ServiceStandard;
                model.StandardPlans    = routeModel.StandardPlans;
                model.StartTraffic     = routeModel.StartTraffic;
                model.TeamLeaderDec    = routeModel.TeamPlanDes;
                model.Themes           = routeModel.Themes;
                model.VendorsNotes     = routeModel.VendorsNotes;

                EyouSoft.Model.CompanyStructure.CompanyInfo comModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(CompanyId);
                if (comModel != null)
                {
                    model.CompanyLev   = comModel.CompanyLev;
                    model.CompanyBrand = comModel.CompanyBrand;
                    model.Introduction = comModel.Introduction;
                }

                #endregion
                //团队人数
                model.TourNum = Utils.GetInt(Utils.GetFormValue("txt_tourNum"));

                //是否限制人数
                model.IsLimit = Utils.GetFormValue("hd_isLimit") == "0";
                if (!model.IsLimit)
                {
                    //余位
                    model.MoreThan = Utils.GetInt(Utils.GetFormValue("txt_moreThan"));
                }
                //成人市场价
                model.RetailAdultPrice = Utils.GetDecimal(Utils.GetFormValue("txt_retailAdultPrice"));
                //成人结算价
                model.SettlementAudltPrice = Utils.GetDecimal(Utils.GetFormValue("txt_settlementAudltPrice"));
                //儿童市场价
                model.RetailChildrenPrice = Utils.GetDecimal(Utils.GetFormValue("txt_retailChildrenPrice"));
                //儿童结算价
                model.SettlementChildrenPrice = Utils.GetDecimal(Utils.GetFormValue("txt_settlementChildrenPrice"));
                //单房差
                model.MarketPrice = Utils.GetDecimal(Utils.GetFormValue("txt_marketPrice"));
                //集合说明
                model.SetDec = Utils.GetFormValue("txt_marketPrice");
                //线路销售备注
                model.TourNotes = Utils.GetFormValue("txt_tourNotes");
                //领队全陪
                model.TeamLeaderDec = Utils.GetFormValue("txt_tourNotes");

                model.StartDate = Utils.GetFormValue(this.txt_startDate.UniqueID);
                model.EndDate   = Utils.GetFormValue(this.txt_endDate.UniqueID);

                //出团日期
                string[] leaveDateStr = Utils.GetFormValue("leaveDate").Split(',');

                //计算有几个出团日期
                int i = leaveDateStr.Length;
                //出团日期
                DateTime[] leaveDate = new DateTime[i];
                //报名截止时间
                DateTime[] registrationEndDate = new DateTime[i];
                //遍历
                while (i-- > 0)
                {
                    //出团日期
                    leaveDate[i] = Utils.GetDateTime(leaveDateStr[i]);
                    //计算截止时间
                    registrationEndDate[i] = leaveDate[i] - new TimeSpan(advanceDayRegistration, 0, 0, 0);

                    //周六继续提前1天
                    if ((int)registrationEndDate[i].DayOfWeek == 6)
                    {
                        registrationEndDate[i] = registrationEndDate[i] - new TimeSpan(1, 0, 0, 0);
                    }
                    //周日继续提前2天
                    if ((int)registrationEndDate[i].DayOfWeek == 0)
                    {
                        registrationEndDate[i] = registrationEndDate[i] - new TimeSpan(2, 0, 0, 0);
                    }
                }
                model.IP = Page.Request.UserHostAddress;
                bool ret = EyouSoft.BLL.NewTourStructure.BPowderList.CreateInstance().AddBatchPowder(model, leaveDate, registrationEndDate);
                Response.Clear();
                if (ret)
                {
                    Response.Write(true);
                }
                else
                {
                    Response.Write(false);
                }
                Response.End();
            }
        }
Beispiel #17
0
        private void InitPage()
        {
            EyouSoft.IBLL.TourStructure.ITour     Ibll  = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
            EyouSoft.Model.TourStructure.TourInfo model = Ibll.GetTourInfo(TourID);
            if (model != null)
            {
                TemplateTourID = model.ParentTourID;
                #region 获取所属公司信息
                if (this.IsLogin)
                {
                    TourContactTel = this.SiteUserInfo.ContactInfo.Tel;
                    TourContact    = this.SiteUserInfo.ContactInfo.ContactName;
                    EyouSoft.IBLL.CompanyStructure.ICompanyInfo ICompanyInfobll  = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance();
                    EyouSoft.Model.CompanyStructure.CompanyInfo companyInfoModel = ICompanyInfobll.GetModel(this.SiteUserInfo.CompanyID);
                    CompanyName      = companyInfoModel.CompanyName;
                    CompanyAddress   = companyInfoModel.CompanyAddress;
                    License          = companyInfoModel.License;
                    ICompanyInfobll  = null;
                    companyInfoModel = null;
                }
                else
                {
                    tbl_Header.Visible = false;
                    //EyouSoft.IBLL.CompanyStructure.ICompanyInfo ICompanyInfobll = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance();
                    //EyouSoft.Model.CompanyStructure.CompanyInfo companyInfoModel = ICompanyInfobll.GetModel(model.CompanyID);
                    //CompanyName = companyInfoModel.CompanyName;
                    //CompanyAddress = companyInfoModel.CompanyAddress;
                    //License = companyInfoModel.License;
                    //TourContactTel = companyInfoModel.ContactInfo.Tel;
                    //TourContact = companyInfoModel.ContactInfo.ContactName;
                    //ICompanyInfobll = null;
                    //companyInfoModel = null;
                }
                #endregion

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

                #endregion

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

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

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

                #region 团队相关信息
                RouteName = model.RouteName;
                LeaveDate = model.LeaveDate;
                BackDate  = model.ComeBackDate;
                TourDays  = model.TourDays;
                TourCode  = model.TourNo;
                if (model.ReleaseType == EyouSoft.Model.TourStructure.ReleaseType.Standard)//标准发布
                {
                    Traffic           = EyouSoft.Common.Function.StringValidate.TextToHtml(model.LeaveTraffic.Trim());
                    MeetTourContect   = EyouSoft.Common.Function.StringValidate.TextToHtml(model.MeetTourContect.Trim());
                    CollectionContect = EyouSoft.Common.Function.StringValidate.TextToHtml(model.CollectionContect.Trim());
                    //行程信息及相关
                    rptStandardPlan.DataSource = model.StandardPlan;
                    rptStandardPlan.DataBind();
                    //服务标准及说明
                    List <EyouSoft.Model.TourStructure.ServiceStandard> serviceList = new List <EyouSoft.Model.TourStructure.ServiceStandard>();
                    if (model.ServiceStandard != null)
                    {
                        serviceList.Add(model.ServiceStandard);
                        NotContainService = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.NotContainService);
                        SpeciallyNotice   = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.SpeciallyNotice);
                        this.rptServiceStandard.DataSource = serviceList;
                        this.rptServiceStandard.DataBind();
                    }
                }
                else//快速发布
                {
                    isStadardType        = false;
                    pnlQuickPlan.Visible = true;
                    QuickPlanContent     = model.QuickPlan;
                }
                #endregion
            }
            Ibll  = null;
            model = null;
        }
Beispiel #18
0
        private void InitPage()
        {
            EyouSoft.IBLL.TourStructure.ITour     Ibll  = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
            EyouSoft.Model.TourStructure.TourInfo model = Ibll.GetTourInfo(TourID);
            if (model != null)
            {
                TemplateTourID = model.ParentTourID;
                #region 获取所属公司信息
                EyouSoft.IBLL.CompanyStructure.ICompanyInfo ICompanyInfobll  = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance();
                EyouSoft.Model.CompanyStructure.CompanyInfo companyInfoModel = ICompanyInfobll.GetModel(model.CompanyID);
                CompanyName      = companyInfoModel.CompanyName;
                CompanyAddress   = companyInfoModel.CompanyAddress;
                License          = companyInfoModel.License;
                TourContactFax   = companyInfoModel.ContactInfo.Fax;
                ICompanyInfobll  = null;
                companyInfoModel = null;
                #endregion

                #region 获取地接社信息
                if (model.LocalTravelAgency != null && model.LocalTravelAgency.Count > 0)
                {
                    //EyouSoft.Model.TourStructure.TourLocalityInfo localMode = ((List<EyouSoft.Model.TourStructure.TourLocalityInfo>)model.LocalTravelAgency).First(LocalAgency =>
                    //{
                    //    return LocalAgency.TourId == TourID;
                    //});
                    //if (localMode != null)
                    //{
                    ltrLocalCompanyName.Text = model.LocalTravelAgency[0].LocalCompanyName;
                    ltrLicenseNumber.Text    = model.LocalTravelAgency[0].LicenseNumber;
                    //}
                }
                #endregion

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

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

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

                #region 团队相关信息
                RouteName = model.RouteName;
                LeaveDate = model.LeaveDate;
                BackDate  = model.ComeBackDate;
                TourDays  = model.TourDays;
                TourCode  = model.TourNo;
                if (((int)model.ReleaseType) == 0)//标注发布
                {
                    ltrTraffic.Text           = model.LeaveTraffic;
                    ltrMeetTourContect.Text   = model.MeetTourContect;
                    ltrCollectionContect.Text = model.CollectionContect;
                    //行程信息及相关
                    rptStandardPlan.DataSource = model.StandardPlan;
                    rptStandardPlan.DataBind();
                    //服务标准及说明
                    List <EyouSoft.Model.TourStructure.ServiceStandard> serviceList = new List <EyouSoft.Model.TourStructure.ServiceStandard>();
                    if (model.ServiceStandard != null)
                    {
                        serviceList.Add(model.ServiceStandard);
                        this.rptServiceStandard.DataSource = serviceList;
                        this.rptServiceStandard.DataBind();
                    }
                }
                else//快速发布
                {
                    pnlServiceStandard.Visible   = false;
                    Tr_CollectionContect.Visible = false;

                    Tr_Traffic.Visible = false;
                    QuickPlanContent   = model.QuickPlan;
                }
                #endregion
            }
            Ibll  = null;
            model = null;
        }
Beispiel #19
0
        private void InitPage()
        {
            EyouSoft.IBLL.TourStructure.ITour     Ibll  = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
            EyouSoft.Model.TourStructure.TourInfo model = Ibll.GetTourInfo(TourID);
            if (model != null)
            {
                TemplateTourID = model.ParentTourID;
                #region 新增浏览记录
                string currentCompanyId = string.Empty;
                if (this.IsLogin)
                {
                    currentCompanyId = SiteUserInfo.CompanyID;
                }
                if (model.CompanyID != currentCompanyId && !string.IsNullOrEmpty(currentCompanyId))
                {
                    EyouSoft.Model.TourStructure.TourVisitInfo TourModel = new EyouSoft.Model.TourStructure.TourVisitInfo();
                    TourModel.TourId             = TourID;
                    TourModel.VisitedCompanyId   = model.CompanyID;
                    TourModel.VisitedCompanyName = model.CompanyName;
                    TourModel.VisitedTime        = DateTime.Today;
                    TourModel.VisitTourCode      = model.TourNo;
                    TourModel.VisitTourRouteName = model.RouteName;
                    if (IsLogin)
                    {
                        TourModel.ClientCompanyId            = SiteUserInfo.CompanyID;
                        TourModel.ClientCompanyName          = SiteUserInfo.CompanyName;
                        TourModel.ClientUserContactMobile    = SiteUserInfo.ContactInfo.Mobile;
                        TourModel.ClientUserContactName      = SiteUserInfo.ContactInfo.ContactName;
                        TourModel.ClientUserContactTelephone = SiteUserInfo.ContactInfo.Tel;
                        TourModel.ClientUserId        = SiteUserInfo.ID;
                        TourModel.ClinetUserContactQQ = SiteUserInfo.ContactInfo.QQ;
                    }
                    else
                    {
                        TourModel.ClientCompanyId = "";
                    }
                    EyouSoft.BLL.TourStructure.Tour.CreateInstance().InsertTourVisitedInfo(TourModel);
                    TourModel = null;
                }
                else if (!IsLogin)
                {
                    EyouSoft.BLL.TourStructure.Tour.CreateInstance().IncreaseClicks(TourID);
                }
                #endregion

                #region 获取所属公司信息
                if (this.IsLogin)
                {
                    TourContactTel = this.SiteUserInfo.ContactInfo.Tel;
                    TourContact    = this.SiteUserInfo.ContactInfo.ContactName;
                    EyouSoft.IBLL.CompanyStructure.ICompanyInfo ICompanyInfobll  = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance();
                    EyouSoft.Model.CompanyStructure.CompanyInfo companyInfoModel = ICompanyInfobll.GetModel(this.SiteUserInfo.CompanyID);
                    CompanyName      = companyInfoModel.CompanyName;
                    CompanyAddress   = companyInfoModel.CompanyAddress;
                    License          = companyInfoModel.License;
                    ICompanyInfobll  = null;
                    companyInfoModel = null;
                }
                else
                {
                    tbl_Header.Visible = false;
                    //EyouSoft.IBLL.CompanyStructure.ICompanyInfo ICompanyInfobll = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance();
                    //EyouSoft.Model.CompanyStructure.CompanyInfo companyInfoModel = ICompanyInfobll.GetModel(model.CompanyID);
                    //CompanyName = companyInfoModel.CompanyName;
                    //CompanyAddress = companyInfoModel.CompanyAddress;
                    //License = companyInfoModel.License;
                    //TourContactTel = companyInfoModel.ContactInfo.Tel;
                    //TourContact = companyInfoModel.ContactInfo.ContactName;
                    //ICompanyInfobll = null;
                    //companyInfoModel = null;
                }
                #endregion

                #region 获取地接社信息
                rptTourLocalityInfo.DataSource = model.LocalTravelAgency;
                rptTourLocalityInfo.DataBind();
                if (rptTourLocalityInfo.Items.Count < 1)
                {
                    isNotLocalCompany = false;
                }
                #endregion

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

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

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

                #region 团队相关信息
                RouteName = model.RouteName;
                LeaveDate = model.LeaveDate;
                BackDate  = model.ComeBackDate;
                TourDays  = model.TourDays;
                TourCode  = model.TourNo;
                if (model.ReleaseType == EyouSoft.Model.TourStructure.ReleaseType.Standard)//标准发布
                {
                    if (!string.IsNullOrEmpty(model.LeaveTraffic))
                    {
                        ltrTraffic.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.LeaveTraffic);
                    }
                    else
                    {
                        Tr_Traffic.Visible = false;
                    }
                    if (!string.IsNullOrEmpty(model.MeetTourContect))
                    {
                        ltrMeetTourContect.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.MeetTourContect);
                    }
                    else
                    {
                        Tr_MeetTourContect.Visible = false;
                    }
                    if (!string.IsNullOrEmpty(model.CollectionContect))
                    {
                        ltrCollectionContect.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.CollectionContect);
                    }
                    else
                    {
                        Tr_CollectionContect.Visible = false;
                    }

                    //行程信息及相关
                    rptStandardPlan.DataSource = model.StandardPlan;
                    rptStandardPlan.DataBind();
                    //服务标准及说明
                    if (model.ServiceStandard != null)
                    {
                        ResideContent       = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.ResideContent);       //住宿
                        DinnerContent       = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.DinnerContent);       //用餐
                        SightContent        = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.SightContent);        //景点
                        CarContent          = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.CarContent);          //用车
                        GuideContent        = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.GuideContent);        //导游
                        TrafficContent      = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.TrafficContent);      //往返交通
                        IncludeOtherContent = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.IncludeOtherContent); //其它
                        if (!string.IsNullOrEmpty(model.ServiceStandard.NotContainService))
                        {
                            NotContainService = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.NotContainService);
                        }
                        else
                        {
                            Tr_NotContainService.Visible = false;
                        }
                        if (!string.IsNullOrEmpty(model.ServiceStandard.SpeciallyNotice))
                        {
                            SpeciallyNotice = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.SpeciallyNotice);
                        }
                        else
                        {
                            Tr_SpeciallyNotice.Visible = false;
                        }
                    }
                }
                else//快速发布
                {
                    pnlServiceStandard.Visible   = false;
                    Tr_CollectionContect.Visible = false;
                    Tr_MeetTourContect.Visible   = false;
                    Tr_Traffic.Visible           = false;
                    QuickPlanContent             = model.QuickPlan;
                }
                #endregion
            }
            Ibll  = null;
            model = null;
        }
Beispiel #20
0
        /// <summary>
        /// 初始化基础信息
        /// </summary>
        private void InitBasicInfo()
        {
            if (UserInfoModel != null)
            {
                EyouSoft.Model.CompanyStructure.CompanyInfo comModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(UserInfoModel.CompanyID);
                if (comModel != null)
                {
                    this.lblLoginUser.Text = "您好," + UserInfoModel.UserName + Utils.GetCompanyLevImg(comModel.CompanyLev) + " 欢迎登录同业114。信息完整度:<a class=\"ff0000\" href='javascript:void(0);' onclick='topTab.open(\"/systemset/companyinfoset.aspx\",\"单位信息\");return false;' >" + (comModel.InfoFull * 100).ToString("00") + "%</a>";
                }
                else
                {
                    this.lblLoginUser.Text = "您好," + UserInfoModel.UserName + " 欢迎登录同业114。";
                }
            }
            EyouSoft.IBLL.CompanyStructure.ICompanySetting CSetBll   = EyouSoft.BLL.CompanyStructure.CompanySetting.CreateInstance();
            EyouSoft.Model.CompanyStructure.CompanySetting CSetModel = CSetBll.GetModel(UserInfoModel.CompanyID);
            if (CSetModel != null)
            {
                switch (CSetModel.FirstMenu)
                {
                case EyouSoft.Model.CompanyStructure.MenuSection.专线服务:
                    FirstMenu = "0";
                    break;

                case EyouSoft.Model.CompanyStructure.MenuSection.组团服务:
                    FirstMenu = "1";
                    break;

                case EyouSoft.Model.CompanyStructure.MenuSection.地接服务:
                    FirstMenu = "2";
                    break;

                case EyouSoft.Model.CompanyStructure.MenuSection.景区服务:
                    FirstMenu = "3";
                    break;

                default:
                    FirstMenu = "1";
                    break;
                }
            }

            #region 公告区
            EyouSoft.IBLL.SystemStructure.ISummaryCount SummaryBll   = EyouSoft.BLL.SystemStructure.SummaryCount.CreateInstance();
            EyouSoft.Model.SystemStructure.SummaryCount SummaryModel = SummaryBll.GetSummary();
            if (SummaryModel != null)
            {
                this.lblRouteAgencyCount.Text = (SummaryModel.TravelAgency + SummaryModel.TravelAgencyVirtual).ToString();
                this.lblHotelCount.Text       = (SummaryModel.Hotel + SummaryModel.HotelVirtual).ToString();
                this.lblSightCount.Text       = (SummaryModel.Sight + SummaryModel.SightVirtual).ToString();
                this.lblCarCount.Text         = (SummaryModel.Car + SummaryModel.CarVirtual).ToString();
                this.lblShoppingCount.Text    = (SummaryModel.Shop + SummaryModel.ShopVirtual).ToString();
            }
            SummaryModel = null;
            SummaryBll   = null;
            #endregion

            #region  业114提醒
            EyouSoft.Model.CompanyStructure.CompanyRole   RoleModel = UserInfoModel.CompanyRole;
            EyouSoft.Model.CompanyStructure.CompanyType[] enumType  = RoleModel.RoleItems;

            #region 专线和组团显示控制
            if (enumType != null && enumType.Length > 0)
            {
                foreach (EyouSoft.Model.CompanyStructure.CompanyType type in enumType)
                {
                    if (type == EyouSoft.Model.CompanyStructure.CompanyType.专线)
                    {
                        IsRouteAgency = true;
                    }
                    else if (type == EyouSoft.Model.CompanyStructure.CompanyType.组团 || type == EyouSoft.Model.CompanyStructure.CompanyType.其他采购商)
                    {
                        IsTourAgency = true;
                    }
                    else if (type == EyouSoft.Model.CompanyStructure.CompanyType.地接)
                    {
                        IsLocalAgency = true;
                    }
                    else if (type == EyouSoft.Model.CompanyStructure.CompanyType.景区)
                    {
                        IsSightAgency = true;
                    }
                    else
                    {
                        IsOther = true;
                    }
                }

                if (IsRouteAgency)   // 仅为专线
                {
                    this.span_RouteAgency.Visible = true;
                    this.ul_RouteAgency.Visible   = true;
                }
                if (IsTourAgency)     // 仅为组团
                {
                    this.span_TourAgency.Visible = true;
                    this.ul_TourAgency.Visible   = true;
                }
                if (IsLocalAgency)   //仅为地接
                {
                    this.span_ErAgency.Visible = true;
                    this.ul_ErAgency.Visible   = true;
                }
                if (IsSightAgency) //景区
                {
                    this.span_Scenic.Visible = true;
                    this.ul_Scenic.Visible   = true;
                }
                //if (IsOther)
                //{
                //    Utils.ShowError("对不起,您不是旅行社账户!", "");

                //    this.span_RouteAgency.Visible = false;
                //    this.ul_RouteAgency.Visible = false;
                //    this.span_TourAgency.Visible = false;
                //    this.ul_TourAgency.Visible = false;
                //    this.span_ErAgency.Visible = false;
                //    this.ul_ErAgency.Visible = false;
                //    this.span_Scenic.Visible = true;
                //    this.ul_Scenic.Visible = true;
                //    divNoLocalAgency.Visible = false;
                //}
            }
            #endregion

            EyouSoft.IBLL.TourStructure.ITour          TourBll   = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
            EyouSoft.IBLL.NewTourStructure.ITourList   iorderBll = EyouSoft.BLL.NewTourStructure.BTourList.CreateInstance();
            EyouSoft.IBLL.NewTourStructure.IPowderList powderBll = EyouSoft.BLL.NewTourStructure.BPowderList.CreateInstance();
            EyouSoft.IBLL.NewTourStructure.IRoute      routeBll  = EyouSoft.BLL.NewTourStructure.BRoute.CreateInstance();
            Dictionary <string, int> dic = null;
            #region 组团提醒
            if (IsTourAgency)     // 组团提醒
            {
                //获得线路数和团队数
                EyouSoft.IBLL.SystemStructure.ISysCity CityBll   = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance();
                EyouSoft.Model.SystemStructure.SysCity CityModel = CityBll.GetSysCityModel(UserInfoModel.CityId);
                if (CityModel != null)
                {
                    this.lblCity.Text = CityModel.CityName;
                    this.lblTemplateTourCount.Text = CityModel.ParentTourCount.ToString();
                    this.lblChildTourCount.Text    = CityModel.TourCount.ToString();
                }
                CityModel = null;
                CityBll   = null;

                //获得组团订单信息
                dic = iorderBll.GetOrderTravelCount(UserInfoModel.CompanyID);
                if (dic != null)
                {
                    if (dic.ContainsKey("未发团散客预订单") && dic.ContainsKey("散客订单未处理") && dic.ContainsKey("散客订单预留待付款") && dic.ContainsKey("散客订单已确认"))
                    {
                        this.lblTourOrderFrist.Text = string.Format(
                            " 未发团散客预订单:<a class=\"ff0000\" href=\"/teamservice/fitorders.aspx?goTimeS={0}\" onclick=\"topTab.open($(this).attr('href'),'我的散拼订单');return false;\"><b>",
                            DateTime.Now.ToShortDateString()) + dic["未发团散客预订单"].ToString() + "单</b></a>,";
                        this.lblTourOrderFrist.Text +=
                            string.Format(
                                "其中未处理<a class=\"ff0000\" href=\"/teamservice/fitorders.aspx?goTimeS={3}&status={0},{1},{2}\" onclick=\"topTab.open($(this).attr('href'),'我的散拼订单');return false;\"><b>",
                                (int)EyouSoft.Model.NewTourStructure.PowderOrderStatus.组团社待处理,
                                (int)EyouSoft.Model.NewTourStructure.PowderOrderStatus.组团社已阅,
                                (int)EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商待处理,
                                DateTime.Now.ToShortDateString()) +
                            dic["散客订单未处理"].ToString() + "单</b></a>,";
                        this.lblTourOrderFrist.Text += string.Format(
                            "预留待付款<a class=\"ff0000\" href=\"/teamservice/fitorders.aspx?goTimeS={0}&status={1}\" onclick=\"topTab.open($(this).attr('href'),'我的散拼订单');return false;\"><b>",
                            DateTime.Now.ToShortDateString(),
                            (int)EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商预留)
                                                       + dic["散客订单预留待付款"].ToString() + "单</b></a>,";
                        this.lblTourOrderFrist.Text +=
                            string.Format(
                                "已确认<a href=\"/teamservice/fitorders.aspx?goTimeS={0}&status={1},{2}\" onclick=\"topTab.open($(this).attr('href'),'我的散拼订单');return false;\"><b>",
                                DateTime.Now.ToShortDateString(),
                                (int)EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商已确定,
                                (int)EyouSoft.Model.NewTourStructure.PowderOrderStatus.结单) +
                            dic["散客订单已确认"].ToString() + "单</b></a>";
                    }

                    if (dic.ContainsKey("未发团团队预订单") && dic.ContainsKey("团队未确认") && dic.ContainsKey("团队已确认"))
                    {
                        this.lblTourOrderSecond.Text = string.Format(
                            "未发团团队预订单:<a class=\"ff0000\" href=\"/teamservice/teamorders.aspx?ref=0&goTimeS={0}\" onclick=\"topTab.open($(this).attr('href'),'我的散拼订单');return false;\"><b>",
                            DateTime.Now.ToShortDateString()) + dic["未发团团队预订单"].ToString() + "单</b></a>,";
                        this.lblTourOrderSecond.Text +=
                            string.Format(
                                "未确认订单<a class=\"ff0000\" href=\"/teamservice/teamorders.aspx?ref=0&goTimeS={1}&status={0}\" onclick=\"topTab.open($(this).attr('href'),'我的散拼订单');return false;\"><b>",
                                (int)EyouSoft.Model.NewTourStructure.TourOrderStatus.未确认,
                                DateTime.Now.ToShortDateString()) +
                            dic["团队未确认"].ToString() + "单</b></a>,";
                        this.lblTourOrderSecond.Text +=
                            string.Format(
                                "已确认<a href=\"/teamservice/teamorders.aspx?ref=0&goTimeS={2}&status={0},{1}\" onclick=\"topTab.open($(this).attr('href'),'我的散拼订单');return false;\"><b>",
                                (int)EyouSoft.Model.NewTourStructure.TourOrderStatus.已确认,
                                (int)EyouSoft.Model.NewTourStructure.TourOrderStatus.结单,
                                DateTime.Now.ToShortDateString()) +
                            dic["团队已确认"].ToString() + "单</b></a>";
                    }
                }
            }
            #endregion

            #region 专线提醒
            if (IsRouteAgency)
            {
                int ComingLeaveTourNumber = TourBll.GetComingExpireTourNumber();
                if (ComingLeaveTourNumber > 0)
                {
                    this.lblComingExpireToursCount.Text = "<img src='" + ImageServerPath + "/images/gantanhao.gif' />您当前共有<a href='/routeagency/notstartingteams.aspx' onclick=\"topTab.open($(this).attr('href'),'未出发团队');return false;\">" + ComingLeaveTourNumber + "个团</a>将于1周后到期,请及时更新计划,以方便组团社查询";
                }
                //获得专线下线路区域和团的数量

                IList <EyouSoft.Model.TourStructure.AreaStatInfo> TourByAreaCount = powderBll.GetCurrentUserTourByAreaStats();
                if (TourByAreaCount != null && TourByAreaCount.Count > 0)
                {
                    StringBuilder strTour = new StringBuilder();
                    foreach (EyouSoft.Model.TourStructure.AreaStatInfo AreaStaModel in TourByAreaCount)
                    {
                        strTour.Append("<a class=\"lan14\" href=\"/routeagency/scatteredfightplan.aspx?lineId=" + AreaStaModel.AreaId.ToString() + "\" onclick=\"topTab.open($(this).attr('href'),'我的散拼计划');return false;\">" + AreaStaModel.AreaName + "(" + AreaStaModel.Number.ToString() + ")</a>");
                    }
                    this.lblRoutePlanCount.Text = strTour.ToString();
                }

                dic = iorderBll.GetOrderBusinessCount(UserInfoModel.CompanyID);
                if (dic != null)
                {
                    //获得专线订单信息
                    if (dic.ContainsKey("有效散客订单") && dic.ContainsKey("散客订单未处理") && dic.ContainsKey("散客预留待付款") && dic.ContainsKey("散客订单已确认"))
                    {
                        this.lblRouteOrderFrist.Text  = "有效散客订单:<a href=\"/routeagency/allfitorders.aspx\" class=\"ff0000\" onclick=\"topTab.open($(this).attr('href'),'所有散拼订单');return false;\"><b>" + dic["有效散客订单"].ToString() + "单</b></a>,";
                        this.lblRouteOrderFrist.Text += "其中未处理<a href=\"/routeagency/allfitorders.aspx?statue=2\" class=\"ff0000\" onclick=\"topTab.open($(this).attr('href'),'所有散拼订单');return false;\"><b>" + dic["散客订单未处理"].ToString() + "单</b></a>,";
                        this.lblRouteOrderFrist.Text += "预留待付款<a href=\"/routeagency/allfitorders.aspx?statue=3\" class=\"ff0000\" onclick=\"topTab.open($(this).attr('href'),'所有散拼订单');return false;\"><b>" + dic["散客预留待付款"].ToString() + "单</b></a>,";
                        this.lblRouteOrderFrist.Text += "已确认:<a href=\"/routeagency/allfitorders.aspx?statue=6\" onclick=\"topTab.open($(this).attr('href'),'所有散拼订单');return false;\"><b>" + dic["散客订单已确认"].ToString() + "单</b></a>";
                    }

                    if (dic.ContainsKey("团队订单") && dic.ContainsKey("团队订单未处理") && dic.ContainsKey("团队订单已确认"))
                    {
                        this.lblRouteOrderSecond.Text  = "有效团队订单:共有<a href=\"/teamservice/teamorders.aspx?routeSource=1\" class=\"ff0000\" onclick=\"topTab.open($(this).attr('href'),'团队订单管理');return false;\"><b>" + dic["团队订单"].ToString() + "单</b></a>,";
                        this.lblRouteOrderSecond.Text += "其中未处理<a href=\"/teamservice/teamorders.aspx?routeSource=1&status=0\" class=\"ff0000\" onclick=\"topTab.open($(this).attr('href'),'团队订单管理');return false;\"><b>" + dic["团队订单未处理"].ToString() + "单</b></a>,";
                        this.lblRouteOrderSecond.Text += " 已确认:<a href=\"/teamservice/teamorders.aspx?routeSource=1&status=1\" onclick=\"topTab.open($(this).attr('href'),'团队订单管理');return false;\"><b>" + dic["团队订单已确认"] + "单</b></a>";
                    }

                    if (dic.ContainsKey("历史订单") && dic.ContainsKey("成人数") && dic.ContainsKey("儿童数"))
                    {
                        this.lblRouteOrderThird.Text = "历史订单:共计<a class=\"ff0000\"><b>" + dic["历史订单"].ToString() + "单</b></a>,人数" + dic["成人数"].ToString() + "大" + dic["儿童数"].ToString() + "小";
                    }
                }

                //获得专线商的访问数量
                this.lblBrowseUserCount.Text = TourBll.GetVisitedNumberByCompany(UserInfoModel.CompanyID).ToString();
            }
            #endregion

            #region 地接提醒
            if (IsLocalAgency)
            {
                //获得地接线路区域信息

                IList <EyouSoft.Model.TourStructure.AreaStatInfo> routeByAreaCount = routeBll.GetCurrentUserRouteByAreaStats();
                if (routeByAreaCount != null && routeByAreaCount.Count > 0)
                {
                    StringBuilder strTour = new StringBuilder();
                    foreach (EyouSoft.Model.TourStructure.AreaStatInfo AreaStaModel in routeByAreaCount)
                    {
                        strTour.Append("<a href='/routeagency/routemanage/routeview.aspx?routeSource=2' onclick=\"topTab.open($(this).attr('href'),'我的线路库',{isRefresh:false,data:{AreaId:" + AreaStaModel.AreaId + "}});return false;\" class='lan14'>" + AreaStaModel.AreaName + "(" + AreaStaModel.Number + ")</a><br />");
                    }
                    this.lblLocalRoute.Text = strTour.ToString();
                }

                dic = iorderBll.GetOrderGroundCount(UserInfoModel.CompanyID);
                if (dic != null)
                {
                    //获得地接团队订单信息
                    if (dic.ContainsKey("有效团队订单") && dic.ContainsKey("团队订单未处理") && dic.ContainsKey("团队订单已处理"))
                    {
                        this.lblLocalOrderCount.Text  = "有效团队订单:共有<a href=\"/teamservice/teamorders.aspx?routeSource=2\" class=\"ff0000\" onclick=\"topTab.open($(this).attr('href'),'团队订单管理');return false;\"><b>" + dic["有效团队订单"].ToString() + "单</b></a>,";
                        this.lblLocalOrderCount.Text += "其中未处理<a href=\"/teamservice/teamorders.aspx?routeSource=2&status=0\" class=\"ff0000\" onclick=\"topTab.open($(this).attr('href'),'团队订单管理');return false;\"><b>" + dic["团队订单未处理"].ToString() + "单</b></a>,";
                        this.lblLocalOrderCount.Text += "已确认:<a href=\"/teamservice/teamorders.aspx?routeSource=2&status=1\" onclick=\"topTab.open($(this).attr('href'),'团队订单管理');return false;\"><b>" + dic["团队订单已处理"].ToString() + "单</b></a>";
                    }
                }
            }
            #endregion

            #region 景区提醒
            if (IsSightAgency)
            {
                //获得将过期景点门票
                this.lblScenicCountOver.Text = "您当前共有<a href=\"/ScenicManage/MyScenice.aspx\" onclick=\"topTab.open($(this).attr('href'),'我的景区');return false;\">" + EyouSoft.BLL.ScenicStructure.BScenicTickets.CreateInstance().GetExpireTickets(UserInfoModel.CompanyID).ToString() + "个景区门票</a>将于1周后到期,请及时更新计划,以方便旅行社查询";
                int recordCount = 0;
                IList <EyouSoft.Model.ScenicStructure.MScenicArea> scenicList = EyouSoft.BLL.ScenicStructure.BScenicArea.CreateInstance().GetListAndTickets(3, 1, ref recordCount, null);

                if (scenicList != null && scenicList.Count > 0)
                {
                    string sbScenic = "";
                    for (int i = 0; i < scenicList.Count; i++)
                    {
                        sbScenic += "<a class=\"lan14\" href=\"/ScenicManage/MyScenice.aspx\" onclick=\"topTab.open($(this).attr('href'),'我的景区');return false;\">" + scenicList[i].ScenicName + "</a>&nbsp;&nbsp;";
                    }
                    this.lblScenicCount.Text = sbScenic;
                }
            }
            #endregion
            #endregion
        }
Beispiel #21
0
        /// <summary>
        /// 同步修改其他平台公司信息  zwc  2011-04-07
        /// </summary>
        /// <param name="PlamCompanyId">公司Id</param>
        /// <param name="PlamUserId">用户Id,不传值不修改</param>
        public static void SyncUpdateCompany(string PlamCompanyId, string PlamUserId)
        {
            if (string.IsNullOrEmpty(PlamCompanyId))
            {
                return;
            }

            EyouSoft.Model.CompanyStructure.CompanyInfo model = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(PlamCompanyId);
            if (model == null)
            {
                return;
            }

            #region  步修改其他平台公司信息  zwc  2011-04-07

            if (EyouSoft.OpenRelation.Utils.GetIsSync())
            {
                //同步修改其他平台公司信息
                EyouSoft.OpenRelation.Utils.CreateRequest(
                    new EyouSoft.OpenRelation.Model.MRequestInfo()
                {
                    AppKey            = EyouSoft.OpenRelation.Utils.GetAppKey(),
                    RequestUriString  = EyouSoft.OpenRelation.Utils.GetMiddlewareURI(),
                    RequestSystemType = EyouSoft.OpenRelation.Model.SystemType.Platform,
                    InstructionType   = EyouSoft.OpenRelation.Model.InstructionType.UpdateCompany,
                    InstructionCode   = EyouSoft.OpenRelation.Utils.ConvertJSON <EyouSoft.OpenRelation.Model.MCompanyInfo>(new EyouSoft.OpenRelation.Model.MCompanyInfo()
                    {
                        CompanyName       = model.CompanyName,
                        ContactName       = model.ContactInfo.ContactName,
                        ContactTelephone  = model.ContactInfo.Tel,
                        ContactMobile     = model.ContactInfo.Mobile,
                        ContactFax        = model.ContactInfo.Fax,
                        Address           = model.CompanyAddress,
                        Domain            = model.WebSite,
                        PlatformCompanyId = model.ID,
                        ContactEmail      = model.ContactInfo.Email,
                        ContactMSN        = model.ContactInfo.MSN,
                        ContactQQ         = model.ContactInfo.QQ,
                        ContactGender     = model.ContactInfo.ContactSex == EyouSoft.Model.CompanyStructure.Sex.男 ? EyouSoft.OpenRelation.Model.Gender.G : EyouSoft.OpenRelation.Model.Gender.L,
                        SystemType        = EyouSoft.OpenRelation.Model.SystemType.Platform
                                            //SystemCompanyType = EyouSoft.OpenRelation.Model.SystemCompanyType.
                    })
                });

                #region  步修改管理员信息

                if (!string.IsNullOrEmpty(PlamUserId))
                {
                    //同步修改其他平台用户信息
                    EyouSoft.Model.CompanyStructure.CompanyUser UserModel = EyouSoft.BLL.CompanyStructure.CompanyUser.CreateInstance().GetModel(PlamUserId);
                    if (UserModel != null)
                    {
                        EyouSoft.OpenRelation.Utils.CreateRequest(
                            new EyouSoft.OpenRelation.Model.MRequestInfo()
                        {
                            AppKey            = EyouSoft.OpenRelation.Utils.GetAppKey(),
                            RequestUriString  = EyouSoft.OpenRelation.Utils.GetMiddlewareURI(),
                            RequestSystemType = EyouSoft.OpenRelation.Model.SystemType.Platform,
                            InstructionType   = EyouSoft.OpenRelation.Model.InstructionType.UpdateUser,
                            InstructionCode   = EyouSoft.OpenRelation.Utils.ConvertJSON <EyouSoft.OpenRelation.Model.MUserInfo>(new EyouSoft.OpenRelation.Model.MUserInfo()
                            {
                                UserName          = UserModel.UserName.Trim(),
                                Password          = UserModel.PassWordInfo.NoEncryptPassword.Trim(),
                                RealName          = UserModel.ContactInfo.ContactName,
                                Gender            = UserModel.ContactInfo.ContactSex == EyouSoft.Model.CompanyStructure.Sex.男 ? EyouSoft.OpenRelation.Model.Gender.G : EyouSoft.OpenRelation.Model.Gender.L,
                                Mobile            = UserModel.ContactInfo.Mobile,
                                Telephone         = UserModel.ContactInfo.Tel,
                                Fax               = UserModel.ContactInfo.Fax,
                                Email             = UserModel.ContactInfo.Email,
                                MSN               = UserModel.ContactInfo.MSN,
                                QQ                = UserModel.ContactInfo.QQ,
                                PlatformCompanyId = UserModel.CompanyID,
                                PlatformUserId    = UserModel.ID,
                                SystemType        = EyouSoft.OpenRelation.Model.SystemType.Platform
                            })
                        });
                    }
                }

                #endregion
            }

            #endregion
        }
Beispiel #22
0
        /// <summary>
        /// 页面初始化方法
        /// </summary>
        /// <param name="tourID"></param>
        /// <param name="adultCount"></param>
        /// <param name="childCount"></param>
        /// <param name="contact"></param>
        /// <param name="tel"></param>
        private void PageInit(string orderID)
        {
            EyouSoft.IBLL.NewTourStructure.ITourOrder orderBll = EyouSoft.BLL.NewTourStructure.BTourOrder.CreateInstance();

            EyouSoft.Model.NewTourStructure.MTourOrder model = orderBll.GetModel(orderID);

            if (model != null)
            {
                EyouSoft.IBLL.NewTourStructure.IPowderList  tourBll   = EyouSoft.BLL.NewTourStructure.BPowderList.CreateInstance();
                EyouSoft.Model.NewTourStructure.MPowderList tourModel = tourBll.GetModel(model.TourId);

                this.lblRouteName.Text   = "<a href='/PrintPage/LineTourInfo.aspx?RouteID=" + model.RouteId + "' target='_blank'>" + model.RouteName + "</a>";
                this.lblLeaveDate.Text   = model.LeaveDate.ToString("yyyy-MM-dd") + "(" + Utils.GetDayOfWeek((int)model.LeaveDate.DayOfWeek) + ") ";//出团日期(周几)
                this.lblCount.Text       = tourModel.MoreThan.ToString();
                this.lblTourState.Text   = tourModel.PowderTourStatus.ToString();
                this.lblCompanyName.Text = " <a  target=\"_blank\" href=\"" + Utils.GetShopUrl(tourModel.Publishers) + "\">" + tourModel.PublishersName + "</a>";
                #region 获得专线公司信息
                EyouSoft.Model.CompanyStructure.CompanyInfo comModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(tourModel.Publishers);
                if (comModel != null && comModel.ContactInfo != null)
                {
                    this.lblMq.Text = Utils.GetMQ(comModel.ContactInfo.MQ);
                    this.lblQQ.Text = Utils.GetQQ(comModel.ContactInfo.QQ);
                }

                #endregion
                this.txtAddPrice.Value            = model.Add.ToString("0.00");
                this.txtReductPrice.Value         = model.Reduction.ToString("0.00");
                this.lblLeaveCityandTracffic.Text = tourModel.StartTraffic + " " + tourModel.StartCityName; //出发交通和城市
                this.lbEndCityandTracffic.Text    = tourModel.EndTraffic + " " + tourModel.EndCityName;     //返程交通和城市
                //this.lbPrice_d.Text = tourModel.AdultPrice.ToString("F0");
                this.lbEnddate.Text      = tourModel.EndDate;
                this.lbLeavedate.Text    = tourModel.StartDate;
                this.lblOrder.Text       = model.OrderNo;
                this.lblMsg.Text         = tourModel.SetDec;
                this.lblAllMsg.Text      = tourModel.TeamLeaderDec;
                this.txtContact.Value    = model.VisitorContact;
                this.txtConTactTel.Value = model.VisitorTel;
                this.txtFzr.Value        = model.TravelContact;
                this.txtFzrTel.Value     = model.TravelTel;
                this.txtAdultCount.Value = model.AdultNum.ToString();
                this.txtChildCount.Value = model.ChildrenNum.ToString();
                this.txtOtherCount.Value = model.SingleRoomNum.ToString();
                this.lblAddDate.Text     = model.IssueTime.ToString("yyyy-MM-dd") + "&nbsp" + model.OperatorName;
                this.txtRemark.Value     = model.TravelNotes;
                this.lblCusRemark.Text   = model.VisitorNotes;

                #region 团队 价格信息
                //市场价
                this.lblRetailAdultPrice.Text    = Utils.FilterEndOfTheZeroDecimal(model.PersonalPrice);
                this.lblRetailChildrenPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.ChildPrice);
                this.lblMarketPrice.Text         = Utils.FilterEndOfTheZeroDecimal(model.MarketPrice);

                //结算价
                this.lblSettlementAudltPrice.Text    = Utils.FilterEndOfTheZeroDecimal(model.SettlementAudltPrice);
                this.lblSettlementChildrenPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.SettlementChildrenPrice);
                #endregion

                //处理总金额
                //市场价总价
                this.lblReailPriceAll.Text = Utils.FilterEndOfTheZeroDecimal(model.TotalSalePrice);
                //结算总价
                this.lblSettlePriceAll.Text = Utils.FilterEndOfTheZeroDecimal(model.TotalSettlementPrice);

                this.OrderCustomer1.TourOrderCustomer = model.Customers;

                #region 处理订单状态和支付状态
                this.pnlSave.Visible  = false;
                this.pnlCanel.Visible = false;
                switch (model.OrderStatus)
                {
                case EyouSoft.Model.NewTourStructure.PowderOrderStatus.组团社待处理:
                case EyouSoft.Model.NewTourStructure.PowderOrderStatus.组团社已阅:
                case EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商待处理:
                    this.lblOrderState.Text = "专线待处理";
                    this.pnlSave.Visible    = true;
                    this.pnlCanel.Visible   = true;
                    break;

                case EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商预留:
                    this.lblOrderState.Text = "专线预留,留位日期:" + model.SaveDate == null ? "" : Convert.ToDateTime(model.SaveDate).ToString("yyyy-MM-dd");
                    this.pnlCanel.Visible   = true;
                    break;

                case EyouSoft.Model.NewTourStructure.PowderOrderStatus.预留过期:
                    this.lblOrderState.Text = "留位过期";
                    this.pnlCanel.Visible   = true;
                    break;

                case EyouSoft.Model.NewTourStructure.PowderOrderStatus.结单:
                    this.lblOrderState.Text = "已结单";
                    break;

                case EyouSoft.Model.NewTourStructure.PowderOrderStatus.取消:
                    this.lblOrderState.Text = "已取消";
                    break;

                case EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商已确定:
                    this.lblOrderState.Text = "专线已确定";
                    this.pnlCanel.Visible   = true;
                    break;
                }


                this.pnlLitPay.Visible  = false;
                this.pnlAllPay.Visible  = false;
                this.pnlTuiKuan.Visible = false;
                switch (model.PaymentStatus)
                {
                case EyouSoft.Model.NewTourStructure.PaymentStatus.游客待支付:
                case EyouSoft.Model.NewTourStructure.PaymentStatus.游客未支付:
                    this.lblPayState.Text  = "待支付";
                    this.pnlLitPay.Visible = true;
                    this.pnlAllPay.Visible = true;
                    break;

                case EyouSoft.Model.NewTourStructure.PaymentStatus.游客已支付定金:
                    this.lblPayState.Text  = "已支付定金";
                    this.pnlAllPay.Visible = true;
                    break;

                case EyouSoft.Model.NewTourStructure.PaymentStatus.游客已支付全款:
                    this.lblPayState.Text = "已支付全款";
                    break;

                case EyouSoft.Model.NewTourStructure.PaymentStatus.组团社已付定金:
                    this.lblPayState.Text = "专线已收定金";
                    break;

                case EyouSoft.Model.NewTourStructure.PaymentStatus.组团社已付全款:
                    this.lblPayState.Text = "专线已收全款";
                    break;

                case EyouSoft.Model.NewTourStructure.PaymentStatus.结账:
                    this.lblPayState.Text = "已付全款";
                    break;

                case EyouSoft.Model.NewTourStructure.PaymentStatus.申请退款:
                    this.lblPayState.Text   = "申请退款";
                    this.pnlTuiKuan.Visible = true;
                    break;

                case EyouSoft.Model.NewTourStructure.PaymentStatus.已退款:
                    this.lblPayState.Text = "已退款";
                    break;
                }
                #endregion
            }
        }
Beispiel #23
0
        private void InitPage()
        {
            EyouSoft.IBLL.TourStructure.ITour     Ibll  = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
            EyouSoft.Model.TourStructure.TourInfo model = Ibll.GetTourInfo(TourID);
            if (model != null)
            {
                #region 获取所属公司信息
                EyouSoft.IBLL.CompanyStructure.ICompanyInfo ICompanyInfobll  = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance();
                EyouSoft.Model.CompanyStructure.CompanyInfo companyInfoModel = ICompanyInfobll.GetModel(model.CompanyID);
                CompanyName      = companyInfoModel.CompanyName;
                CompanyAddress   = companyInfoModel.CompanyAddress;
                License          = companyInfoModel.License;
                ICompanyInfobll  = null;
                companyInfoModel = null;
                #endregion
                List <EyouSoft.Model.TourStructure.TourPriceDetail> priceList = new List <EyouSoft.Model.TourStructure.TourPriceDetail>();
                priceList = (List <EyouSoft.Model.TourStructure.TourPriceDetail>)model.TourPriceDetail;
                #region 团队报价等级处理
                //用于数据绑定
                List <CPriceDetail> BindPriceList = new List <CPriceDetail>();
                CPriceDetail        cModel        = null;
                //该团队的报价等级明细
                priceList.ForEach(delegate(EyouSoft.Model.TourStructure.TourPriceDetail item)
                {
                    cModel = new CPriceDetail();
                    cModel.PriceStandName = item.PriceStandName;
                    ((List <EyouSoft.Model.TourStructure.TourPriceCustomerLeaveDetail>) item.PriceDetail).ForEach(delegate(EyouSoft.Model.TourStructure.TourPriceCustomerLeaveDetail itemPriceLeave)
                    {
                        switch (itemPriceLeave.CustomerLevelType)
                        {
                        case EyouSoft.Model.CompanyStructure.CustomerLevelType.行:
                            cModel.AdultPrice    = itemPriceLeave.AdultPrice;
                            cModel.ChildrenPrice = itemPriceLeave.AdultPrice;
                            break;

                        case EyouSoft.Model.CompanyStructure.CustomerLevelType.单房差:
                            cModel.SingleRoom = itemPriceLeave.ChildrenPrice;
                            break;
                        }
                        ;
                    });
                    BindPriceList.Add(cModel);
                });
                BindPriceList = null;
                cModel        = null;
                this.rptTourPriceDetail.DataSource = BindPriceList;
                this.rptTourPriceDetail.DataBind();
                #endregion
                if (((int)model.ReleaseType) == 0)
                {
                    rptStandardPlan.DataSource = model.StandardPlan;
                    rptStandardPlan.DataBind();
                }
                else
                {
                    QuickPlanContent = model.QuickPlan;
                }
            }
            Ibll  = null;
            model = null;
        }
Beispiel #24
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void InitPage()
        {
            EyouSoft.IBLL.TourStructure.ITour     Ibll  = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
            EyouSoft.Model.TourStructure.TourInfo model = Ibll.GetTourInfo(TourID);
            if (model != null)
            {
                #region 获取所属公司信息
                if (this.IsLogin)
                {
                    CompanyID      = this.SiteUserInfo.CompanyID;
                    TourContactTel = this.SiteUserInfo.ContactInfo.Tel;
                    TourContact    = this.SiteUserInfo.ContactInfo.ContactName;
                    EyouSoft.IBLL.CompanyStructure.ICompanyInfo ICompanyInfobll  = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance();
                    EyouSoft.Model.CompanyStructure.CompanyInfo companyInfoModel = ICompanyInfobll.GetModel(this.SiteUserInfo.CompanyID);
                    CompanyName      = companyInfoModel.CompanyName;
                    CompanyAddress   = companyInfoModel.CompanyAddress;
                    License          = companyInfoModel.License;
                    ICompanyInfobll  = null;
                    companyInfoModel = null;
                }
                else
                {
                    EyouSoft.IBLL.CompanyStructure.ICompanyInfo ICompanyInfobll  = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance();
                    EyouSoft.Model.CompanyStructure.CompanyInfo companyInfoModel = ICompanyInfobll.GetModel(model.CompanyID);
                    CompanyName      = companyInfoModel.CompanyName;
                    CompanyAddress   = companyInfoModel.CompanyAddress;
                    License          = companyInfoModel.License;
                    TourContactTel   = companyInfoModel.ContactInfo.Tel;
                    TourContact      = companyInfoModel.ContactInfo.ContactName;
                    ICompanyInfobll  = null;
                    companyInfoModel = null;
                }
                #endregion

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

                #region 团队相关信息
                TourDays  = model.TourDays;
                RouteName = model.RouteName;
                if (model.ReleaseType == EyouSoft.Model.TourStructure.ReleaseType.Standard)//标准发布
                {
                    if (!string.IsNullOrEmpty(model.LeaveTraffic))
                    {
                        ltrTraffic.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.LeaveTraffic);
                    }
                    else
                    {
                        Tr_Traffic.Visible = false;
                    }
                    if (!string.IsNullOrEmpty(model.CollectionContect))
                    {
                        ltrCollectionContect.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.CollectionContect);
                    }
                    else
                    {
                        CollectionContect.Visible = false;
                    }
                    if (!string.IsNullOrEmpty(model.MeetTourContect))
                    {
                        ltrMeetTourContect.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.MeetTourContect);
                    }
                    else
                    {
                        MeetTourContect.Visible = false;
                    }

                    ResideContent       = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.ResideContent);       //住宿
                    DinnerContent       = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.DinnerContent);       //用餐
                    SightContent        = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.SightContent);        //景点
                    CarContent          = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.CarContent);          //用车
                    GuideContent        = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.GuideContent);        //导游
                    TrafficContent      = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.TrafficContent);      //往返交通
                    IncludeOtherContent = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.IncludeOtherContent); //其它
                    NotContainService   = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.IncludeOtherContent); //其它说明
                    //备注
                    SpeciallyNotice = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.SpeciallyNotice);

                    rptTeamNotice.DataSource = model.StandardPlan;
                    rptTeamNotice.DataBind();
                }
                else//快速发布
                {
                    pnlQuickPlan.Visible      = true;
                    Tr_Traffic.Visible        = false;
                    CollectionContect.Visible = false;
                    MeetTourContect.Visible   = false;
                    pnlNotQuickPlan.Visible   = false;
                    QuickPlanContent          = model.QuickPlan;
                }
                #region 盖章信息
                //if(this.SiteUserInfo.CompanyID==model.se)
                if (!string.IsNullOrEmpty(OrderID))
                {
                    string BuyCompanyID = EyouSoft.BLL.TourStructure.TourOrder.CreateInstance().GetOrderModel(OrderID).BuyCompanyID;
                    if (this.SiteUserInfo.CompanyID == BuyCompanyID)
                    {
                        string imgPath = EyouSoft.BLL.TourStructure.CompanyContractSignet.CreateInstance().GetGroupAdviceSignet(OrderID);
                        if (!string.IsNullOrEmpty(imgPath))
                        {
                            imgBuyCompany.Visible  = true;
                            imgBuyCompany.ImageUrl = Domain.FileSystem + imgPath;
                            btnCancelStamp.Visible = true;
                            btnToStamp.Visible     = false;
                        }
                    }
                    else
                    {
                        this.btnCancelStamp.Visible = false;
                        this.btnToStamp.Visible     = false;
                    }
                }
                else
                {//无订单号传入时,盖章隐藏
                    this.btnCancelStamp.Visible = false;
                    this.btnToStamp.Visible     = false;
                }
                //if (!this.CheckGrant(EyouSoft.Common.TravelPermission.系统设置_盖章) && this.SiteUserInfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.组团))
                if (this.SiteUserInfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.组团))
                {
                    this.btnCancelStamp.Visible = false;
                    this.btnToStamp.Visible     = false;
                }
                #endregion
                #endregion
            }
            Ibll  = null;
            model = null;
        }
Beispiel #25
0
 /// <summary>
 /// 新增
 /// </summary>
 /// <param name="model">公司信息实体</param>
 /// <returns></returns>
 public bool Add(EyouSoft.Model.CompanyStructure.CompanyInfo model)
 {
     return(idal.Add(model));
 }
Beispiel #26
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void InitPage(bool isShow)
        {
            #region 根据订单号获取相关信息
            //EyouSoft.Model.TourStructure.TourOrder
            EyouSoft.IBLL.TourStructure.ITourOrder IOrderbll  = EyouSoft.BLL.TourStructure.TourOrder.CreateInstance();
            EyouSoft.Model.TourStructure.TourOrder OrderModel = IOrderbll.GetOrderModel(OrderID);
            if (OrderModel != null)
            {
                BuyCompanyID  = OrderModel.BuyCompanyID;
                SellCompanyID = OrderModel.CompanyID;
                RouteName     = OrderModel.RouteName;

                if (!string.IsNullOrEmpty(OrderModel.LeaveTraffic))
                {
                    ltrTraffic.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(OrderModel.LeaveTraffic);
                }
                else
                {
                    Tr_Traffic.Visible = false;
                }

                ComfirmTime        = DateTime.Now.ToShortDateString();
                AdultPrice         = OrderModel.PersonalPrice.ToString("F2");
                this.ChildrenPrice = OrderModel.ChildPrice.ToString("F2");
                SumPrice           = OrderModel.SumPrice.ToString("F2");
                AdultNum           = OrderModel.AdultNumber;
                ChildrenNum        = OrderModel.ChildNumber;
            }
            else
            {
                return;
            }
            #endregion

            #region 游客信息
            if (OrderModel.TourOrderCustomer != null && OrderModel.TourOrderCustomer.Count > 0)
            {
                IList <EyouSoft.Model.TourStructure.TourOrderCustomer> OrderCustomerList = OrderModel.TourOrderCustomer;
                this.rptCustomers.DataSource = OrderCustomerList;
                this.rptCustomers.DataBind();
                if (rptCustomers.Items.Count < 1)
                {
                    this.tblCustomers.Visible = false;
                }
            }
            #endregion

            #region 专线公司信息
            EyouSoft.Model.CompanyStructure.CompanyInfo SellCompany = new EyouSoft.Model.CompanyStructure.CompanyInfo();
            SellCompany = this.GetCompanyInfo(SellCompanyID);
            if (SellCompany != null)
            {
                txtSellCompanyName.Value = SellCompany.CompanyName;
                txtSellConnectName.Value = SellCompany.ContactInfo.ContactName;
                txtSellConnectFax.Value  = SellCompany.ContactInfo.Fax;
                txtSellConnectTel.Value  = SellCompany.ContactInfo.Tel;
            }
            #endregion

            #region 组团公司信息
            EyouSoft.Model.CompanyStructure.CompanyInfo BuyCompany = new EyouSoft.Model.CompanyStructure.CompanyInfo();
            BuyCompany = this.GetCompanyInfo(BuyCompanyID);
            if (BuyCompany != null)
            {
                txtBuyCompanyName.Value = BuyCompany.CompanyName;
                txtBuyConnectName.Value = BuyCompany.ContactInfo.ContactName;
                txtBuyConnectFax.Value  = BuyCompany.ContactInfo.Fax;
                txtBuyConnectTel.Value  = BuyCompany.ContactInfo.Tel;
            }
            #endregion

            if (this.IsLogin)
            {
                CompanyID = this.SiteUserInfo.CompanyID;
                ltrSellCompanyName.Text = this.SiteUserInfo.CompanyName;
            }

            #region 银行帐号信息
            EyouSoft.IBLL.CompanyStructure.IBankAccount         IbankBll = EyouSoft.BLL.CompanyStructure.BankAccount.CreateInstance();
            IList <EyouSoft.Model.CompanyStructure.BankAccount> bankList = IbankBll.GetList(SellCompanyID);
            if (bankList != null && bankList.Count > 0)
            {
                EyouSoft.Model.CompanyStructure.BankAccount CompanyBankAccount = bankList.FirstOrDefault(BankItem =>
                {
                    return(BankItem.AccountType == EyouSoft.Model.CompanyStructure.BankAccountType.公司);
                });
                if (CompanyBankAccount != null)
                {
                    ltrSellCompanyName.Text    = CompanyBankAccount.BankAccountName;
                    ltrBuyComapnyBankName.Text = CompanyBankAccount.BankName;
                    ltrBuyComapnyBankNo.Text   = CompanyBankAccount.AccountNumber;
                }

                rptBankAccount.DataSource = ((List <EyouSoft.Model.CompanyStructure.BankAccount>)bankList).FindAll(BankItem =>
                {
                    return(BankItem.AccountType == EyouSoft.Model.CompanyStructure.BankAccountType.个人);
                });
                rptBankAccount.DataBind();
                IbankBll           = null;
                bankList           = null;
                CompanyBankAccount = null;
            }
            #endregion

            #region 团队信息
            EyouSoft.IBLL.TourStructure.ITour     Ibll  = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
            EyouSoft.Model.TourStructure.TourInfo model = Ibll.GetTourInfo(TourID);
            if (model != null)
            {
                RouteName = model.RouteName;
                TourDays  = model.TourDays;
                LeaveDate = model.LeaveDate;
                if (model.ReleaseType == EyouSoft.Model.TourStructure.ReleaseType.Standard)//标准发布
                {
                    if (!string.IsNullOrEmpty(model.MeetTourContect))
                    {
                        ltrMeetTourContect.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.MeetTourContect);
                    }
                    else
                    {
                        tr_MeetTourContect.Visible = false;
                    }
                    if (!string.IsNullOrEmpty(model.CollectionContect))
                    {
                        ltrCollectionContect.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.CollectionContect);
                    }
                    else
                    {
                        tr_CollectionContect.Visible = false;
                    }
                    ResideContent       = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.ResideContent);       //住宿
                    DinnerContent       = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.DinnerContent);       //用餐
                    SightContent        = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.SightContent);        //景点
                    CarContent          = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.CarContent);          //用车
                    GuideContent        = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.GuideContent);        //导游
                    TrafficContent      = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.TrafficContent);      //往返交通
                    IncludeOtherContent = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.IncludeOtherContent); //其它
                    NotContainService   = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.NotContainService);   //其它说明
                    //备注
                    SpeciallyNotice = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.SpeciallyNotice);
                    //行程信息
                    rptStandardPlan.DataSource = model.StandardPlan;
                    rptStandardPlan.DataBind();
                }
                else//快速发布
                {
                    tr_MeetTourContect.Visible   = false;
                    tr_CollectionContect.Visible = false;
                    pnlQuickPlan.Visible         = true;
                    pnlNotQuickPlan.Visible      = false;
                    QuickPlanContent             = model.QuickPlan;
                }
            }
            Ibll       = null;
            model      = null;
            IOrderbll  = null;
            OrderModel = null;
            #endregion

            #region 公司盖章信息
            if (!string.IsNullOrEmpty(OrderID))
            {
                //判断是否属于该订单的专线商或组团社
                if (this.SiteUserInfo.CompanyID == BuyCompanyID || this.SiteUserInfo.CompanyID == SellCompanyID)
                {
                    string[] imgPath = EyouSoft.BLL.TourStructure.CompanyContractSignet.CreateInstance().GetConfirmationSignet(OrderID);
                    if (imgPath.Length > 0)
                    {
                        imgBuyCompany.ImageUrl = Domain.FileSystem + imgPath[0];
                        if (!string.IsNullOrEmpty(imgPath[0]))
                        {
                            imgBuyCompany.Visible = true;
                        }
                        if (!string.IsNullOrEmpty(imgPath[0]) && isTourCompany)
                        {
                            this.btnCancelStamp.Visible = true;
                            this.btnToStamp.Visible     = false;
                        }
                        if (imgPath.Length > 1)
                        {
                            imgSellCompany.ImageUrl = Domain.FileSystem + imgPath[1];
                            if (!string.IsNullOrEmpty(imgPath[1]))
                            {
                                imgSellCompany.Visible = true;
                            }
                            if (!string.IsNullOrEmpty(imgPath[1]) && !isTourCompany)
                            {
                                this.btnCancelStamp.Visible = true;
                                this.btnToStamp.Visible     = false;
                            }
                        }
                    }
                }
                else
                {
                    this.btnCancelStamp.Visible = false;
                    this.btnToStamp.Visible     = false;
                }
            }
            else
            {
                this.btnCancelStamp.Visible = false;
                this.btnToStamp.Visible     = false;
            }
            //if (!this.CheckGrant(EyouSoft.Common.TravelPermission.系统设置_盖章))
            //{
            this.btnCancelStamp.Visible = false;
            this.btnToStamp.Visible     = false;
            //}
            if (!isShow)
            {
                imgSellCompany.Visible = false;
                imgBuyCompany.Visible  = false;
            }
            #endregion
            IOrderbll   = null;
            OrderModel  = null;
            SellCompany = null;
            BuyCompany  = null;
        }
Beispiel #27
0
        /// <summary>
        /// 页面初始化方法
        /// </summary>
        /// <param name="tourID"></param>
        /// <param name="adultCount"></param>
        /// <param name="childCount"></param>
        /// <param name="contact"></param>
        /// <param name="tel"></param>
        private void PageInit(string orderID)
        {
            EyouSoft.IBLL.NewTourStructure.ITourOrder orderBll = EyouSoft.BLL.NewTourStructure.BTourOrder.CreateInstance();

            EyouSoft.Model.NewTourStructure.MTourOrder model = orderBll.GetModel(orderID);

            if (model != null)
            {
                EyouSoft.IBLL.NewTourStructure.IPowderList  tourBll   = EyouSoft.BLL.NewTourStructure.BPowderList.CreateInstance();
                EyouSoft.Model.NewTourStructure.MPowderList tourModel = tourBll.GetModel(model.TourId);
                if (tourModel == null)
                {
                    Utils.Show("error");
                    return;
                }
                this.lblRouteName.Text   = "<a href='/PrintPage/LineTourInfo.aspx?RouteID=" + model.RouteId + "' target='_blank'>" + model.RouteName + "</a>";
                this.lblLeaveDate.Text   = model.LeaveDate.ToString("yyyy-MM-dd");
                this.lblCompanyName.Text = " <a  target=\"_blank\" href=\"" + Utils.GetCompanyDomain(model.Travel, EyouSoft.Model.CompanyStructure.CompanyType.组团) + "\">" + model.TravelName + "</a>";

                #region 获得组团公司信息
                EyouSoft.Model.CompanyStructure.CompanyInfo comModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(model.Travel);
                if (comModel != null && comModel.ContactInfo != null)
                {
                    this.lblMq.Text = Utils.GetMQ(comModel.ContactInfo.MQ);
                    this.lblQQ.Text = Utils.GetQQ(comModel.ContactInfo.QQ);
                }

                #endregion

                this.lblOrderNo.Text     = model.OrderNo;
                this.lblTourState.Text   = tourModel.PowderTourStatus.ToString();
                this.lblCount.Text       = tourModel.MoreThan.ToString();
                this.lblLeaveCity.Text   = tourModel.StartCityName;
                this.lblRemarks.Text     = model.BusinessNotes;
                this.lblCar.Text         = tourModel.StartTraffic + " &nbsp; " + tourModel.EndTraffic;
                this.lblLeaveCon.Text    = tourModel.StartDate;
                this.lblBackCon.Text     = tourModel.EndDate;
                this.lblMsg.Text         = tourModel.SetDec;
                this.lblAllMsg.Text      = tourModel.TeamLeaderDec;
                this.lblContact.Text     = model.VisitorContact;
                this.lblConTactTel.Text  = model.VisitorTel;
                this.lblFzr.Text         = model.TravelContact;
                this.lblFzrTel.Text      = model.TravelTel;
                this.txtAdultCount.Value = model.AdultNum.ToString();
                this.txtChildCount.Value = model.ChildrenNum.ToString();
                this.txtOtherCount.Value = model.SingleRoomNum.ToString();
                this.lblAddDate.Text     = model.IssueTime.ToString("yyyy-MM-dd") + "&nbsp" + model.OperatorName;

                #region 团队 价格信息
                //市场价
                this.lblRetailAdultPrice.Text    = Utils.FilterEndOfTheZeroDecimal(model.PersonalPrice);
                this.lblRetailChildrenPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.ChildPrice);
                this.lblMarketPrice.Text         = Utils.FilterEndOfTheZeroDecimal(model.MarketPrice);

                //结算价
                this.lblSettlementAudltPrice.Text    = Utils.FilterEndOfTheZeroDecimal(model.SettlementAudltPrice);
                this.lblSettlementChildrenPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.SettlementChildrenPrice);
                #endregion

                //处理总金额
                //市场价总价
                this.lblReailPriceAll.Text = Utils.FilterEndOfTheZeroDecimal(model.TotalSalePrice);
                //结算总价
                this.lblSettlePriceAll.Text = Utils.FilterEndOfTheZeroDecimal(model.TotalSettlementPrice);

                // this.OrderCustomer1.TourOrderCustomer = model.Customers;

                #region 处理订单状态和支付状态
                this.pnlSave.Visible    = false;
                this.pnlYuLiu.Visible   = false;
                this.pnlQueDing.Visible = false;
                this.pnlJieDan.Visible  = false;
                switch (model.OrderStatus)
                {
                case EyouSoft.Model.NewTourStructure.PowderOrderStatus.组团社待处理:
                case EyouSoft.Model.NewTourStructure.PowderOrderStatus.组团社已阅:
                case EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商待处理:
                    this.lblOrderState.Text = "未处理";
                    this.pnlSave.Visible    = true;
                    this.pnlYuLiu.Visible   = true;
                    this.pnlQueDing.Visible = true;
                    this.pnlJieDan.Visible  = true;
                    break;

                case EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商预留:
                    this.lblOrderState.Text = "专线预留,留位日期:" + Convert.ToDateTime(model.SaveDate).ToString("yyyy-MM-dd");
                    this.pnlSave.Visible    = true;
                    this.pnlQueDing.Visible = true;
                    this.pnlJieDan.Visible  = true;
                    break;

                case EyouSoft.Model.NewTourStructure.PowderOrderStatus.预留过期:
                    this.lblOrderState.Text = "留位过期";
                    this.pnlSave.Visible    = true;
                    this.pnlQueDing.Visible = true;
                    this.pnlJieDan.Visible  = true;
                    break;

                case EyouSoft.Model.NewTourStructure.PowderOrderStatus.结单:
                    this.lblOrderState.Text = "已结单";
                    break;

                case EyouSoft.Model.NewTourStructure.PowderOrderStatus.取消:
                    this.lblOrderState.Text = "已取消";

                    break;

                case EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商已确定:
                    this.lblOrderState.Text = "专线已确定";
                    this.pnlJieDan.Visible  = true;
                    break;
                }


                this.pnlLitPay.Visible = false;
                this.pnlAllPay.Visible = false;
                switch (model.PaymentStatus)
                {
                case EyouSoft.Model.NewTourStructure.PaymentStatus.游客待支付:
                case EyouSoft.Model.NewTourStructure.PaymentStatus.游客未支付:
                    this.lblPayState.Text  = "游客未付款";
                    this.pnlLitPay.Visible = true;
                    this.pnlAllPay.Visible = true;
                    break;

                case EyouSoft.Model.NewTourStructure.PaymentStatus.游客已支付定金:
                    this.lblPayState.Text  = "游客已支付定金";
                    this.pnlLitPay.Visible = true;
                    this.pnlAllPay.Visible = true;
                    break;

                case EyouSoft.Model.NewTourStructure.PaymentStatus.游客已支付全款:
                    this.lblPayState.Text  = "游客已支付全款";
                    this.pnlLitPay.Visible = true;
                    this.pnlAllPay.Visible = true;
                    break;

                case EyouSoft.Model.NewTourStructure.PaymentStatus.组团社已付定金:
                    this.lblPayState.Text  = "已收定金";
                    this.pnlAllPay.Visible = true;
                    this.pnlSave.Visible   = false;
                    break;

                case EyouSoft.Model.NewTourStructure.PaymentStatus.组团社已付全款:
                    this.lblPayState.Text = "已收全款";
                    this.pnlSave.Visible  = false;
                    break;

                case EyouSoft.Model.NewTourStructure.PaymentStatus.结账:
                    this.lblPayState.Text = "该单已结账";
                    this.pnlSave.Visible  = false;
                    break;

                case EyouSoft.Model.NewTourStructure.PaymentStatus.申请退款:
                    this.lblPayState.Text = "申请退款";
                    break;

                case EyouSoft.Model.NewTourStructure.PaymentStatus.已退款:
                    this.lblPayState.Text = "已退款";
                    break;
                }
                #endregion
            }
        }