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

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

            try
            {
                List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>();
                string[] arrRequisitionIds = strRequisitionIds.Split("|".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
                if (arrRequisitionIds.Length == 0)
                {
                    result.Success   = false;
                    result.ErrorCode = 59996;
                    return(result);
                }
                string statementName = new EvaluatedRequisition().GetDeleteMethodName();
                foreach (string strRequisitionId in arrRequisitionIds)
                {
                    EvaluatedRequisitionPK pk = new EvaluatedRequisitionPK {
                        RequisitionId = strRequisitionId.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, EvaluatedRequisitionPK pk)
 {
     //此处增加级联删除代码
 }