Esempio n. 1
0
        // GET: Prescription/Create
        public ActionResult Create()
        {
            var model = new PrescriptionCreateViewModel {
                SaleTime = DateTime.Now
            };
            var allUsers    = _userBc.ReadAll() ?? new List <User>();
            var allMedicine = _medicineBc.ReadAll() ?? new List <Medicine>();

            model.AvailableUsers    = allUsers.Select(elem => new UserViewModel(elem));
            model.AvailableMedicine = allMedicine.Select(elem => new MedicineDetailsViewModel(elem, 0, 0));

            return(View(model));
        }