Exemplo n.º 1
0
        public ActionResult Add(Epm_TzConDrawing model)
        {
            Result <int>      result       = new Result <int>();
            List <Base_Files> fileListFile = new List <Base_Files>();

            string fileDataJson = Request.Form["fileDataJsonFile"];//获取上传文件json字符串

            if (!string.IsNullOrEmpty(fileDataJson))
            {
                model.TzAttachs = JsonConvert.DeserializeObject <List <Epm_TzAttachs> >(fileDataJson); //将文件信息json字符
            }
            if (model.TzAttachs != null && model.TzAttachs.Count != 0)
            {
                var res = model.TzAttachs.Where(p => p.TypeNo.Contains("SGTZSHTZ")).FirstOrDefault();
                if (res != null)
                {
                    fileListFile = JsonConvert.DeserializeObject <List <Base_Files> >(fileDataJson);//将文件信息json字符---上传到图纸管理
                }
            }


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