移动BOS移动表单
金蝶云社区-King_xk
King_xk
1人赞赏了该文章 2,054次浏览 未经作者许可,禁止转载编辑于2017年10月11日 10:49:41

移动表单的保存自动提交、审核、反审核操作怎么做?有类似的dome没?

IOperationResult result = Kingdee.BOS.ServiceHelper.BusinessDataServiceHelper.Save(this.Context, _info, new DynamicObject[] { _currentSaleObj }, null, "Save");
if (result.IsSuccess)
{
if (result.SuccessDataEnity != null && result.SuccessDataEnity.Count() > 0)
{
DynamicObject successDy = result.SuccessDataEnity.FirstOrDefault();
string key = successDy.DynamicObjectType.PrimaryKey.Name;
//这就是保存成功后的主键值
int PrimaryKeyValue = Convert.ToInt32(successDy[key]);
}
StringBuilder mes = new StringBuilder();
foreach (OperateResult res in result.OperateResult)
{
mes.Append(res.Message).Append(";");
}
this.View.ShowMessage(mes.ToString());
}
else
{
StringBuilder stringBuilder = new StringBuilder();
OperateResultCollection operateResult = result.OperateResult;
foreach (OperateResult current in operateResult)
{
if (!current.SuccessStatus)
{
stringBuilder.AppendLine(current.Message + ";");
}
}
base.View.ShowErrMessage(string.Format("保存失败:{0}", stringBuilder.ToString()), "", MessageBoxType.Notice);
}