public int getIdByName() { try { Data.SERVICIO service = Connection.LindaSonrisaDB.SERVICIO.First(re => re.DESCRIPCION == Description); return((int)service.ID); } catch (Exception) { return(0); } }
public bool ServiceNameById(int Id) { try { Data.SERVICIO service = Connection.LindaSonrisaDB.SERVICIO.First(serv => serv.ID == Id); ServiceName = service.DESCRIPCION; return(true); } catch { return(false); } }
public bool Read() { try { Data.SERVICIO service = Connection.LindaSonrisaDB.SERVICIO.First(servicio => servicio.ID == Id); Id = (int)service.ID; Description = service.DESCRIPCION; Price = (int)service.PRECIO; RutFunctionary = (int)service.RUT_FUNCIONARIO; return(true); } catch (Exception) { return(false); } }