//Изменение поставщика private void bt_Update_Supplier_Click(object sender, RoutedEventArgs e) { if (tb_Surname_of_Supplier.Text.ToString() == "" | tb_Name_of_Supplier.Text.ToString() == "" | tb_Middle_Name_of_Supplier.Text.ToString() == "" | tb_Sires_Document.Text.ToString() == "" | tb_Number_Document.Text.ToString() == "" | cb_Supply_Contract_Info.Text.ToString() == "") { MessageBox.Show("Данные не выбраны!" + "\n Повторите попытку!", "Сервис+", MessageBoxButton.OK, MessageBoxImage.Warning); } else { DataRowView ID = (DataRowView)dgSupplier.SelectedItems[0]; procedures.Supplier_Update(Convert.ToInt32(ID["ID_Supplier"]), tb_Surname_of_Supplier.Text.ToString(), tb_Name_of_Supplier.Text.ToString(), tb_Middle_Name_of_Supplier.Text.ToString(), tb_Sires_Document.Text.ToString(), tb_Number_Document.Text.ToString(), Convert.ToInt32(cb_Supply_Contract_Info.SelectedValue.ToString())); } }