private void pictureBox4_Click(object sender, EventArgs e) { con.Open(); OleDbCommand cmd = new OleDbCommand("insert into sipariş (tatlı,t_fiyat,toplamfiyat) values ('" + label5.Text.ToString() + "','" + Convert.ToDouble(label7.Text) + "','" + Convert.ToDouble(label7.Text) + "')", con); cmd.ExecuteNonQuery(); con.Close(); fiyat f1 = new fiyat(); f1.Show(); this.Hide(); }
private void comboBox2_SelectedIndexChanged(object sender, EventArgs e) { con.Open(); OleDbCommand cmd = new OleDbCommand("insert into sipariş (icecek,toplamfiyat) values ('" + comboBox2.SelectedItem.ToString() + "','" + Convert.ToDouble(label11.Text) + "')", con); cmd.ExecuteNonQuery(); con.Close(); fiyat f1 = new fiyat(); f1.Show(); this.Hide(); }
private void pictureBox5_Click(object sender, EventArgs e) { idnumber(); OleDbCommand cmd = new OleDbCommand("update sipariş set tatlı= '" + label13.Text.ToString() + "' where ID=@id", con); cmd.Parameters.AddWithValue("@id", (Convert.ToInt32(label12.Text))); con.Open(); cmd.ExecuteNonQuery(); con.Close(); fiyat ileri = new fiyat(); this.Hide(); ileri.Show(); }
private void button1_Click(object sender, EventArgs e) { idnumber(); toplamfiyat(); OleDbCommand cmd = new OleDbCommand("update sipariş set tatlı= '" + "Hayır" + "',t_fiyat ='" + 0 + "',toplamfiyat = '" + (Convert.ToDouble(label20.Text) + 0) + "' where ID=@id", con); cmd.Parameters.AddWithValue("@id", (Convert.ToInt32(label12.Text))); con.Open(); cmd.ExecuteNonQuery(); con.Close(); fiyat ileri = new fiyat(); this.Hide(); ileri.Show(); }