private void Giderler_Load(object sender, EventArgs e) { TabloGuncelle(); //notlar çekildi OleDbDataAdapter da2 = new OleDbDataAdapter("SELECT *FROM Notlar", baglanti); DataSet ds2 = new DataSet(); baglanti.Open(); da2.Fill(ds2, "Notlar"); DtNot.DataSource = ds2.Tables["Notlar"]; baglanti.Close(); DtNot.RowHeadersVisible = false; DtNot.Columns[0].Visible = false; DtNot.Columns[2].Visible = false; DtNot.Columns[0].HeaderText = "ID"; DtNot.Columns[1].HeaderText = "NOT"; DtNot.ClearSelection(); }
private void Gelirler_Load(object sender, EventArgs e) { OleDbDataAdapter da = new OleDbDataAdapter("SELECT *FROM Gelirler", baglanti); DataSet ds = new DataSet(); baglanti.Open(); da.Fill(ds, "Gelirler"); dataGridView2.DataSource = ds.Tables["Gelirler"]; baglanti.Close(); dataGridView2.RowHeadersVisible = false; dataGridView2.Columns[0].Visible = false; dataGridView2.Columns[1].HeaderText = "AÇIKLAMA"; dataGridView2.Columns[2].HeaderText = "KATEGORİ"; dataGridView2.Columns[3].HeaderText = "TUTAR"; dataGridView2.Columns[4].HeaderText = "TARİH"; dataGridView2.Columns[5].HeaderText = "ÖDEME TÜRÜ"; //dataGridView2.ColumnHeadersDefaultCellStyle.BackColor = Color.Gray; //dataGridView2.RowsDefaultCellStyle.BackColor = Color.YellowGreen; //dataGridView2.AlternatingRowsDefaultCellStyle.BackColor = Color.White; dataGridView2.ClearSelection(); //notlar çekildi OleDbDataAdapter da2 = new OleDbDataAdapter("SELECT *FROM Notlar", baglanti); DataSet ds2 = new DataSet(); baglanti.Open(); da2.Fill(ds2, "Notlar"); DtNot.DataSource = ds2.Tables["Notlar"]; baglanti.Close(); DtNot.RowHeadersVisible = false; DtNot.Columns[0].Visible = false; DtNot.Columns[2].Visible = false; //DtNot.Columns[2].Visible = false; DtNot.Columns[0].HeaderText = "ID"; DtNot.Columns[1].HeaderText = "NOTLARIM"; DtNot.Columns[2].HeaderText = "TARİH"; DtNot.ClearSelection(); DtTarih.Text = DateTime.Now.ToShortDateString(); DtPic1.Text = DateTime.Now.ToShortDateString(); DtPic2.Text = DateTime.Now.ToShortDateString(); }