public ModelInvokeResult <FlowDefinePK> Delete(string strFlowDefineId)
        {
            ModelInvokeResult <FlowDefinePK> result = new ModelInvokeResult <FlowDefinePK> {
                Success = true
            };

            try
            {
                List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>();
                Guid?_FlowDefineId = strFlowDefineId.ToGuid();
                if (_FlowDefineId == null)
                {
                    result.Success   = false;
                    result.ErrorCode = 59996;
                    return(result);
                }
                FlowDefinePK pk = new FlowDefinePK {
                    FlowDefineId = _FlowDefineId
                };
                DeleteCascade(statements, pk);
                statements.Add(new IBatisNetBatchStatement {
                    StatementName = new FlowDefine().GetDeleteMethodName(), ParameterObject = pk, Type = SqlExecuteType.DELETE
                });
                /***********************begin 自定义代码*******************/
                /***********************此处添加自定义代码*****************/
                /***********************end 自定义代码*********************/
                BuilderFactory.DefaultBulder(GetHttpHeader("ConnectId")).ExecuteNativeSqlNoneQuery(statements);
                result.instance = new FlowDefinePK {
                    FlowDefineId = _FlowDefineId
                };
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
        public InvokeResult DeleteSelected(string strFlowDefineIds)
        {
            InvokeResult result = new InvokeResult {
                Success = true
            };

            try
            {
                List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>();
                string[] arrFlowDefineIds = strFlowDefineIds.Split("|".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
                if (arrFlowDefineIds.Length == 0)
                {
                    result.Success   = false;
                    result.ErrorCode = 59996;
                    return(result);
                }
                string statementName = new FlowDefine().GetDeleteMethodName();
                foreach (string strFlowDefineId in arrFlowDefineIds)
                {
                    FlowDefinePK pk = new FlowDefinePK {
                        FlowDefineId = strFlowDefineId.ToGuid()
                    };
                    DeleteCascade(statements, pk);
                    statements.Add(new IBatisNetBatchStatement {
                        StatementName = statementName, ParameterObject = pk, Type = SqlExecuteType.DELETE
                    });
                }
                BuilderFactory.DefaultBulder(GetHttpHeader("ConnectId")).ExecuteNativeSqlNoneQuery(statements);
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
 private void DeleteCascade(List <IBatisNetBatchStatement> statements, FlowDefinePK pk)
 {
     //此处增加级联删除代码
 }