public IEnumerable <StockMedi> GetStockMediByMedicament(Medicament m) { if (m != null) { return(StockMediDao.GetStockMediByMedicament(m)); } return(null); }
public Medicament DeleteMedicament(Medicament del, User user) { if (del != null) { List <VenteMedi> listv = VenteMediDao.GetVenteMediByMedicament(del).ToList(); List <StockMedi> lists = StockMediDao.GetStockMediByMedicament(del).ToList(); if (listv.Count == 0 && lists.Count == 0) { Medicament m = MedicamentDao.DeleteMedicament(del); if (m == null) { logger.Info(user.Login + " a supprime le medicament {" + m.LibelleMedicament + "," + m.Prix + "," + m.CodeFamille + "}"); return(null); } return(del); } } return(del); }