public override bool Update() { if (ObsluhaStlpu != null && IdSluzby == ObsluhaStlpu.IdSluzby) { return(!Databaza.UpdateServisuStlpu(IdSluzby, Sluzba.RodneCislo, ObsluhaStlpu.Cislo, Sluzba.Popis, Sluzba.Trvanie, DateTime.Parse(Sluzba.Datum), Cena).JeChyba); } if (ObsluhaLampy != null && IdSluzby == ObsluhaLampy.IdSluzby) { return(!Databaza.UpdateServisuLampy(IdSluzby, Sluzba.RodneCislo, ObsluhaLampy.IdLampy, Sluzba.Popis, Sluzba.Trvanie, DateTime.Parse(Sluzba.Datum), Cena).JeChyba); } return(false); }
public override bool Update() { return(UseDbMethod(Databaza.UpdateServisuLampy(IdSluzby, RodneCislo, IdLampy, Popis, Trvanie, Datum, Cena))); }