public bool UpdateServiceRefPatient(ServiceRefPatientDto serfPatient) { var tmp = db.tbServiceRef_Patients.FindById(serfPatient.Id); tmp.Barcode = serfPatient.Barcode; tmp.TestValue = serfPatient.TestValue; tmp.IDTestName = serfPatient.TestId; try { db.AcceptChanges(); return true; } catch (Exception) { return false; } }
public bool InsertServiceRefPatient(ServiceRefPatientDto refPatient) { db.tbServiceRef_Patients.AddtbServiceRef_PatientsRow(refPatient.Barcode, refPatient.TestId,refPatient.TestValue); try { db.AcceptChanges(); return true; } catch (Exception) { return false; } }