Как сравнить значение из двух таблиц?
Запутался в простой вещи, и что-то уже весь день не могу понять. Мне надо сравнить значения, есть ли в одной таблице значения (int) у определенного столбца и есть ли они во второй таблице. Есть в одной и второй таблице есть значения эти, то выполняется моё действие.
NormApparatYchetEntities2 dataEntetis = new NormApparatYchetEntities2();
private ComplectTable _complecttable = new ComplectTable();
private ClaviaturaTable _complectclava = new ClaviaturaTable();
private MouseTable _complectmouse = new MouseTable();
private PCTable _complectpc = new PCTable();
private PrinterTable _complectprinter = new PrinterTable();
private MonitorTable _complectmonitor = new MonitorTable();
public AddComplectWindow(ComplectTable selectcomplect)
{
InitializeComponent();
if (selectcomplect != null)
_complecttable = selectcomplect;
DataContext = _complecttable;
DataContext = _complectprinter;
}
//....
if (PrinterListWindow.SelectPrinterInt != 0)
{
MessageBox.Show(_complecttable.IdPrinterInComplect.ToString());
MessageBox.Show(_complectprinter.IdPrinter.ToString());
if (_complecttable.IdPrinterInComplect == PrinterListWindow.SelectPrinterInt)
errors.AppendLine("Этот принтер занят!");
}
//....