コード例 #1
0
        public ActionResult Add(Epm_TzPeopleChgApply model)
        {
            Result <int> result               = new Result <int>();
            string       fileDataJson         = Request.Form["fileDataJsonFile"];     //获取上传文件json字符串
            string       tzPeopleChgApplyItem = Request.Form["tzPeopleChgApplyItem"]; //获取人员变更情况json字符串

            if (!string.IsNullOrEmpty(fileDataJson))
            {
                model.TzAttachs = JsonConvert.DeserializeObject <List <Epm_TzAttachs> >(fileDataJson);//将文件信息json字符
            }

            if (!string.IsNullOrEmpty(tzPeopleChgApplyItem))
            {
                model.TzPeopleChgApplyItem = JsonConvert.DeserializeObject <List <Epm_TzPeopleChgApplyItem> >(tzPeopleChgApplyItem);
            }

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