private void label6_Click(object sender, EventArgs e) { AddFom frm = new AddFom("Новая марка"); if (frm.ShowDialog() == DialogResult.OK) { new SQLiteCommand(string.Format("INSERT INTO marka (mark) VALUES ('{0}');", frm.Tag), SQL.Connection).ExecuteNonQuery(); LoadMark(); } }
private void label3_Click(object sender, EventArgs e) { AddFom frm = new AddFom("Новая модель"); if (frm.ShowDialog() == DialogResult.OK) { new SQLiteCommand(string.Format("INSERT INTO model (model, mark_id) VALUES ('{0}', {1});", frm.Tag, (list1.SelectedItem as Item).id), SQL.Connection).ExecuteNonQuery(); LoadModels(); } }