获取表单,并更新对象
string contractId = this.Request.BizObject["F0000002"] + string.Empty;
if(!string.IsNullOrEmpty(contractId))
{
H3.DataModel.BizObject contract = H3.DataModel.BizObject.Load(this.Request.UserContext.UserId,
this.Request.Engine, "D000143hetong", contractId, false);
if(contract["F0000046"] == "是")
{
response.Errors.Add("房源已退,禁止操作");
return;
}
if(contract["F0000021"] == "退房审批中")
{
response.Errors.Add("退房审批中,禁止其他操作");
return;
}
if(contract != null && this.Request.IsCreateMode)
{
if(contract["F0000021"] + string.Empty == "认购")
{
contract["F0000021"] = "退房审批中";
contract.Update();
}
}
}