Example #1
0
        public bool EditDrugBatch(DrugBatch drugBatch)
        {
            DrugBatch ret = DrugBatchRepository.GetInstance().Update(drugBatch);

            if (ret != null)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #2
0
        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);
        }
Example #3
0
 public bool DeleteDrugBatch(DrugBatch drugBatch)
 {
     return(DrugBatchRepository.GetInstance().Delete(drugBatch.DrugId));
 }
Example #4
0
 public DrugBatch AddDrugBatch(DrugBatch drugBatch)
 {
     return(DrugBatchRepository.GetInstance().Create(drugBatch));
 }