public InvokeResult NullifySelected(string strtableJoinIds)
        {
            InvokeResult result = new InvokeResult {
                Success = true
            };

            try
            {
                List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>();
                string[] arrTableJoinIds = strtableJoinIds.Split("|".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
                if (arrTableJoinIds.Length == 0)
                {
                    result.Success   = false;
                    result.ErrorCode = 59996;
                    return(result);
                }
                string statementName = new TableJoin().GetUpdateMethodName();
                foreach (string strtableJoinId in arrTableJoinIds)
                {
                    TableJoin tableJoinInfo = new TableJoin {
                        Id = int.Parse(strtableJoinId), Status = 0
                    };
                    /***********************begin 自定义代码*******************/
                    TableJoinPK pk = new TableJoinPK {
                        Id = int.Parse(strtableJoinId)
                    };
                    DeleteCascade(statements, pk, "update");
                    tableJoinInfo.OperatedBy = NormalSession.UserId.ToGuid();
                    tableJoinInfo.OperatedOn = DateTime.Now;

                    /***********************end 自定义代码*********************/
                    statements.Add(new IBatisNetBatchStatement {
                        StatementName = statementName, ParameterObject = tableJoinInfo.ToStringObjectDictionary(false), Type = SqlExecuteType.UPDATE
                    });
                }
                BuilderFactory.DefaultBulder().ExecuteNativeSqlNoneQuery(statements);
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
        public ModelInvokeResult <TableJoinPK> Nullify(string strtableJoinId)
        {
            ModelInvokeResult <TableJoinPK> result = new ModelInvokeResult <TableJoinPK> {
                Success = true
            };

            try
            {
                List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>();
                int?_strtableJoinId = int.Parse(strtableJoinId);
                if (_strtableJoinId == null)
                {
                    result.Success   = false;
                    result.ErrorCode = 59996;
                    return(result);
                }

                TableJoin tableJoinInfo = new TableJoin {
                    Id = _strtableJoinId, Status = 0
                };
                /***********************begin 自定义代码*******************/
                tableJoinInfo.OperatedBy = NormalSession.UserId.ToGuid();
                tableJoinInfo.OperatedOn = DateTime.Now;

                /***********************end 自定义代码*********************/
                statements.Add(new IBatisNetBatchStatement {
                    StatementName = tableJoinInfo.GetUpdateMethodName(), ParameterObject = tableJoinInfo.ToStringObjectDictionary(false), Type = SqlExecuteType.UPDATE
                });
                /***********************begin 自定义代码*******************/
                /***********************此处添加自定义代码*****************/
                /***********************end 自定义代码*********************/
                BuilderFactory.DefaultBulder().ExecuteNativeSqlNoneQuery(statements);
                result.instance = new TableJoinPK {
                };
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
        public ModelInvokeResult <TableJoinPK> Create(TableJoin tableJoinInfo)
        {
            ModelInvokeResult <TableJoinPK> result = new ModelInvokeResult <TableJoinPK> {
                Success = true
            };

            try
            {
                List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>();
                if (tableJoinInfo.Id == -1)
                {
                    tableJoinInfo.Id = null;
                }
                /***********************begin 自定义代码*******************/
                tableJoinInfo.OperatedBy = NormalSession.UserId.ToGuid();
                tableJoinInfo.OperatedOn = DateTime.Now;
                /***********************end 自定义代码*********************/
                statements.Add(new IBatisNetBatchStatement {
                    StatementName = tableJoinInfo.GetCreateMethodName(), ParameterObject = tableJoinInfo.ToStringObjectDictionary(false), Type = SqlExecuteType.INSERT
                });
                /***********************begin 自定义代码*******************/
                /***********************此处添加自定义代码*****************/
                /***********************end 自定义代码*********************/
                BuilderFactory.DefaultBulder().ExecuteNativeSqlNoneQuery(statements);
                result.instance = new TableJoinPK {
                };
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }