Exemplo n.º 1
0
 /// <summary>
 /// 数据绑定
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void rpt_AlreadyStartingTeams_ItemDataBound(object sender, RepeaterItemEventArgs e)
 {
     if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
     {
         //序号赋值
         Literal ltr = (Literal)e.Item.FindControl("ltrXH");
         if (ltr != null)
         {
             ltr.Text = Convert.ToString(intPageSize * (intPageIndex - 1) + (e.Item.ItemIndex + 1));
         }
         EyouSoft.Model.TourStructure.TourBasicInfo model = (EyouSoft.Model.TourStructure.TourBasicInfo)e.Item.DataItem;
         #region 价格等级
         Repeater rptPriceInfo = (Repeater)e.Item.FindControl("rptPriceInfo");
         List <CompanyPriceDetail> priceList = getPriceInfo(model.ID);
         if (rptPriceInfo != null)
         {
             rptPriceInfo.DataSource = priceList;
             rptPriceInfo.DataBind();
         }
         priceList = null;
         #endregion
         //团队状态,推广状态名
         Literal ltrSateName = (Literal)e.Item.FindControl("ltrSateName");
         if (ltrSateName != null)
         {
             ltrSateName.Text = model.TourSpreadStateName;
         }
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// 数据绑定
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void rpt_NotStartingTeamsDetail_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                //序号赋值
                Literal ltr = (Literal)e.Item.FindControl("ltrXH");
                if (ltr != null)
                {
                    ltr.Text = Convert.ToString(intPageSize * (intPageIndex - 1) + (e.Item.ItemIndex + 1));
                }
                EyouSoft.Model.TourStructure.TourBasicInfo model = (EyouSoft.Model.TourStructure.TourBasicInfo)e.Item.DataItem;
                #region 价格等级
                Repeater rptPriceInfo = (Repeater)e.Item.FindControl("rptPriceInfo");
                List <CompanyPriceDetail> priceList = getPriceInfo(model.ID);
                if (rptPriceInfo != null)
                {
                    rptPriceInfo.DataSource = priceList;
                    rptPriceInfo.DataBind();
                }
                priceList = null;
                #endregion

                Literal ltrOrderDetail = (Literal)e.Item.FindControl("ltrOrderDetail");
                if (ltrOrderDetail != null)
                {
                    int HasIn = model.RealRemnantNumber;
                    if (HasIn > 0)
                    {
                        ltrOrderDetail.Text = "预订";
                    }
                }
                //团队状态,推广状态名
                Literal ltrSateName = (Literal)e.Item.FindControl("ltrSateName");
                if (ltrSateName != null)
                {
                    int state = (int)model.TourState;
                    if (state != 1)
                    {
                        switch (state)
                        {
                        case 0:
                            ltrSateName.Text = "<a class=\"tings\" href=\"javascript:void(0)\">停收</a>";
                            break;

                        case 2:
                            ltrSateName.Text = "<a class=\"keman\" href=\"javascript:void(0)\">客满</a>";
                            break;

                        case 3:
                            ltrSateName.Text = "<a class=\"tings\" href=\"javascript:void(0)\">停收</a>";
                            break;

                        case 4:
                            ltrSateName.Text = "<a class=\"keman\" href=\"javascript:void(0)\">客满</a>";
                            break;
                        }
                    }
                    else//收客时
                    {
                        ltrSateName.Text = model.TourSpreadStateName;
                    }
                }
            }
        }