private void BindRealTag(String SAID)
 {
     using (SATagMapDataAccess DataAccess = new SATagMapDataAccess()) {
         TagRepeater.DataSource = DataAccess.GetSATagMaps(SAID);
         TagRepeater.DataBind();
     }
 }
Exemple #2
0
        public override void DataBind()
        {
            TagRepeater.DataSource = KPI_RealTagDal.GetRealTags(UnitID);
            base.DataBind();
            Literal  lblRealID;
            CheckBox chkSelected;

            using (SATagMapDataAccess DataAccess = new SATagMapDataAccess()) {
                List <String>          TagIDList = DataAccess.GetSATagMaps(SAID).Select(p => p.RealID).ToList <String>();
                RepeaterItemCollection Items     = TagRepeater.Items;
                foreach (RepeaterItem Item in Items)
                {
                    lblRealID           = (Literal)Item.FindControl("lblRealID");
                    chkSelected         = (CheckBox)Item.FindControl("chkSelected");
                    chkSelected.Checked = TagIDList.Contains(lblRealID.Text);
                }
            }
        }