Exemple #1
0
        /// <summary>
        /// 取得平台插件实体
        /// </summary>
        /// <param name="userInfo">用户</param>
        /// <param name="id">主鍵</param>
        /// <returns>实体</returns>
        public PiPlatFormAddInEntity GetEntity(UserInfo userInfo, string id)
        {
            PiPlatFormAddInEntity entity = null;
            var parameter = ParameterUtil.CreateWithLog(userInfo, MethodBase.GetCurrentMethod());

            ServiceUtil.ProcessRDIReadDb(userInfo, parameter, dbProvider =>
            {
                entity = new PiPlatFormAddInManager(dbProvider, userInfo).GetEntity(id);
            });

            return(entity);
        }
Exemple #2
0
        /// <summary>
        /// 新增平台插件
        /// </summary>
        /// <param name="userInfo">用户</param>
        /// <param name="entity">实体</param>
        /// <param name="statusCode">返回状态码</param>
        /// <param name="statusMessage">返回状态信息</param>
        /// <returns>主鍵</returns>
        public string Add(UserInfo userInfo, PiPlatFormAddInEntity entity, out string statusCode, out string statusMessage)
        {
            string returnValue   = string.Empty;
            string returnCode    = string.Empty;
            string returnMessage = string.Empty;
            var    parameter     = ParameterUtil.CreateWithLog(userInfo, MethodBase.GetCurrentMethod());

            ServiceUtil.ProcessRDIReadDb(userInfo, parameter, dbProvider =>
            {
                var manager   = new PiPlatFormAddInManager(dbProvider, userInfo);
                returnValue   = manager.Add(entity, out returnCode);
                returnMessage = manager.GetStateMessage(returnCode);
            });
            statusCode    = returnCode;
            statusMessage = returnMessage;
            return(returnValue);
        }
Exemple #3
0
 /// <summary>
 /// 更新
 /// </summary>
 /// <param name="piPlatFormAddInEntity">实体</param>
 public int Update(PiPlatFormAddInEntity piPlatFormAddInEntity)
 {
     return(this.UpdateEntity(piPlatFormAddInEntity));
 }
Exemple #4
0
 /// <summary>
 /// 添加
 /// </summary>
 /// <param name="piPlatFormAddInEntity">实体</param>
 /// <param name="identity">自增量方式</param>
 /// <param name="returnId">返回主键</param>
 /// <returns>主键</returns>
 public string Add(PiPlatFormAddInEntity piPlatFormAddInEntity, bool identity, bool returnId)
 {
     this.Identity = identity;
     this.ReturnId = returnId;
     return(this.AddEntity(piPlatFormAddInEntity));
 }