static void Main(string[] args) { fOtomasyon f1 = new fOtomasyon(); //object aaa = null; //object bbb = null; //if (aaa != null) //{ // string CCCC = "BEN C YİM"; // if (bbb != null) // { // //SELECT // } //} //END //f1.OgrenciEkle(51315, "yDoozgur"," gCtorun"); //f1.OgrenciEkle(77, "ozgur", "rrrr"); //f1.OgrenciGuncelle(51315, "DENEME", "calıs"); //f1.DersEkle(13, "MAdT101", "Mdatematik", 16, 1); //f1.DersSil(12); //f1.DersEkle("dasd1", "dsad", 3, "Güz"); // f1.NotEkle(14, 8, 75, 80, 85, "GEÇTİ"); //f1.NotGuncelle(14, 8, 70, 70, 70, "GEÇTİ"); f1.NotEkle(15, 13, 55, 65, 60, "GEÇTİ"); }
private int NotEkle() { int OgrenciNo = Convert.ToInt32(((System.Data.DataRowView)(comboBox1.SelectedValue)).Row.ItemArray[0]); int DersId = Convert.ToInt32(comboBox2.SelectedValue); int OVize = Convert.ToInt32(txtVize.Text); int OFinal = Convert.ToInt32(txtFinal.Text); double OBasariNotu = Convert.ToDouble(txtBasariNotu.Text); string DersDurumu = txtDersDurumu.Text; DialogResult dialogresult = MessageBox.Show(string.Format("{0} isimli öğrencinin notu girilsin mi ?", OgrenciNo), "Not ekleme Onayı", MessageBoxButtons.YesNo); if (dialogresult == System.Windows.Forms.DialogResult.Yes) { fOtomasyon otomasyon = new fOtomasyon(); return(otomasyon.NotEkle(OgrenciNo, DersId, OVize, OFinal, OBasariNotu, DersDurumu)); } else { MessageBox.Show("İşlem iptal edildi", "Not ekleme işlemi"); return(0); } }