Exemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            VAR.ogrders ykayit = new Varlıklar.ogrders(Convert.ToInt32(comboBox2.Text), Convert.ToInt32(comboBox1.Text));
            //Convert.ToInt32(comboBox2.Text), Convert.ToInt32(comboBox1.Text)
            ykayit.Ogrid = yenikayit.ogrdersEkle(ykayit);
            ((Form3)this.Owner).ogrderslistele();

            this.Visible = false;
        }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            double sayi1, sayi2, sonuc;
            string ortl;
            string harfn = "";

            sayi1 = Convert.ToInt32(textBox1.Text);
            sayi2 = Convert.ToInt32(textBox2.Text);
            sonuc = (sayi1 * 0.3) + (sayi2 * 0.7);
            ortl  = sonuc.ToString();
            if (sonuc <= 100 && sonuc >= 90)
            {
                harfn = "AA";
            }
            else if (sonuc < 90 && sonuc >= 80)
            {
                harfn = "BA";
            }
            else if (sonuc < 80 && sonuc >= 65)
            {
                harfn = "BB";
            }
            else if (sonuc < 65 && sonuc >= 50)
            {
                harfn = "CB";
            }
            else if (sonuc < 50 && sonuc > 40)
            {
                harfn = "CC";
            }
            else if (sonuc < 40)
            {
                harfn = "FF";
            }
            else if (sonuc < 90 && sonuc > 70)
            {
                harfn = "BA";
            }
            else if (sonuc < 90 && sonuc > 70)
            {
                harfn = "BA";
            }
            VAR.ogrders ykayit = new Varlıklar.ogrders(Convert.ToInt32(comboBox1.Text), Convert.ToInt32(comboBox2.Text), Convert.ToInt32(textBox1.Text), Convert.ToInt32(textBox2.Text), ortl, harfn);
            ykayit.Ogrid = yenikayit.ogrdersGuncelle(ykayit);
            ((Form3)this.Owner).ogrderslistele();

            this.Visible = false;
        }
Exemplo n.º 3
0
        public int ogrdersGuncelle(VAR.ogrders ogrenci)
        {
            SqlCommand cmd = new SqlCommand("notgir", con);

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@ogrid", ogrenci.Ogrid);
            cmd.Parameters.AddWithValue("@dersno", ogrenci.Dersno);
            cmd.Parameters.AddWithValue("@vize", ogrenci.Vize);
            cmd.Parameters.AddWithValue("@final", ogrenci.Final);
            cmd.Parameters.AddWithValue("@ortalama", ogrenci.Ortalama);
            cmd.Parameters.AddWithValue("@harfnotu", ogrenci.Harfnotu);

            con.Open();
            int id = Convert.ToInt32(cmd.ExecuteScalar());

            con.Close();
            return(id);
        }