private void Page_Loaded(object sender, RoutedEventArgs e) { most = new ReportSaleGraphModel(); emp = new ReportSaleGraphModel(); qty = new ReportSaleGraphModel(); saleReport = new ReportSaleModel(); saleReport1 = new ReportSaleModel(); }
private void MetroWindow_Loaded(object sender, RoutedEventArgs e) { product = new ReportSaleModel(); this.Cursor = Cursors.Arrow; new TaskFactory().StartNew(() => { return(POS_Sale(DFS, DTS)); }) .ContinueWith(x => { if (x.Result == null) { Dispatcher.Invoke(new Action(() => { error(); }), DispatcherPriority.ContextIdle); return; } Dispatcher.Invoke(new Action(() => { aftermost(); }), DispatcherPriority.ContextIdle); }); }