示例#1
0
 protected void rpt_customers_ItemCreated(object sender, RepeaterItemEventArgs e)
 {
     if (e.Item.ItemIndex != -1)
     {
         EyouSoft.Model.CompanyStructure.CompanyInfo companyModel = e.Item.DataItem as EyouSoft.Model.CompanyStructure.CompanyInfo;
         if (companyModel != null)
         {
             Literal ltr          = e.Item.FindControl("ltrAreaName") as Literal;//绑定线路区域
             string  areaNameList = "";
             if (ltr != null)
             {
                 areaNameList = GetComapnyAreaList(companyModel.ID);
                 ltr.Text     = string.Format("<span title='{1}' style='cursor:pointer'>{0}</span>", Utils.GetText(areaNameList, 10, true), areaNameList);
             }
             Literal ltr1 = e.Item.FindControl("ltrLookTour") as Literal;//绑定产看产品(如果有线路区域则查看产品)
             if (areaNameList != "暂无" && areaNameList != "")
             {
                 ltr1.Text = GetLookTour(companyModel.ID);
             }
         }
     }
 }
示例#2
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 tourID, string adultCount, string childCount, string contact, string tel)
        {
            EyouSoft.IBLL.NewTourStructure.IPowderList tourBll = EyouSoft.BLL.NewTourStructure.BPowderList.CreateInstance();

            EyouSoft.Model.NewTourStructure.MPowderList model = tourBll.GetModel(tourID);

            if (model != null)
            {
                EyouSoft.IBLL.NewTourStructure.IRoute  routeBll   = EyouSoft.BLL.NewTourStructure.BRoute.CreateInstance();
                EyouSoft.Model.NewTourStructure.MRoute routeModel = routeBll.GetModel(model.RouteId);

                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     = model.MoreThan.ToString();
                if (model.RouteType == EyouSoft.Model.SystemStructure.AreaType.国际线)
                {
                    this.lbPrice_d.Text = model.AdultPrice.ToString("F0");
                }
                this.lblTourState.Text   = model.PowderTourStatus.ToString();
                this.lblCompanyName.Text = " <a  target=\"_blank\" href=\"" + Utils.GetShopUrl(model.Publishers) + "\">" + model.PublishersName + "</a>";


                #region 获得专线公司信息
                EyouSoft.Model.CompanyStructure.CompanyInfo comModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(model.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.lblLeaveCityandTraffic.Text = model.StartTraffic + " " + model.StartCityName + " ";
                this.lblEndCityandTraffic.Text   = model.EndTraffic + " " + model.EndCityName + " ";
                this.lbLeavedate.Text            = model.StartDate;
                this.lbEnddate.Text = model.EndDate;
                this.lblMsg.Text    = model.SetDec;
                this.lblAllMsg.Text = model.TeamLeaderDec;


                if (contact != "")
                {
                    this.txtFzr.Value = contact;
                }
                else
                {
                    this.txtFzr.Value = SiteUserInfo.ContactInfo.ContactName;
                }

                if (tel != "")
                {
                    this.txtFzrTel.Value = tel;
                }
                else
                {
                    this.txtFzrTel.Value = SiteUserInfo.ContactInfo.Tel;
                }

                if (adultCount != "")
                {
                    this.txtAdultCount.Value = adultCount;
                }
                if (childCount != "")
                {
                    this.txtChildCount.Value = childCount;
                }

                #region 团队 价格信息
                //市场价
                this.lblRetailAdultPrice.Text    = Utils.FilterEndOfTheZeroDecimal(model.RetailAdultPrice);
                this.lblRetailChildrenPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.RetailChildrenPrice);
                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(Utils.GetInt(adultCount) * model.RetailAdultPrice + Utils.GetInt(childCount) * model.RetailChildrenPrice);
                //结算总价
                this.lblSettlePriceAll.Text = Utils.FilterEndOfTheZeroDecimal(Utils.GetInt(adultCount) * model.SettlementAudltPrice + Utils.GetInt(childCount) * model.SettlementChildrenPrice);
            }
        }