private void oTELToolStripMenuItem_Click(object sender, EventArgs e) { dataGridView1.ContextMenuStrip = contextMenuStrip1; OtelORM orm = new OtelORM(); dataGridView1.DataSource = orm.Listele(); }
private void puanVerToolStripMenuItem_Click(object sender, EventArgs e) { PuanForm frm = new PuanForm(); OtelORM orm = new OtelORM(); frm.ShowDialog(); Otel otel = new Otel(); Araclar.PropertyDoldur <Otel>(otel, dataGridView1); otel.OtelPuani = Convert.ToInt32(frm.button1.Tag); if (orm.Guncelle(otel, Convert.ToInt32(dataGridView1.CurrentRow.Cells["id"].Value.ToString()))) { dataGridView1.DataSource = orm.Listele(); } }
private void MusteriAnaForm_Load(object sender, EventArgs e) { otel = new Otel(); OtelORM orm = new OtelORM(); PropertyInfo[] proplar = typeof(Otel).GetProperties(); foreach (PropertyInfo item in proplar) { OtellerAgac.Oteltable.Columns.Add(item.Name); } Aktar aktar = new Aktar(); aktar.OtelAktar(orm.Listele(), otel); dataGridView1.DataSource = OtellerAgac.Oteltable; OtelGetir(); }
private void yorumYapToolStripMenuItem_Click(object sender, EventArgs e) { Yorum y = new Yorum(); int id = Araclar.AktifMusteri.id; int otelid = Convert.ToInt32(dataGridView1.CurrentRow.Cells["id"].Value); string yorum = Interaction.InputBox(string.Format("{0} Oteline Yorum Yap", dataGridView1.CurrentRow.Cells["Adi"].Value.ToString())); y.Musterid = Araclar.AktifMusteri; YorumORM orm = new YorumORM(); if (orm.Ekle(otelid, id, yorum)) { MessageBox.Show("Başarılı"); OtelORM orm1 = new OtelORM(); dataGridView1.DataSource = orm1.Listele(); } }
private void button1_Click(object sender, EventArgs e) { otel = new Otel(); OtelORM orm = new OtelORM(); PropertyInfo[] proplar = typeof(Otel).GetProperties(); OtellerAgac.Oteltable.Columns.Clear(); OtellerAgac.Oteltable.Rows.Clear(); foreach (PropertyInfo item in proplar) { OtellerAgac.Oteltable.Columns.Add(item.Name); } Aktar aktar = new Aktar(); aktar.OtelAktar(orm.Listele(), otel); dataGridView1.DataSource = OtellerAgac.Oteltable; OtelGetir(); radiopuan.Checked = false; radioyildiz.Checked = false; }