string sFormId = "qw_gjjbmjfzcjh"; //表单名称
//Model字串
string sContent = "{\"Creator\":\"demo\",\"NeedUpDateFields\":[\"FNZPFJE\"],\"Model\":{\"FBillNo\":\"" + FBillNo + "\",\"FDocumentStatus\":\"\",\"FBMMC\":{\"FNumber\":\"" + node.SelectSingleNode("bmbh").InnerText.ToString() + "\"},\"FZXJFMC\":{\"FNumber\":\"" + node.SelectSingleNode("yslx").InnerText.ToString() + "\"},\"FYYJH\":" + node.SelectSingleNode("one").InnerText.ToString() + ",\"FEYJH\":" + node.SelectSingleNode("two").InnerText.ToString() + ",\"FSYJH\":" + node.SelectSingleNode("three").InnerText.ToString() + ",\"FLYJH\":" + node.SelectSingleNode("six").InnerText.ToString() + ",\"FSIYJH\":" + node.SelectSingleNode("four").InnerText.ToString() + ",\"FWYJH\":" + node.SelectSingleNode("five").InnerText.ToString() + ",\"FSHIYJH\":" + node.SelectSingleNode("ten").InnerText.ToString() + ",\"FSHIYYJH\":" + node.SelectSingleNode("eleven").InnerText.ToString() + ",\"FJYJH\":" + node.SelectSingleNode("nine").InnerText.ToString() + ",\"FQYJH\":" + node.SelectSingleNode("seven").InnerText.ToString() + ",\"FBYJH\":" + node.SelectSingleNode("eight").InnerText.ToString() + ",\"FSHIEYJH\":" + node.SelectSingleNode("twelven").InnerText.ToString() + ",\"FYYPF\":0,\"FEYPF\":0,\"FSYPF\":0,\"FSIYPF\":0,\"FLYPF\":0,\"FWYPF\":0,\"FSHIYPF\":0,\"FQYPF\":0,\"FSHIYYPF\":0,\"FSHIEYPF\":0,\"FJYPF\":0,\"FBYPF\":0,\"FNZPFJE\":" + node.SelectSingleNode("ysje").InnerText.ToString() + ",\"FYEAR\":" + node.SelectSingleNode("ysnd").InnerText.ToString() + ",\"FXMBH\":\"" + node.SelectSingleNode("zxbh").InnerText.ToString() + "\",\"FXMMC\":\"" + node.SelectSingleNode("xmmc").InnerText.ToString() + "\"}";
object[] saveInfo = new object[]
{
sFormId,
sContent
};
var retS = client.Execute
JObject resultObjj = JObject.Parse(retS);
if (resultObjj["Result"].First.First.First.First.ToString().ToUpper() == "TRUE")
{
return "2";//更新成功!
}
else
{
return "3";//更新失败
}
修改的时候,把需要更新的字段写在NeedUpDateFields中,执行操作会提示单据编号是必填项,不得为空。这是为什么?明明FBillNo这个字段给值了呀,求解答
推荐阅读