Пример #1
0
        public ActionResult WorkItemPost()
        {
            var httpPostedFileBase = Request.Files["workItem"];

            if (httpPostedFileBase == null || httpPostedFileBase.FileName == "")
            {
                ViewBag.ErrorMessage = "上传文件为空!请先上传文件。";
            }
            else
            {
                var path = httpPostedFileBase.UploadKpiFile();
                ViewBag.Message = _workItemService.ImportExcelFiles(path);
            }
            return(View("WorkItemImport"));
        }