Пример #1
0
        protected void btn_Save_Click(object sender, DirectEventArgs e)
        {
            int fakId = Convert.ToInt32(cmbx_fakulte.Value);
            int subeSayisi = Convert.ToInt32(txt_subeSayisi.Text);
            SyllabusDbEntities db;
            using (db = new SyllabusDbEntities())
            {
                Bolum bolum = new Bolum();
                bolum.fakulte_ID = fakId;
                bolum.bolum_Kodu = txt_bolumKodu.Text;
                bolum.bolum_Adi = txt_bolumAdi.Text;
                bolum.bolum_Baskani_Kodu = txt_baskanKod.Text;
                bolum.sube_Sayisi = subeSayisi;

                db.AddToBolums(bolum);
                db.SaveChanges();
            }
            AddStore();
            ClearText();
        }
Пример #2
0
 /// <summary>
 /// Create a new Bolum object.
 /// </summary>
 /// <param name="bolum_ID">Initial value of the bolum_ID property.</param>
 /// <param name="fakulte_ID">Initial value of the fakulte_ID property.</param>
 /// <param name="bolum_Kodu">Initial value of the bolum_Kodu property.</param>
 /// <param name="bolum_Adi">Initial value of the bolum_Adi property.</param>
 /// <param name="bolum_Baskani_Kodu">Initial value of the bolum_Baskani_Kodu property.</param>
 public static Bolum CreateBolum(global::System.Int32 bolum_ID, global::System.Int32 fakulte_ID, global::System.String bolum_Kodu, global::System.String bolum_Adi, global::System.String bolum_Baskani_Kodu)
 {
     Bolum bolum = new Bolum();
     bolum.bolum_ID = bolum_ID;
     bolum.fakulte_ID = fakulte_ID;
     bolum.bolum_Kodu = bolum_Kodu;
     bolum.bolum_Adi = bolum_Adi;
     bolum.bolum_Baskani_Kodu = bolum_Baskani_Kodu;
     return bolum;
 }
Пример #3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Bolums EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToBolums(Bolum bolum)
 {
     base.AddObject("Bolums", bolum);
 }