Esempio n. 1
0
File: Main.cs Progetto: evilOnes/DR
        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();
            }
        }
Esempio n. 2
0
File: Main.cs Progetto: N1q/CHERNIY
        private void телефонToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            newPhone f = new newPhone();

            f.ShowDialog();
        }