void NotListesi() { //Notları DataGridView ögesinde göstermek için formumuza tanıtıyoruz. List <ENTITYNOTLAR> EntNot = BLLNOTLAR.LISTELE(); dataGridView1.DataSource = EntNot; }
private void btnNOTGUNCELLE_Click(object sender, EventArgs e) { ENTITYNOT not = new ENTITYNOT(); not.AD = txtOGRAD.Text; not.SOYAD = txtOGRSOYAD.Text; not.OGRENCIID = Convert.ToInt16(txtIDNOT.Text); not.SINAV1 = Convert.ToInt16(txtSINAV1.Text); not.SINAV2 = Convert.ToInt16(txtSINAV2.Text); not.SINAV3 = Convert.ToInt16(txtSINAV3.Text); not.PROJE = Convert.ToInt16(txtPROJE.Text); not.ORTALAMA = ((not.SINAV1 + not.SINAV2 + not.SINAV3) / 3) * 0.6 + not.PROJE * 0.4; if (not.ORTALAMA >= 50) { not.DURUM = "True"; } else { not.DURUM = "False"; } bool guncelle = BLLNOTLAR.GUNCELLE(not); if (guncelle) { MessageBox.Show(not.AD + " " + not.SOYAD + " isimli öğrencinin notları güncellendi"); } else { MessageBox.Show("Eksik veya hatalı giriş yapıldı"); } NotListesi(); }
void NotListesi() { List <ENTITYNOTLAR> EntNot = BLLNOTLAR.LISTELE(); dataGridView1.DataSource = EntNot; this.Text = "Not Listesi"; }
void NotListesi() { state = false; List <ENTITYNOT> entNot = BLLNOTLAR.LISTELE(); dataGridView1.DataSource = entNot; this.Text = "Not Listesi"; }
private void btnNotGuncelle_Click(object sender, EventArgs e) { ENTITYNOTLAR ent = new ENTITYNOTLAR(); ent.OGRENCIID = Convert.ToInt16(txtOgrId.Text); ent.SINAV1 = Convert.ToInt16(txtS1.Text); ent.SINAV2 = Convert.ToInt16(txtS2.Text); ent.SINAV3 = Convert.ToInt16(txtS3.Text); ent.PROJE = Convert.ToInt16(txtProje.Text); ent.ORTALAMA = Convert.ToInt16(txtOrt.Text); ent.DURUM = (txtDurum.Text); BLLNOTLAR.GUNCELLE(ent); MessageBox.Show("Not Güncelleme İşlemi Tamamlandı"); NotListesi(); }
private void BtnNotGuncelle_Click(object sender, EventArgs e) { ENTITYNOTLAR ent = new ENTITYNOTLAR(); ent.OGRENCIID = Convert.ToInt32(TxtNotlarID.Text); ent.SINAV1 = Convert.ToInt32(TxtSinav1.Text); ent.SINAV2 = Convert.ToInt32(TxtSinav2.Text); ent.SINAV3 = Convert.ToInt32(TxtSinav3.Text); ent.PROJE = Convert.ToInt32(TxtProje.Text); ent.ORTALAMA = Convert.ToInt32(TxtOrtalama.Text); ent.DURUM = TxtSinav1.Text; BLLNOTLAR.GUNCELLE(ent); MessageBox.Show("Notlar Güncellendi!"); NotListesi(); }
private void BtnNotGuncelle_Click(object sender, EventArgs e) { //ENTITYNOTLAR sınıfından oluşturduğumuz ent nesnesi, doldurulan ilgili alanlardaki verileri, hafızaya alıp veri tabanına işlenmesi için BLL katmanı üzerinden, gerekli koşulların sağlanması durumunda FACADE katmanına gönderiyor. ENTITYNOTLAR ent = new ENTITYNOTLAR(); ent.OGRENCIID = Convert.ToInt16(TxtOgrId.Text); ent.SINAV1 = Convert.ToInt16(TxtS1.Text); ent.SINAV2 = Convert.ToInt16(TxtS2.Text); ent.SINAV3 = Convert.ToInt16(TxtS3.Text); ent.PROJE = Convert.ToInt16(TxtProje.Text); ent.ORTALAMA = Convert.ToInt16(TxtOrt.Text); ent.DURUM = TxtDurum.Text; BLLNOTLAR.GUNCELLE(ent); MessageBox.Show("Notlar Guncellendi"); NotListesi(); }
private void NotlarListesi() { txtAd.Enabled = false; txtSoyad.Enabled = false; txtFotograf.Enabled = false; cmbKulup.Enabled = false; txtSinav1.Enabled = true; txtSinav2.Enabled = true; txtSinav3.Enabled = true; txtProje.Enabled = true; dataGridView1.DataSource = null; List <ENTITYNOTLAR> notList = BLLNOTLAR.LISTELE(); dataGridView1.DataSource = notList; dataGridView1.Columns[ResourceTblNotlar.OGRENCIID].DisplayIndex = 0; dataGridView1.Columns[ResourceTblOgrenci.AD].DisplayIndex = 1; dataGridView1.Columns[ResourceTblOgrenci.SOYAD].DisplayIndex = 2; this.Text = ResourcePresentation.NotListesi; }
private void btnNotGuncelle_Click(object sender, EventArgs e) { if (txtSinav1.Text != "" && txtSinav2.Text != "" && txtSinav3.Text != "" && txtProje.Text != "" && txtOgrId.Text != "") { double ort = MyExtensions.OrtHesapla(Convert.ToInt16(txtSinav1.Text), Convert.ToInt16(txtSinav2.Text), Convert.ToInt16(txtSinav3.Text), Convert.ToInt16(txtProje.Text)); bool durum = MyExtensions.DurumHesapla(ort); ENTITYNOTLAR entNot = new ENTITYNOTLAR { OGRENCIID = Convert.ToInt16(txtOgrId.Text), SINAV1 = Convert.ToInt16(txtSinav1.Text), SINAV2 = Convert.ToInt16(txtSinav2.Text), SINAV3 = Convert.ToInt16(txtSinav3.Text), PROJE = Convert.ToInt16(txtProje.Text), ORTALAMA = Convert.ToDouble(txtOrt.Text), DURUM = durum }; var islemSonucu = BLLNOTLAR.GUNCELLE(entNot); if (islemSonucu) { txtOrt.Text = ort.ToString(); txtDurum.Text = PrintDurum(durum.ToString()); MessageBox.Show(ResourcePresentation.NotGuncelleTrue); } else { MessageBox.Show(ResourcePresentation.NotGuncelleFalse2); } } else { MessageBox.Show(ResourcePresentation.NotGuncelleFalse); } NotlarListesi(); }