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

            f.ShowDialog();
        }