Exemple #1
0
        /// <summary>
        /// 初始化团队信息
        /// </summary>
        /// <param name="tourID">团号</param>
        /// <param name="souceName">供应商名称</param>
        protected void DateInit()
        {
            string tourID    = Utils.GetQueryStringValue("tourId");
            string planID    = Utils.GetQueryStringValue("PlanId");
            string souceName = Utils.GetQueryStringValue("souceName");

            this.txtPayDate.Text = System.DateTime.Now.ToString("yyyy-MM-dd");
            if (!string.IsNullOrEmpty(tourID))
            {
                EyouSoft.Model.TourStructure.MTourBaseInfo tourInfo = new EyouSoft.BLL.TourStructure.BTour().GetTourInfo(tourID);
                if (tourInfo != null)
                {
                    _isPlaner             = tourInfo.TourPlaner.Where(m => m.PlanerId == this.SiteUserInfo.UserId).Count() > 0;
                    this.panView.Visible  = !UtilsCommons.GetTourStatusByTourID(tourInfo.TourStatus) && _isPlaner;
                    this.litTourCode.Text = tourInfo.TourCode;
                    if (tourInfo.SaleInfo != null)
                    {
                        this.litSellers.Text = tourInfo.SaleInfo.Name;
                    }
                }
                else
                {
                    this.panView.Visible = false;
                }
            }
            else
            {
                this.panView.Visible = false;
            }

            if (planID != "")
            {
                EyouSoft.BLL.FinStructure.BFinance bll = new EyouSoft.BLL.FinStructure.BFinance();
                //支出项目基本信息
                EyouSoft.Model.FinStructure.MPayRegister model = bll.GetPayRegisterBaseByPlanId(planID);
                if (model != null)
                {
                    if (model.PaymentType == EyouSoft.Model.EnumType.PlanStructure.Payment.导游现付)
                    {
                        this.panView.Visible = false;
                    }
                }
            }

            if (!string.IsNullOrEmpty(souceName))
            {
                this.litPrepaidCompany.Text = souceName;
            }
        }