Example #1
0
 public void DeleteDoktor(Doktor doktor)
 {
     if ((doktor.EntityState != EntityState.Detached))
     {
         this.ObjectContext.ObjectStateManager.ChangeObjectState(doktor, EntityState.Deleted);
     }
     else
     {
         this.ObjectContext.Doktor.Attach(doktor);
         this.ObjectContext.Doktor.DeleteObject(doktor);
     }
 }
Example #2
0
 public void InsertDoktor(Doktor doktor)
 {
     if ((doktor.EntityState != EntityState.Detached))
     {
         this.ObjectContext.ObjectStateManager.ChangeObjectState(doktor, EntityState.Added);
     }
     else
     {
         this.ObjectContext.Doktor.AddObject(doktor);
     }
 }
Example #3
0
 public void UpdateDoktor(Doktor currentDoktor)
 {
     this.ObjectContext.Doktor.AttachAsModified(currentDoktor, this.ChangeSet.GetOriginal(currentDoktor));
 }
Example #4
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Doktor EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToDoktor(Doktor doktor)
 {
     base.AddObject("Doktor", doktor);
 }
Example #5
0
 /// <summary>
 /// Create a new Doktor object.
 /// </summary>
 /// <param name="iDDoktora">Initial value of the IDDoktora property.</param>
 /// <param name="osCislo">Initial value of the OsCislo property.</param>
 /// <param name="kodLekara">Initial value of the KodLekara property.</param>
 /// <param name="pZSId">Initial value of the PZSId property.</param>
 /// <param name="idUtvaru">Initial value of the IdUtvaru property.</param>
 /// <param name="den_nastupu">Initial value of the Den_nastupu property.</param>
 public static Doktor CreateDoktor(global::System.Int32 iDDoktora, global::System.Int32 osCislo, global::System.String kodLekara, global::System.Int32 pZSId, global::System.Int32 idUtvaru, global::System.DateTime den_nastupu)
 {
     Doktor doktor = new Doktor();
     doktor.IDDoktora = iDDoktora;
     doktor.OsCislo = osCislo;
     doktor.KodLekara = kodLekara;
     doktor.PZSId = pZSId;
     doktor.IdUtvaru = idUtvaru;
     doktor.Den_nastupu = den_nastupu;
     return doktor;
 }
 private void DetachDoktor(Doktor entity)
 {
     entity.IdentifikacneUdaje = null;
 }
 private bool FilterDoktor(Doktor entity)
 {
     return (entity.OsCislo == this.OsCislo);
 }
 private void AttachDoktor(Doktor entity)
 {
     entity.IdentifikacneUdaje = this;
 }
 private bool FilterDoktor2(Doktor entity)
 {
     return (entity.IDDoktora == this.NadradenyDoktor);
 }
 private bool FilterDoktor1(Doktor entity)
 {
     return (entity.NadradenyDoktor == this.IDDoktora);
 }
 private void DetachDoktor1(Doktor entity)
 {
     entity.Doktor2 = null;
 }
 private void AttachDoktor1(Doktor entity)
 {
     entity.Doktor2 = this;
 }