private void AddUnit_Click(object sender, RoutedEventArgs e) { using (var DB = new SkladModel()) { MessageBox.Show(DB.AddUnit_Of_Measurement(TB_TitleFull.Text, TB_TitleShort.Text)); UpdateTable(); UpdateComboBox(); } }