// -------------------------------------------------------
        // 保存 删除
        // -------------------------------------------------------

        #region 函数:Save(IAccountGrantInfo param)
        /// <summary>保存记录</summary>
        /// <param name="param">实例<see cref="IAccountGrantInfo"/>详细信息</param>
        /// <returns>实例<see cref="IAccountGrantInfo"/>详细信息</returns>
        public IAccountGrantInfo Save(IAccountGrantInfo param)
        {
            // 格式委托开始时间为 00:00:00
            param.GrantedTimeFrom = Convert.ToDateTime(param.GrantedTimeFrom.ToString("yyyy-MM-dd 00:00:00"));
            // 格式委托结束时间为 23:59:59,避免委托结束当天没有收到待办信息
            param.GrantedTimeTo = Convert.ToDateTime(param.GrantedTimeTo.ToString("yyyy-MM-dd 23:59:59"));

            return(this.provider.Save(param));
        }
Пример #2
0
        // -------------------------------------------------------
        // 添加 删除 修改
        // -------------------------------------------------------

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

            return(param);
        }
Пример #3
0
        public string FindOne(XmlDocument doc)
        {
            StringBuilder outString = new StringBuilder();

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

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

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

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

            return(outString.ToString());
        }
Пример #4
0
        /// <summary>添加记录</summary>
        /// <param name="param">实例<see cref="IAccountGrantInfo"/>详细信息</param>
        public void Insert(IAccountGrantInfo param)
        {
            if (string.IsNullOrEmpty(param.Id))
            {
                param.Id = DigitalNumberContext.Generate("Key_Guid");
            }

            if (string.IsNullOrEmpty(param.Code))
            {
                param.Code = DigitalNumberContext.Generate("Table_Account_Grant_Key_Code");
            }

            this.ibatisMapper.Insert(StringHelper.ToProcedurePrefix(string.Format("{0}_Insert", tableName)), param);
        }
        // -------------------------------------------------------
        // 同步管理
        // -------------------------------------------------------

        #region 函数:SyncFromPackPage(IAccountGrantInfo param)
        /// <summary>同步信息</summary>
        /// <param name="param">帐号信息</param>
        public int SyncFromPackPage(IAccountGrantInfo param)
        {
            return(this.provider.SyncFromPackPage(param));
        }
Пример #6
0
        // -------------------------------------------------------
        // 同步管理
        // -------------------------------------------------------

        #region 函数:SyncFromPackPage(IAccountGrantInfo param)
        /// <summary>同步信息</summary>
        /// <param name="param">帐号信息</param>
        public int SyncFromPackPage(IAccountGrantInfo param)
        {
            this.ibatisMapper.Insert(StringHelper.ToProcedurePrefix(string.Format("{0}_SyncFromPackPage", tableName)), param);

            return(0);
        }
Пример #7
0
 /// <summary>修改记录</summary>
 /// <param name="param">实例<see cref="IAccountGrantInfo"/>详细信息</param>
 public void Update(IAccountGrantInfo param)
 {
     this.ibatisMapper.Update(StringHelper.ToProcedurePrefix(string.Format("{0}_Update", tableName)), param);
 }