public InvokeResult NullifySelected(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().GetUpdateMethodName();
                foreach (string strFlowDefineId in arrFlowDefineIds)
                {
                    FlowDefine flowDefine = new FlowDefine {
                        FlowDefineId = strFlowDefineId.ToGuid(), Status = 0
                    };
                    /***********************begin 自定义代码*******************/
                    flowDefine.OperatedBy = NormalSession.UserId.ToGuid();
                    flowDefine.OperatedOn = DateTime.Now;
                    /***********************end 自定义代码*********************/
                    statements.Add(new IBatisNetBatchStatement {
                        StatementName = statementName, ParameterObject = flowDefine.ToStringObjectDictionary(false), Type = SqlExecuteType.UPDATE
                    });
                }
                BuilderFactory.DefaultBulder(GetHttpHeader("ConnectId")).ExecuteNativeSqlNoneQuery(statements);
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
        public ModelInvokeResult <FlowDefinePK> Nullify(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);
                }
                FlowDefine flowDefine = new FlowDefine {
                    FlowDefineId = _FlowDefineId, Status = 0
                };
                /***********************begin 自定义代码*******************/
                flowDefine.OperatedBy = NormalSession.UserId.ToGuid();
                flowDefine.OperatedOn = DateTime.Now;
                /***********************end 自定义代码*********************/
                statements.Add(new IBatisNetBatchStatement {
                    StatementName = flowDefine.GetUpdateMethodName(), ParameterObject = flowDefine.ToStringObjectDictionary(false), Type = SqlExecuteType.UPDATE
                });
                /***********************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 ModelInvokeResult <FlowDefinePK> Create(FlowDefine flowDefine)
        {
            ModelInvokeResult <FlowDefinePK> result = new ModelInvokeResult <FlowDefinePK> {
                Success = true
            };

            try
            {
                List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>();
                if (flowDefine.FlowDefineId == GlobalManager.GuidAsAutoGenerate)
                {
                    flowDefine.FlowDefineId = Guid.NewGuid();
                }
                /***********************begin 自定义代码*******************/
                flowDefine.OperatedBy = NormalSession.UserId.ToGuid();
                flowDefine.OperatedOn = DateTime.Now;
                /***********************end 自定义代码*********************/
                statements.Add(new IBatisNetBatchStatement {
                    StatementName = flowDefine.GetCreateMethodName(), ParameterObject = flowDefine.ToStringObjectDictionary(false), Type = SqlExecuteType.INSERT
                });
                /***********************begin 自定义代码*******************/
                /***********************此处添加自定义代码*****************/
                /***********************end 自定义代码*********************/
                BuilderFactory.DefaultBulder(GetHttpHeader("ConnectId")).ExecuteNativeSqlNoneQuery(statements);
                result.instance = new FlowDefinePK {
                    FlowDefineId = flowDefine.FlowDefineId
                };
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }