public MainWindow() { InitializeComponent(); List<Good> goods = new List<Good>(); WCFStoreServiceManager.StoreServiceClient client = new StoreServiceClient(); goods = client.Goods().ToList<Good>(); //WCFClient wcfc = new WCFClient(); //goods = wcfc.Goods().ToList<Good>(); dg_goods.ItemsSource = goods; }
private void Window_Activated(object sender, EventArgs e) { List<Good> goods = new List<Good>(); WCFStoreServiceManager.StoreServiceClient client = new StoreServiceClient(); goods = client.Goods().ToList<Good>(); //WCFClient wcfc = new WCFClient(); //goods = wcfc.Goods().ToList<Good>(); dg_goods.ItemsSource = goods; }