private void GetYearlysCompleted(Task <List <Yearly> > task) { if (task.Exception != null) { this.RefreshingVisibility = Visibility.Collapsed; MessageBox.Show("获取年结算出错"); return; } List <Yearly> result = task.Result; if (result == null || result.Count == 0) { if (this._showNotFoundMessage) { MessageBox.Show("未查询到相关年结算信息!"); } this.RefreshingVisibility = Visibility.Collapsed; return; } YearlyModel model; foreach (Yearly year in result) { model = new YearlyModel(year); this._yearlys.Add(model); } this.RefreshingVisibility = Visibility.Collapsed; }
public YearlyDetail(YearlyModel model) { InitializeComponent(); this.DataContext = model; }
private void GetYearlysCompleted(Task<List<Yearly>> task) { if (task.Exception != null) { this.RefreshingVisibility = Visibility.Collapsed; MessageBox.Show("获取年结算出错"); return; } List<Yearly> result = task.Result; if (result == null || result.Count == 0) { if (this._showNotFoundMessage) { MessageBox.Show("未查询到相关年结算信息!"); } this.RefreshingVisibility = Visibility.Collapsed; return; } YearlyModel model; foreach (Yearly year in result) { model = new YearlyModel(year); this._yearlys.Add(model); } this.RefreshingVisibility = Visibility.Collapsed; }