Ejemplo n.º 1
0
        private void button3_Click(object sender, EventArgs e)
        {
            try
            {
                int      ogrNo = Convert.ToInt32(textBox1.Text);
                string[] d     = comboBox1.SelectedItem.ToString().Split(',');
                int      dersk = Convert.ToInt32(d[0]);

                not n = (from x in bs.nots where x.ogrNo == ogrNo && x.ders_kodu == dersk select x).FirstOrDefault();
                n.but = Convert.ToInt32(textBox4.Text);
                bs.SaveChanges();
            }
            catch (Exception)
            {
                throw;
            }
        }
Ejemplo n.º 2
0
        private void button6_Click(object sender, EventArgs e)
        {
            try
            {
                int      ogrNo = Convert.ToInt32(textBox5.Text);
                string[] d     = comboBox2.SelectedItem.ToString().Split(',');
                int      dersk = Convert.ToInt32(d[0]);

                not n = new not();
                n.vize      = Convert.ToInt32(textBox6.Text);
                n.ders_kodu = dersk;
                n.ogrNo     = ogrNo;
                bs.nots.Add(n);
                bs.SaveChanges();
            }
            catch (Exception)
            {
                throw;
            }
        }