private void Button1Click(object sender, RoutedEventArgs e) { var dept = DataContext as DepartmentDetailsDto; if (dept == null) return; var client = new CompanyServiceClient(); client.CutDeptCompleted += (s, ea) => txtTotal.Text = (dept.Total / 2).ToString(); client.CutDeptAsync(dept); }
private void Button1Click(object sender, RoutedEventArgs e) { var dept = DataContext as DepartmentDetailsDto; if (dept == null) { return; } var client = new CompanyServiceClient(); client.CutDeptCompleted += (s, ea) => txtTotal.Text = (dept.Total / 2).ToString(); client.CutDeptAsync(dept); }