コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }