コード例 #1
0
        public ModelInvokeResult <TreeItemPK> Update(string strTreeId, string strItemId, TreeItem treeItem)
        {
            ModelInvokeResult <TreeItemPK> result = new ModelInvokeResult <TreeItemPK> {
                Success = true
            };

            try
            {
                List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>();
                string _TreeId = strTreeId;
                treeItem.TreeId = _TreeId;
                string _ItemId = strItemId;
                treeItem.ItemId = _ItemId;
                statements.Add(new IBatisNetBatchStatement {
                    StatementName = treeItem.GetUpdateMethodName(), ParameterObject = treeItem.ToStringObjectDictionary(false), Type = SqlExecuteType.UPDATE
                });
                /***********************begin 自定义代码*******************/
                /***********************此处添加自定义代码*****************/
                /***********************end 自定义代码*********************/
                BuilderFactory.DefaultBulder().ExecuteNativeSqlNoneQuery(statements);
                result.instance = new TreeItemPK {
                    TreeId = _TreeId, ItemId = _ItemId
                };
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }