예제 #1
0
 public override bool Insert()
 {
     if (ObsluhaStlpu != null && IdSluzby == ObsluhaStlpu.IdSluzby)
     {
         return(!Databaza.VlozServisStlpu(Sluzba.RodneCislo, ObsluhaStlpu.Cislo, Sluzba.Popis, Sluzba.Trvanie, DateTime.Parse(Sluzba.Datum), Cena).JeChyba);
     }
     if (ObsluhaLampy != null && IdSluzby == ObsluhaLampy.IdSluzby)
     {
         return(!Databaza.VlozServisLampy(Sluzba.RodneCislo, ObsluhaLampy.IdLampy, Sluzba.Popis, Sluzba.Trvanie, DateTime.Parse(Sluzba.Datum), Cena).JeChyba);
     }
     return(false);
 }
예제 #2
0
 public override bool Insert()
 {
     return(UseDbMethod(Databaza.VlozServisLampy(RodneCislo, IdLampy, Popis,
                                                 Trvanie, Datum, Cena)));
 }