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

            try
            {
                List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>();
                string[] arrFamilyIds = strFamilyIds.Split("|".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
                if (arrFamilyIds.Length == 0)
                {
                    result.Success   = false;
                    result.ErrorCode = 59996;
                    return(result);
                }
                string statementName = new FamilyBaseInfo().GetUpdateMethodName();
                foreach (string strFamilyId in arrFamilyIds)
                {
                    FamilyBaseInfo familyBaseInfo = new FamilyBaseInfo {
                        FamilyId = strFamilyId.ToGuid(), Status = 0
                    };
                    /***********************begin 自定义代码*******************/
                    familyBaseInfo.OperatedBy = NormalSession.UserId.ToGuid();
                    familyBaseInfo.OperatedOn = DateTime.Now;
                    familyBaseInfo.DataSource = GlobalManager.DIKey_00012_ManualEdit;
                    /***********************end 自定义代码*********************/
                    statements.Add(new IBatisNetBatchStatement {
                        StatementName = statementName, ParameterObject = familyBaseInfo.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 <FamilyBaseInfoPK> Nullify(string strFamilyId)
        {
            ModelInvokeResult <FamilyBaseInfoPK> result = new ModelInvokeResult <FamilyBaseInfoPK> {
                Success = true
            };

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

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