public ActionResult IndexPost(string lineId)
        {
            List <TPO.Model.Production.ProductionLineModel> productionLines = ProductionLineRepo.GetProductionLines(CurrentPlantId);

            ViewBag.productionLineSelectList = new SelectList(productionLines, "Code", "Code");
            ViewBag.lineId = lineId;

            List <CurrentRawMaterialDTO>       currentDTOList = GetRawMaterailListing(lineId);
            List <CurrentRawMaterialViewModel> model          = currentDTOList.Select(MapCurrentRawMaterialDTOToViewModel).ToList();

            return(View(model));
        }
        private ActionResult ShowEditView(CurrentRawMaterialViewModel vm)
        {
            var lines = ProductionLineRepo.GetProductionLines(vm.PlantId);

            ViewBag.LineID = new SelectList(lines, "Code", "Code");

            var rawMaterialCodes = RawMaterialReceivedRepo.GetAvailableRawMaterialIds(vm.PlantId);

            ViewBag.RawMaterialReceivedCode = new SelectList(rawMaterialCodes, vm.RawMaterialReceivedCode);

            var lots = RawMaterialReceivedRepo.GetAll(vm.PlantId, (int)(vm.RawMaterialReceivedId ?? 0));

            ViewBag.Lots = new SelectList(lots, "ID", "LotID", vm.RawMaterialReceivedId);

            return(View(vm));
        }
        // GET: /RawMaterialCurrent/Create
        public ActionResult Create(int plantId)
        {
            var model = new CurrentRawMaterialViewModel
            {
                PlantId      = plantId,
                LastModified = DateTime.Now,
                DateEntered  = DateTime.Now,
                ModifiedBy   = CurrentUser,
                EnteredBy    = CurrentUser
            };

            // MOCK DATA - PRODUCTION LINES
            var lines = ProductionLineRepo.GetProductionLines(plantId);

            ViewBag.LineID = new SelectList(lines, "Code", "Code");


            var rawMaterialCodes = RawMaterialReceivedRepo.GetAvailableRawMaterialIds(plantId);

            ViewBag.RawMaterialReceivedCode = new SelectList(rawMaterialCodes);


            return(View(model));
        }