public ChartItem(Vysetrenie_Vysetrovane_latky vysledok) { DateTime datum; try { datum = (DateTime)vysledok.Vysetrenia.datum_schvalenia; Date = datum.ToString("dd/MM/yyyy"); } catch (Exception) { } if (vysledok.vysledok != null) { Value = vysledok.vysledok; } else if (vysledok.bin_vysledok != null) { if (vysledok.bin_vysledok == true) { Value = 1; } else { Value = 0; } } }
private bool FilterVysetrenie_Vysetrovane_latky(Vysetrenie_Vysetrovane_latky entity) { return ((entity.id_vysetrovana_latka == this.id_vysetrovana_latka) && (entity.id_material == this.id_material)); }
private void DetachVysetrenie_Vysetrovane_latky(Vysetrenie_Vysetrovane_latky entity) { entity.Vysetrovane_latky = null; }
private void AttachVysetrenie_Vysetrovane_latky(Vysetrenie_Vysetrovane_latky entity) { entity.Vysetrovane_latky = this; }
private bool FilterVysetrenie_Vysetrovane_latky(Vysetrenie_Vysetrovane_latky entity) { return (entity.id_vysetrenie == this.id_vysetrenie); }
/// <summary> /// Deprecated Method for adding a new object to the Vysetrenie_Vysetrovane_latky EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToVysetrenie_Vysetrovane_latky(Vysetrenie_Vysetrovane_latky vysetrenie_Vysetrovane_latky) { base.AddObject("Vysetrenie_Vysetrovane_latky", vysetrenie_Vysetrovane_latky); }
/// <summary> /// Create a new Vysetrenie_Vysetrovane_latky object. /// </summary> /// <param name="id_vysetrenie">Initial value of the id_vysetrenie property.</param> /// <param name="id_vysetrovana_latka">Initial value of the id_vysetrovana_latka property.</param> /// <param name="id_material">Initial value of the id_material property.</param> /// <param name="tombstone">Initial value of the tombstone property.</param> public static Vysetrenie_Vysetrovane_latky CreateVysetrenie_Vysetrovane_latky(global::System.Int32 id_vysetrenie, global::System.Int32 id_vysetrovana_latka, global::System.Int32 id_material, global::System.Boolean tombstone) { Vysetrenie_Vysetrovane_latky vysetrenie_Vysetrovane_latky = new Vysetrenie_Vysetrovane_latky(); vysetrenie_Vysetrovane_latky.id_vysetrenie = id_vysetrenie; vysetrenie_Vysetrovane_latky.id_vysetrovana_latka = id_vysetrovana_latka; vysetrenie_Vysetrovane_latky.id_material = id_material; vysetrenie_Vysetrovane_latky.tombstone = tombstone; return vysetrenie_Vysetrovane_latky; }
/// <summary> /// button evet click handler, handles showing prevoius screen, adds new Vzorka entity /// </summary> public IResult OnAdd() { if (this.Pacient != null && this.Ambulancia != null && this.ZamestnanecAmbulancie != null && this.Material != null && this.Laboratorium != null && this.DatumOdberu != null ) { PatientSummaryViewModel patient = _serviceLocator.GetInstance<PatientSummaryViewModel>(); patient.Obcan = Pacient; Vzorky novaVzorka = new Vzorky(); novaVzorka.Pacienti = ObcanPatient; novaVzorka.Ambulancie = this.Ambulancia; novaVzorka.Zamestnanci = this.Zamestanec; novaVzorka.Materialy = this.Material; novaVzorka.Diagnozy = Diagnoza; novaVzorka.datum_odberu = this.DatumOdberu; novaVzorka.komentar = this.Komentar; Lieky_Vzorky interferLiek; foreach (var item in InterferujuceLieky) { interferLiek = new Lieky_Vzorky(); interferLiek.Lieky = item; _laboratoryDomainContext.Lieky_Vzorkies.Add(interferLiek); novaVzorka.Lieky_Vzorky.Add(interferLiek); } _laboratoryDomainContext.Vzorkies.Add(novaVzorka); Vysetrenia noveVys = new Vysetrenia(); noveVys.komentar = "nespracované"; noveVys.Laboratoria = this.Laboratorium; noveVys.Vzorky = novaVzorka; Vysetrenie_Vysetrovane_latky novyVysl; foreach (var item in VysetrLatky) { novyVysl = new Vysetrenie_Vysetrovane_latky(); novyVysl.Vysetrovane_latky = item; _laboratoryDomainContext.Vysetrenie_Vysetrovane_latkies.Add(novyVysl); noveVys.Vysetrenie_Vysetrovane_latky.Add(novyVysl); } _laboratoryDomainContext.Vysetrenias.Add(noveVys); _laboratoryDomainContext.SubmitChanges().Completed += (sender, e) => { patient.AddVzorka(novaVzorka); }; return Show.Child(patient).In<IShellViewModel>(); } else { return null; } }
public void UpdateVysetrenie_Vysetrovane_latky(Vysetrenie_Vysetrovane_latky currentVysetrenie_Vysetrovane_latky) { this.ObjectContext.Vysetrenie_Vysetrovane_latky.AttachAsModified(currentVysetrenie_Vysetrovane_latky, this.ChangeSet.GetOriginal(currentVysetrenie_Vysetrovane_latky)); }
public void InsertVysetrenie_Vysetrovane_latky(Vysetrenie_Vysetrovane_latky vysetrenie_Vysetrovane_latky) { if ((vysetrenie_Vysetrovane_latky.EntityState != EntityState.Detached)) { this.ObjectContext.ObjectStateManager.ChangeObjectState(vysetrenie_Vysetrovane_latky, EntityState.Added); } else { this.ObjectContext.Vysetrenie_Vysetrovane_latky.AddObject(vysetrenie_Vysetrovane_latky); } }