Пример #1
0
        public List <string> GetMedicineChart(int id)
        {
            int           Count     = 0;
            List <string> CountList = new List <string>();
            Medicine      med       = bl.GetMedicines().FirstOrDefault(m => m.Id == id);
            IEnumerable <Prescription> Prescriptions = bl1.GetPrescriptionsByNameMed(med.CommercialName);

            for (int i = DateTime.Now.Month - 7; i < DateTime.Now.Month + 1; i++)
            {
                foreach (var prescription in Prescriptions)
                {
                    if (prescription.BeginTime.Month == i)
                    {
                        Count++;
                    }
                }
                CountList.Add(Count.ToString());
                Count = 0;
            }
            return(CountList);
        }
Пример #2
0
        public void Update(int id, string CommercialName, string GenericName, string Producer, string ActiveIngredients, string DoseCharacteristic, string image, string ndc)
        {
            Medicine medicine = new Medicine(CommercialName, GenericName, Producer, ActiveIngredients, DoseCharacteristic, image, ndc);

            bl.UpdateDrugs(medicine, id);
        }