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); }