// GET: DrugUnits/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            var drugUnit = _drugUnitsService.GetDrugUnitById(id);

            if (drugUnit == null)
            {
                return(HttpNotFound());
            }
            var       drugUnitModel = _mapper.AutoMapper.Map <DrugUnitDto, DrugUnitsViewModel>(drugUnit);
            LookupDto lookup;

            ViewBag.DepotId = new SelectList(_depotsService.GetDepotLookup(), nameof(lookup.Key), nameof(lookup.Value), drugUnit.DepotId);
            return(View(drugUnitModel));
        }
        public DepotSelectionViewModel GetDepotLookup()
        {
            var depots = _depotsService.GetDepotLookup();
            var model  = new DepotSelectionViewModel();

            LookupDto lookup;

            model.DepotsList = new SelectList(depots, nameof(lookup.Key), nameof(lookup.Value), model.SelectedDepotId);
            return(model);
        }
        public ActionResult DepotAvailableUnitsCalculation()
        {
            var depots = _depotsService.GetDepotLookup();
            var model  = new DepotSelectionViewModel();

            LookupDto lookup;

            model.DepotsList = new SelectList(depots, nameof(lookup.Key), nameof(lookup.Value), model.SelectedDepotId);
            return(View(model));
        }