private void MusteriForm_Load(object sender, EventArgs e) { dataGridView1.DataSource = mOrm.Select(); //Tanımladığımız enumları bize string dizisi olarak dönderecek. cmbMedeniDurum.DataSource = Enum.GetNames(typeof(MedeniDurumTip)); cmbCinsiyet.DataSource = Enum.GetNames(typeof(Cinsiyet)); }
private void MusteriForm_Load(object sender, EventArgs e) { Text = "Müşteriler"; btnGuncelle.Visible = false; btnIptal.Visible = false; cmbMedeniDurum.DataSource = Enum.GetValues(typeof(MedeniDurumTip)); cmbCinsiyet.DataSource = Enum.GetValues(typeof(Cinsiyet)); dataGridView1.DataSource = mOrm.Select(); dataGridView1.Columns[0].Visible = false; dataGridView1.Columns[9].Visible = false; }
private void SatisForm_Load(object sender, EventArgs e) { Text = "Satis Formu"; MusteriORM mOrm = new MusteriORM(); cmbMusteri.DataSource = mOrm.Select(); cmbMusteri.DisplayMember = "Adi"; cmbMusteri.ValueMember = "Id"; KasaORM kasaOrm = new KasaORM(); cmbKasaOdemeTip.DataSource = kasaOrm.Select(); cmbKasaOdemeTip.DisplayMember = "Adi"; cmbKasaOdemeTip.ValueMember = "Id"; cmbOda.DataSource = odaOrm.Select(); cmbOda.DisplayMember = "Adi"; cmbOda.ValueMember = "Id"; UrunORM uOrm = new UrunORM(); dataGridView1.DataSource = uOrm.Select(); dataGridView1.Columns[0].Visible = false; dataGridView1.Columns[6].Visible = false; dataGridView1.Columns[7].Visible = false; dataGridView1.Columns[8].Visible = false; }
private void SatisFORM_Load(object sender, EventArgs e) { MusteriORM mORM = new MusteriORM(); cmb_Müsteri.DataSource = mORM.Select(); cmb_Müsteri.DisplayMember = "Adi"; cmb_Müsteri.ValueMember = "Id"; KasaORM korm = new KasaORM(); cmbKasaTip.DataSource = korm.Select(); cmbKasaTip.DisplayMember = "Adi"; cmbKasaTip.ValueMember = "Id"; OdalarORM oORM = new OdalarORM(); DataRow[] rows = oORM.Select().Select("Aktif='True'"); if (rows.Length > 0) { cmb_Oda.DataSource = rows.CopyToDataTable(); } cmb_Oda.DisplayMember = "Adi"; cmb_Oda.ValueMember = "Id"; SatisORM s = new SatisORM(); dataGridView1.DataSource = s.Select(); }
private void btn_Ekle_Click(object sender, EventArgs e) { Musteriler m = new Musteriler { SirketAdi = txt_SirketAdi.Text, Aktif = true, DogumTarihi = dt_DogumTarih.Value, Cinsiyet = (Cinsiyet)Enum.Parse(typeof(Cinsiyet), cmb_Cinsiyet.SelectedItem.ToString()), MedeniDurum = (MedeniDurumTip)Enum.Parse(typeof(MedeniDurumTip), cmb_MedeniDurum.SelectedItem.ToString()) }; if (!string.IsNullOrWhiteSpace(txt_Adi.Text)) { m.Adi = txt_Adi.Text; } if (!string.IsNullOrWhiteSpace(txt_Soyad.Text)) { m.Soyadi = txt_Soyad.Text; } if (!string.IsNullOrWhiteSpace(mask_TCNO.Text)) { m.Tckn = mask_TCNO.Text; } if (!string.IsNullOrWhiteSpace(mask_TelNo.Text)) { m.TelNo = mask_TelNo.Text; } bool snc = mORM.Insert(m); if (snc) { MessageBox.Show("Müşteri Kaydı Başarıyla eklendi"); dataGridView1.DataSource = mORM.Select(); } else { MessageBox.Show("Hata"); } }
private void SatisForm_Load(object sender, EventArgs e) { MusteriORM mOrm = new MusteriORM(); cmbMusteri.DataSource = mOrm.Select(); cmbMusteri.DisplayMember = "Adi"; cmbMusteri.ValueMember = "Id"; OdalarORM oOrm = new OdalarORM(); cmbOda.DataSource = oOrm.Select(); cmbOda.DisplayMember = "Adi"; cmbOda.ValueMember = "Id"; UrunlerORM uOrm = new UrunlerORM(); dataGridView1.DataSource = uOrm.Select(); }
private void MusteriListele() { dgvMusteri.DataSource = musteriORM.Select(); dgvMusteri.Columns["Aktif"].Visible = false; }
private void MusterilerForm_Load(object sender, EventArgs e) { dataGridView1.DataSource = mOrm.Select(); cmbMedeniDurum.DataSource = Enum.GetNames(typeof(MedeniDurumTip)); cmbCinsiyet.DataSource = Enum.GetNames(typeof(Cinsiyet)); }