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

            try
            {
                List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>();
                string[] arrResidentIds = strResidentIds.Split("|".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
                if (arrResidentIds.Length == 0)
                {
                    result.Success   = false;
                    result.ErrorCode = 59996;
                    return(result);
                }
                string statementName = new EvaluatedBaseInfo().GetUpdateMethodName();
                foreach (string strResidentId in arrResidentIds)
                {
                    EvaluatedBaseInfo evaluatedBaseInfo = new EvaluatedBaseInfo {
                        ResidentId = strResidentId.ToGuid(), Status = 0
                    };
                    /***********************begin 自定义代码*******************/
                    evaluatedBaseInfo.OperatedBy = NormalSession.UserId.ToGuid();
                    evaluatedBaseInfo.OperatedOn = DateTime.Now;
                    evaluatedBaseInfo.DataSource = GlobalManager.DIKey_00012_ManualEdit;
                    /***********************end 自定义代码*********************/
                    statements.Add(new IBatisNetBatchStatement {
                        StatementName = statementName, ParameterObject = evaluatedBaseInfo.ToStringObjectDictionary(false), Type = SqlExecuteType.UPDATE
                    });
                }
                BuilderFactory.DefaultBulder().ExecuteNativeSqlNoneQuery(statements);
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
        public ModelInvokeResult <EvaluatedBaseInfoPK> Nullify(string strResidentId)
        {
            ModelInvokeResult <EvaluatedBaseInfoPK> result = new ModelInvokeResult <EvaluatedBaseInfoPK> {
                Success = true
            };

            try
            {
                List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>();
                Guid?_ResidentId = strResidentId.ToGuid();
                if (_ResidentId == null)
                {
                    result.Success   = false;
                    result.ErrorCode = 59996;
                    return(result);
                }
                EvaluatedBaseInfo evaluatedBaseInfo = new EvaluatedBaseInfo {
                    ResidentId = _ResidentId, Status = 0
                };
                /***********************begin 自定义代码*******************/
                evaluatedBaseInfo.OperatedBy = NormalSession.UserId.ToGuid();
                evaluatedBaseInfo.OperatedOn = DateTime.Now;
                evaluatedBaseInfo.DataSource = GlobalManager.DIKey_00012_ManualEdit;
                /***********************end 自定义代码*********************/
                statements.Add(new IBatisNetBatchStatement {
                    StatementName = evaluatedBaseInfo.GetUpdateMethodName(), ParameterObject = evaluatedBaseInfo.ToStringObjectDictionary(false), Type = SqlExecuteType.UPDATE
                });
                /***********************begin 自定义代码*******************/
                /***********************此处添加自定义代码*****************/
                /***********************end 自定义代码*********************/
                BuilderFactory.DefaultBulder().ExecuteNativeSqlNoneQuery(statements);
                result.instance = new EvaluatedBaseInfoPK {
                    ResidentId = _ResidentId
                };
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
        public ModelInvokeResult <EvaluatedBaseInfoPK> Create(EvaluatedBaseInfo evaluatedBaseInfo)
        {
            ModelInvokeResult <EvaluatedBaseInfoPK> result = new ModelInvokeResult <EvaluatedBaseInfoPK> {
                Success = true
            };

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