Exemple #1
0
        //[AuthCheck(Module = WebModule.Bim, Right = SystemRight.Add)]
        public ActionResult Add(Epm_Bim model)
        {
            ResultView <int> view = new ResultView <int>();

            //上传模型
            string            fileDataJson = Request.Form["fileDataJsonFile"];                                 //获取上传图片json字符串
            List <Base_Files> fileListFile = JsonConvert.DeserializeObject <List <Base_Files> >(fileDataJson); //将文件信息json字符

            //表单校验
            //if (string.IsNullOrEmpty(model.Name))
            //{
            //    view.Flag = false;
            //    view.Message = "名称不能为空";
            //    return Json(view);
            //}
            //if (string.IsNullOrEmpty(model.VersionOrder))
            //{
            //    view.Flag = false;
            //    view.Message = "版本号不能为空";
            //    return Json(view);
            //}

            if (fileListFile != null)
            {
                model.BIMState = BIMModelState.BIMLightWeight.ToString();
            }
            Result <int> result = new Result <int>();

            using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request)))
            {
                result = proxy.AddBim(model, fileListFile);
            }
            return(Json(result.ToResultView()));
        }