private void dtGridGider_CellClick(object sender, DataGridViewCellEventArgs e) { gider = new Giderler(); if (e.ColumnIndex == dtGridGider.Columns.Count - 1) { gider.mgiderler = new ModelGider(); gider.mgiderler.GiderID = dtGridGider.CurrentRow.Cells[0].Value.ToString(); if (gider.Sil()) { MessageBox.Show("Gider Silindi"); } new AracGiderler().GiderlerDataGrid(dtGridGider); anasayfa = new SinifAnasayfa(); anasayfa.grafikGider(); anasayfa.GrafikGoruntule(chart1); } if (e.ColumnIndex == dtGridGider.Columns.Count - 2) { gider.mgiderler = new ModelGider(); gider.mgiderler.GiderID = dtGridGider.CurrentRow.Cells[0].Value.ToString(); gider.mgiderler.Tur = txtTur.Text = dtGridGider.CurrentRow.Cells[1].Value.ToString(); gider.mgiderler.Aciklama = richTxtAciklama.Text = dtGridGider.CurrentRow.Cells[2].Value.ToString(); gider.mgiderler.Tutar = txtTutar.Text = dtGridGider.CurrentRow.Cells[3].Value.ToString(); gider.mgiderler.Tarih = Convert.ToString(DateTimeTarih.Value = DateTime.Parse(dtGridGider.CurrentRow.Cells[4].Value.ToString())); btnGiderKaydet.Text = "GÜNCELLE"; groupBox1.Text = "Gider Güncelle"; } }
private void Gider_Load(object sender, EventArgs e) { new AracGiderler().GiderlerDataGrid(dtGridGider); anasayfa = new SinifAnasayfa(); anasayfa.grafikGider(); anasayfa.GrafikGoruntule(chart1); }
private void button1_Click(object sender, EventArgs e) { if (btnKaydet.Text != "GÜNCELLE") { gelir = new Gelirler(); gelir.mgelir = new ModelGelir(); //ComboBoxItem model = (ComboBoxItem)cm.Items[cmboxTur.SelectedIndex]; //cins.mturcins.TurId = model.Value.ToString(); gelir.mgelir.Tur = txtTur.Text; gelir.mgelir.Tutar = txtTutar.Text; gelir.mgelir.Tarih = DateTimeTarih.Value.ToString("dd/MM/yyyy"); gelir.mgelir.Aciklama = richTxtAciklama.Text; if (txtKontrol()) { MessageBox.Show("Alanları Doldurunuz"); return; } if (gelir.Ekle()) { MessageBox.Show("Gelir Eklendi"); Temizle(); new AracGelirler().GelirlerDataGrid(dtGridGelir); anasayfa = new SinifAnasayfa(); anasayfa.grafikGelir(); anasayfa.GrafikGoruntule(chart1); } else { MessageBox.Show("Hata"); } } else { gelir.mgelir.GelirID = dtGridGelir.CurrentRow.Cells[0].Value.ToString(); gelir.mgelir.Tur = txtTur.Text; gelir.mgelir.Tutar = txtTutar.Text; gelir.mgelir.Aciklama = richTxtAciklama.Text; if (txtKontrol()) { MessageBox.Show("Alanları Doldurunuz"); return; } if (gelir.Guncelle()) { MessageBox.Show("Gelir Güncellendi"); new AracGelirler().GelirlerDataGrid(dtGridGelir); anasayfa = new SinifAnasayfa(); anasayfa.grafikGelir(); anasayfa.GrafikGoruntule(chart1); groupBox1.Text = "Gelir Ekle"; btnKaydet.Text = "KAYDET"; Temizle(); } else { MessageBox.Show("Hata"); } } }
private void btnGiderKaydet_Click(object sender, EventArgs e) { if (btnGiderKaydet.Text != "GÜNCELLE") { gider = new Giderler(); gider.mgiderler = new ModelGider(); gider.mgiderler.Tur = txtTur.Text; gider.mgiderler.Tutar = txtTutar.Text; gider.mgiderler.Tarih = DateTimeTarih.Value.ToString("dd/MM/yyyy"); gider.mgiderler.Aciklama = richTxtAciklama.Text; if (txtKontrol()) { MessageBox.Show("Alanları Doldurunuz"); return; } if (gider.Ekle()) { MessageBox.Show("Gider Eklendi"); Temizle(); new AracGiderler().GiderlerDataGrid(dtGridGider); anasayfa = new SinifAnasayfa(); anasayfa.grafikGider(); anasayfa.GrafikGoruntule(chart1); } else { MessageBox.Show("Hata"); } } else { gider.mgiderler.GiderID = dtGridGider.CurrentRow.Cells[0].Value.ToString(); gider.mgiderler.Tur = txtTur.Text; gider.mgiderler.Tutar = txtTutar.Text; gider.mgiderler.Aciklama = richTxtAciklama.Text; if (txtKontrol()) { MessageBox.Show("Alanları Doldurunuz"); return; } if (gider.Guncelle()) { MessageBox.Show("Gelir Güncellendi"); new AracGiderler().GiderlerDataGrid(dtGridGider); anasayfa = new SinifAnasayfa(); anasayfa.grafikGider(); anasayfa.GrafikGoruntule(chart1); groupBox1.Text = "Gider Ekle"; btnGiderKaydet.Text = "KAYDET"; Temizle(); } else { MessageBox.Show("Hata"); } } }
private void Form1_Load(object sender, EventArgs e) { anasayfa = new SinifAnasayfa(); anasayfa.grafikSatis(); anasayfa.GrafikGoruntule(chart1); anasayfa.grafikSiparis(); anasayfa.GrafikGoruntule(chart2); anasayfa.grafikGelir(); anasayfa.GrafikGoruntule(chart3); anasayfa.grafikGider(); anasayfa.GrafikGoruntule(chart4); }