예제 #1
0
        //void ls_ExecuteQuery<T>(object sender, SilverlightLFC.common.LFCExecuteQueryEventArgs e) where T : UIElement, ILynxDataItem
        void ls_ExecuteQuery(object sender, SilverlightLFC.common.LFCExecuteQueryEventArgs e)
        {
            SilverlightLFC.common.LFCDataService ls = sender as SilverlightLFC.common.LFCDataService;
            ls.ExecuteQuery -= new SilverlightLFC.common.ExecuteQueryEventHandler(ls_ExecuteQuery);

            RowList.Children.Clear();
            List <Dictionary <string, object> > d = e.DataTable;

            if (TargetItem == null)
            {
                DefaultShow(d);
                ShowRow();

                return;
            }
            foreach (Dictionary <string, object> r in d)
            {
                Type          t  = TargetItem.GetType();
                ILynxDataItem ot = (ILynxDataItem)Activator.CreateInstance(t);
                //RowList.Children.Add(ot);
                ot.ShowObject(RowList, r);
            }
            ShowRow();
        }
예제 #2
0
 public void setItemControl(ILynxDataItem i)
 {
     TargetItem = i;
 }