コード例 #1
0
ファイル: Machine.cs プロジェクト: Fredj90/MCM
        private void savemachine_Click(object sender, EventArgs e)
        {
            int j = comboBox2.SelectedIndex + 1;

            test();
            if ((textBox3.Text != "") && (textBox1.Text != ""))
            {
                if (x == 1)
                {
                    int    i   = conn.autoinc("machine", "id_machine");
                    string ch1 = "insert into machine values('" + i + "','" + j + "','" + textBox3.Text + "','" + dateTimemachine.Value.ToString("dd/MM/yyyy") + "','" + textBox1.Text + "')";
                    conn.insertTable(ch1);

                    Machine0 a = new Machine0();
                    a.Show();
                    this.Hide();
                }
                else
                {
                    string req = "update machine set Registration_num ='" + textBox3.Text + "', LIBELLE= '" + textBox1.Text + "',ID_MARQUE='" + j + "' where id_machine = '" + id + "'";
                    conn.insertTable(req);
                    Machine a = new Machine();
                    a.Show();
                    this.Hide();
                }
            }
        }
コード例 #2
0
ファイル: Machine.cs プロジェクト: Fredj90/MCM
        private void button3_Click_2(object sender, EventArgs e)
        {
            Machine a = new Machine();

            a.Show();
            this.Hide();
        }
コード例 #3
0
        private void savemarque_Click(object sender, EventArgs e)
        {
            int    i   = conn.autoinc("marque", "ID_MARQUE");
            string ch1 = "insert into marque values('" + i + "','" + wording.Text + "')";

            conn.insertTable(ch1);
            Machine a = new Machine();

            a.Show();
            this.Hide();
            a.machineVisible();
        }
コード例 #4
0
        private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Machine m = new Machine();

            m.Show();
        }