public async Task <Haematology> SaveHaematologyAsync(Haematology haematology) { using (var txScope = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled)) { if (haematology.IsNew) { await AddHaematologyAsync(haematology); } else { await UpdateHaematologyAsync(haematology); } // One To One if (haematology.Patient != null) { if (haematology.Patient.IsDeleted) { var id = haematology.Patient.PatientID; await Conn.DeleteByIdAsync <Patient>(id); } else if (!haematology.Patient.IsDeleted) { var patient = haematology.Patient; patient.PatientID = haematology.SerialNo; await Conn.SaveAsync(patient); } } txScope.Complete(); } return(haematology); }
public async Task <Haematology> AddHaematologyAsync(Haematology haematology) { await Conn.InsertAsync(haematology); haematology.SerialNo = Conn.LastInsertId(); return(haematology); }
public Haematology SaveHaematology(Haematology haematology) { using (var txScope = new TransactionScope()) { if (haematology.IsNew) { AddHaematology(haematology); } else { UpdateHaematology(haematology); } // One To One if (haematology.Patient != null) { var patient = haematology.Patient; patient.PatientID = haematology.SerialNo; Conn.Save(patient); } txScope.Complete(); } return(haematology); }
public async Task <Haematology> SaveHaematologyAsync(Haematology haematology) { return(null); }
public Haematology UpdateHaematology(Haematology haematology) { var result = Conn.Update(haematology); return(haematology); }
public Task <Haematology> AddHaematologyAsync(Haematology haematology) { return(null); }
public Haematology AddHaematology(Haematology haematology) { Conn.Insert(haematology); haematology.SerialNo = Conn.LastInsertId(); return(haematology); }
public Haematology SaveHaematology(Haematology haematology) { return(null); }
public Haematology UpdateHaematology(Haematology haematology) { return(null); }
public Haematology AddHaematology(Haematology haematology) { return(null); }
public async Task <Haematology> UpdateHaematologyAsync(Haematology haematology) { await Conn.UpdateAsync(haematology); return(haematology); }