private void btn_newPhone_Click(object sender, EventArgs e) { newPhone f = new newPhone(); f.ShowDialog(); if (ok) { Open(); string query = "insert into `Телефон` (`Номер телефона`,`Код абонента`,`Задолжность`,`Дата`) values ('" + f.tb_phone.Text + "', " + f.cb_idA.SelectedItem + ", " + f.nud_zadol.Value.ToString().Replace(',', '.') + ", '" + f.date.Value + "')"; Clipboard.SetText(query);//works in access but not works here MessageBox.Show(query); cmd.CommandText = query; cmd.ExecuteNonQuery(); c.Close(); UpdateDgv(); } }
private void телефонToolStripMenuItem1_Click(object sender, EventArgs e) { newPhone f = new newPhone(); f.ShowDialog(); }