private void button1_Click(object sender, EventArgs e) { UrunBL ubl = new UrunBL(); SatisBL sbl = new SatisBL(); Satis sts = new Satis(); sts.MusteriId = (int)cmbxmusteri.SelectedValue; sts.UrunId = (int)cmbxurun.SelectedValue; sts.TarihSaat = DateTime.Now; sts.SatilanUrunAdet = (int)cmbxadet.SelectedValue; sts.Tutar = ubl.FiyatBul((int)cmbxurun.SelectedValue) * (int)cmbxadet.SelectedValue; if (sbl.SatisYap(sts)) { MessageBox.Show("Başarılı"); } sbl.Dispose(); ubl.Dispose(); }