Example #1
0
 protected void btnEkle_Click(object sender, EventArgs e)
 {
     using (sfKalDataEntities ent = new sfKalDataEntities())
     {
         Cihaz oCihaz = new Cihaz();
         oCihaz.CIHAZADI = txtYeniCihazEkleCihazAdi.Text.Trim();
         oCihaz.LAB = ddlYeniCihazEkleCihazLab.SelectedItem.Text;
         ent.AddToCihaz(oCihaz);
         ent.SaveChanges();
     }
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the Cihaz EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToCihaz(Cihaz cihaz)
 {
     base.AddObject("Cihaz", cihaz);
 }
 /// <summary>
 /// Create a new Cihaz object.
 /// </summary>
 /// <param name="id">Initial value of the ID property.</param>
 /// <param name="lAB">Initial value of the LAB property.</param>
 public static Cihaz CreateCihaz(global::System.Int32 id, global::System.String lAB)
 {
     Cihaz cihaz = new Cihaz();
     cihaz.ID = id;
     cihaz.LAB = lAB;
     return cihaz;
 }