public void ShowObject(Panel p, Dictionary <string, object> r) { SilverlightLFC.common.LFCDataService ls = new SilverlightLFC.common.LFCDataService(); foreach (KeyValuePair <string, object> kv in r) { TextBlock tb = new TextBlock(); tb.Text = kv.Value.ToString(); tb.Tag = kv; tb.Width = 20; } p.Children.Add(this); }
void ls_ProcessQueryComplete(object sender, SilverlightLFC.common.LynxProcessCompleteEventArgs e) { SilverlightLFC.common.LFCDataService ls = sender as SilverlightLFC.common.LFCDataService; ls.ProcessQueryComplete -= new SilverlightLFC.common.ProcessEventHandler(ls_ProcessQueryComplete); if (e.IsSuccess) { TotleRecords = Convert.ToInt32(e.ReturnValue); TotlePage = TotleRecords / CountPerPage + 1; ShowRowInfor(); } }
//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(); }
//public void LoadPageRecordList<T>(int cp) where T : UIElement, ILynxDataItem //{ // CurrentPage = cp; // SilverlightLFC.common.LFCDataService ls = new SilverlightLFC.common.LFCDataService(); // ls.ExecuteQuery += new SilverlightLFC.common.ExecuteQueryEventHandler(ls_ExecuteQuery<T>); // ls.AsynchronousExecuteQuery(selectSQL, CurrentPage, CountPerPage); //} //public void LoadRecordList<T>() where T:UIElement,ILynxDataItem public void LoadRecordList() { SilverlightLFC.common.LFCDataService ls = new SilverlightLFC.common.LFCDataService(); ls.ExecuteQuery += new SilverlightLFC.common.ExecuteQueryEventHandler(ls_ExecuteQuery); //ls.AsynchronousExecuteQuery(selectSQL,CurrentPage,CountPerPage); }
public void InitPage() { SilverlightLFC.common.LFCDataService ls = new SilverlightLFC.common.LFCDataService(); ls.ProcessQueryComplete += new SilverlightLFC.common.ProcessEventHandler(ls_ProcessQueryComplete); //ls.getQueryCount(selectSQL); }