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

            try
            {
                List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>();
                string[] arrStationIds = strStationIds.Split("|".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
                if (arrStationIds.Length == 0)
                {
                    result.Success   = false;
                    result.ErrorCode = 59996;
                    return(result);
                }
                string statementName = new StationInfo().GetUpdateMethodName();
                foreach (string strStationId in arrStationIds)
                {
                    StationInfo stationInfo = new StationInfo {
                        StationId = strStationId.ToGuid()
                    };                                                                              //没有Status 字段
                    /***********************begin 自定义代码*******************/
                    stationInfo.OperatedBy = NormalSession.UserId.ToGuid();
                    stationInfo.OperatedOn = DateTime.Now;
                    /***********************end 自定义代码*********************/
                    statements.Add(new IBatisNetBatchStatement {
                        StatementName = statementName, ParameterObject = stationInfo.ToStringObjectDictionary(false), Type = SqlExecuteType.UPDATE
                    });
                }
                BuilderFactory.DefaultBulder().ExecuteNativeSqlNoneQuery(statements);
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
        public ModelInvokeResult <StationInfoPK> Nullify(string strStationId)
        {
            ModelInvokeResult <StationInfoPK> result = new ModelInvokeResult <StationInfoPK> {
                Success = true
            };

            try
            {
                List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>();
                Guid?_StationId = strStationId.ToGuid();
                if (_StationId == null)
                {
                    result.Success   = false;
                    result.ErrorCode = 59996;
                    return(result);
                }
                StationInfo stationInfo = new StationInfo {
                    StationId = _StationId
                };                                                                   //没有Status 字段
                /***********************begin 自定义代码*******************/
                stationInfo.OperatedBy = NormalSession.UserId.ToGuid();
                stationInfo.OperatedOn = DateTime.Now;
                /***********************end 自定义代码*********************/
                statements.Add(new IBatisNetBatchStatement {
                    StatementName = stationInfo.GetUpdateMethodName(), ParameterObject = stationInfo.ToStringObjectDictionary(false), Type = SqlExecuteType.UPDATE
                });
                /***********************begin 自定义代码*******************/
                /***********************此处添加自定义代码*****************/
                /***********************end 自定义代码*********************/
                BuilderFactory.DefaultBulder().ExecuteNativeSqlNoneQuery(statements);
                result.instance = new StationInfoPK {
                    StationId = _StationId
                };
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
        public ModelInvokeResult <StationInfoPK> Create(StationInfo stationInfo)
        {
            ModelInvokeResult <StationInfoPK> result = new ModelInvokeResult <StationInfoPK> {
                Success = true
            };

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