public void InsertKegiatan(int idBalita, int idPosyandu, DateTime tgl, double bb, double tb) { using (DbBhmEntities dc = new DbBhmEntities()) { Kegiatan kegiatan = new Kegiatan(); kegiatan.idBalita = idBalita; kegiatan.idPosyandu = idPosyandu; kegiatan.tglPeriksa = tgl; kegiatan.bb = bb; kegiatan.tb = tb; dc.Kegiatans.AddObject(kegiatan); dc.SaveChanges(); } }
/// <summary> /// Deprecated Method for adding a new object to the Kegiatans EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToKegiatans(Kegiatan kegiatan) { base.AddObject("Kegiatans", kegiatan); }
/// <summary> /// Create a new Kegiatan object. /// </summary> /// <param name="idKeg">Initial value of the idKeg property.</param> /// <param name="idPosyandu">Initial value of the idPosyandu property.</param> /// <param name="idBalita">Initial value of the idBalita property.</param> public static Kegiatan CreateKegiatan(global::System.Int32 idKeg, global::System.Int32 idPosyandu, global::System.Int32 idBalita) { Kegiatan kegiatan = new Kegiatan(); kegiatan.idKeg = idKeg; kegiatan.idPosyandu = idPosyandu; kegiatan.idBalita = idBalita; return kegiatan; }