Esempio n. 1
0
        public ViewResult ImportBudget()
        {
            var model = new BudgetImportWebModel();

            model.BudgetStatusList = new List <string> {
                "Orginalt", "Revidert"
            };
            return(View("ImportBudget", model));
        }
Esempio n. 2
0
        public ViewResult ImportBudget(HttpPostedFileBase uploadFile, BudgetImportWebModel model)
        {
            if (uploadFile.ContentLength > 0)
            {
                _budgetService.ImportFile(uploadFile.InputStream, model.BudgetYear, model.BudgetStatus, model.Comment);
            }

            model.BudgetStatusList = new List <string> {
                "Orginalt", "Revidert"
            };
            ViewData["Message"] = "Budsjettet er importert.";
            return(View("ImportBudget", model));
        }