public bool EditDrugBatch(DrugBatch drugBatch) { DrugBatch ret = DrugBatchRepository.GetInstance().Update(drugBatch); if (ret != null) { return(true); } else { return(false); } }
public List <DrugBatch> GetDrugBatches(Drug drug) { List <DrugBatch> temp = DrugBatchRepository.GetInstance().GetAll(); List <DrugBatch> ret = new List <DrugBatch>(); foreach (DrugBatch db in temp) { if (db.DrugId == drug.GetId()) { ret.Add(db); } } return(ret); }
public bool DeleteDrugBatch(DrugBatch drugBatch) { return(DrugBatchRepository.GetInstance().Delete(drugBatch.DrugId)); }
public DrugBatch AddDrugBatch(DrugBatch drugBatch) { return(DrugBatchRepository.GetInstance().Create(drugBatch)); }