// -------------------------------------------------------
        // 查询
        // -------------------------------------------------------

        #region 函数:FindOne(string id)
        /// <summary>查询某条记录</summary>
        /// <param name="id">标识</param>
        /// <returns>返回实例<see cref="AccountLogInfo"/>的详细信息</returns>
        public AccountLogInfo FindOne(string id)
        {
            Dictionary <string, object> args = new Dictionary <string, object>();

            args.Add("Id", StringHelper.ToSafeSQL(id));

            AccountLogInfo param = this.ibatisMapper.QueryForObject <AccountLogInfo>(StringHelper.ToProcedurePrefix(string.Format("{0}_FindOne", tableName)), args);

            return(param);
        }
        // -------------------------------------------------------
        // 添加 删除 修改
        // -------------------------------------------------------

        #region 函数:Save(AccountLogInfo param)
        /// <summary>保存记录</summary>
        /// <param name="param">实例<see cref="AccountLogInfo"/>详细信息</param>
        /// <returns>实例<see cref="AccountLogInfo"/>详细信息</returns>
        public AccountLogInfo Save(AccountLogInfo param)
        {
            if (!IsExist(param.Id))
            {
                Insert(param);
            }
            else
            {
                Update(param);
            }

            return(param);
        }
Esempio n. 3
0
        // -------------------------------------------------------
        // 查询
        // -------------------------------------------------------

        #region 函数:FindOne(XmlDocument doc)
        /// <summary>获取详细信息</summary>
        /// <param name="doc">Xml 文档对象</param>
        /// <returns>返回操作结果</returns>
        public string FindOne(XmlDocument doc)
        {
            StringBuilder outString = new StringBuilder();

            string id = XmlHelper.Fetch("id", doc);

            AccountLogInfo param = this.service.FindOne(id);

            outString.Append("{\"data\":" + AjaxUtil.Parse <AccountLogInfo>(param) + ",");

            outString.Append(MessageObject.Stringify("0", I18n.Strings["msg_query_success"], true) + "}");

            return(outString.ToString());
        }
Esempio n. 4
0
        /// <summary>保存日志信息</summary>
        /// <param name="accountId">帐号标识</param>
        /// <param name="optionName">操作名称:登录 编辑 删除</param>
        /// <param name="originalObject">原始的对象信息</param>
        /// <param name="description">描述信息</param>
        /// <param name="optionAccountId">操作人的帐号标识</param>
        /// <returns>0 保存成功 | 1 保存失败</returns>
        public int Log(string accountId, string optionName, IAccountInfo originalObject, string description, string optionAccountId)
        {
            IAccountInfo account = KernelContext.Current.User;

            // 保存实体数据操作记录
            AccountLogInfo param = new AccountLogInfo();

            param.Id                  = DigitalNumberContext.Generate("Key_Guid");
            param.AccountId           = accountId;
            param.OperatedBy          = optionAccountId;
            param.OperationName       = optionName;
            param.OriginalObjectValue = originalObject == null ? string.Empty : originalObject.Serializable();
            param.Description         = description;
            param.CreatedDate         = DateTime.Now;

            param = this.Save(param);

            return(param == null ? 1 : 0);
        }
Esempio n. 5
0
        // -------------------------------------------------------
        // 保存 删除
        // -------------------------------------------------------

        #region 函数:Save(AccountLogInfo param)
        /// <summary>保存记录</summary>
        /// <param name="param">实例<see cref="AccountLogInfo"/>详细信息</param>
        /// <returns>实例<see cref="AccountLogInfo"/>详细信息</returns>
        public AccountLogInfo Save(AccountLogInfo param)
        {
            return(this.provider.Save(param));
        }
 /// <summary>修改记录</summary>
 /// <param name="param">实例<see cref="AccountLogInfo"/>详细信息</param>
 public void Update(AccountLogInfo param)
 {
     this.ibatisMapper.Update(StringHelper.ToProcedurePrefix(string.Format("{0}_Update", tableName)), param);
 }
 /// <summary>添加记录</summary>
 /// <param name="param">实例<see cref="AccountLogInfo"/>详细信息</param>
 public void Insert(AccountLogInfo param)
 {
     this.ibatisMapper.Insert(StringHelper.ToProcedurePrefix(string.Format("{0}_Insert", tableName)), param);
 }