public DealWindow(ViewDeal deal) { InitializeComponent(); viewDeal = deal; using (var data = new DataServiceClient()) { ComboBox_Seller.ItemsSource = data.GetUsersId(); ComboBox_Buyer.ItemsSource = ComboBox_Seller.ItemsSource; } ComboBox_Buyer.IsEnabled = false; ComboBox_ObjOfTransact.IsEnabled = false; ComboBox_KindOfCalc.IsEnabled = false; TextBox_PersonalNumberOfDeal.IsEnabled = false; TextBox_DateOfDeal.IsEnabled = false; TextBox_TransactionAmount.IsEnabled = false; SetInfo(); if (deal.DealID > 0) { Button_Correct.IsEnabled = true; Button_Add.IsEnabled = false; } else { Button_Correct.IsEnabled = false; Button_Add.IsEnabled = true; } }