示例#1
0
        /// <summary>
        /// 保存系统配置的用户短信回复执行人配置列表
        /// </summary>
        /// <param name="value">参数值</param>
        /// <returns>返回: true 成功 false 失败</returns>
        /// <remarks>2014-03-05 邵斌 创建</remarks>
        public bool SaveExecutorSetting(string value)
        {
            int result = 0;
            var config = Sys.SyConfigBo.Instance.GetModel("SmsQuestionExecutor", SystemStatus.系统配置类型.常规配置);

            if (config == null)
            {
                config                = new SyConfig();
                config.CreatedBy      = AdminAuthenticationBo.Instance.Current.Base.SysNo;
                config.CategoryId     = (int)SystemStatus.系统配置类型.常规配置;
                config.CreatedDate    = DateTime.Now;
                config.Description    = "客户短信咨询任务回复人列表";
                config.Key            = "SmsQuestionExecutor";
                config.LastUpdateBy   = config.CreatedBy;
                config.LastUpdateDate = config.CreatedDate;
                config.Value          = value;
                result                = Sys.SyConfigBo.Instance.Create(config);
            }
            else
            {
                config.Value          = value;
                config.LastUpdateBy   = AdminAuthenticationBo.Instance.Current.Base.SysNo;
                config.LastUpdateDate = DateTime.Now;
                result = Sys.SyConfigBo.Instance.Update(config);
            }

            return(result > 0);
        }
示例#2
0
        /// <summary>
        /// 读取系统配置的用户短信回复执行人配置列表
        /// </summary>
        /// <returns>返回用户列表</returns>
        /// <remarks>2014-03-05 邵斌 创建 </remarks>
        public IList <SyUser> LoadExecutorList()
        {
            var config = Sys.SyConfigBo.Instance.GetModel("SmsQuestionExecutor", SystemStatus.系统配置类型.常规配置);

            if (config == null)
            {
                config                = new SyConfig();
                config.CreatedBy      = BLL.Authentication.AdminAuthenticationBo.Instance.Current.Base.SysNo;
                config.CategoryId     = (int)SystemStatus.系统配置类型.常规配置;
                config.CreatedDate    = DateTime.Now;
                config.Description    = "客户短信咨询任务回复人列表";
                config.Key            = "SmsQuestionExecutor";
                config.LastUpdateBy   = config.CreatedBy;
                config.LastUpdateDate = config.CreatedDate;
                Sys.SyConfigBo.Instance.Create(config);
            }

            List <int>     intSysNoList = new List <int>();
            IList <SyUser> result       = new List <SyUser>();

            if (!string.IsNullOrWhiteSpace(config.Value))
            {
                var userSysNoList = config.Value.Split(',').ToList();
                foreach (var sysNo in userSysNoList)
                {
                    intSysNoList.Add(int.Parse(sysNo));
                }
                result = ISyUserDao.Instance.GetSyUser(intSysNoList);
            }
            return(result);
        }
示例#3
0
 /// <summary>
 /// 更新系统配置功能
 /// </summary>
 /// <param name="model">系统配置功能实体</param>
 /// <returns>受影响行</returns>
 /// <remarks>2014-01-20 周唐炬 创建</remarks>
 public abstract int Update(SyConfig model);
示例#4
0
 /// <summary>
 /// 创建系统配置功能
 /// </summary>
 /// <param name="model">系统配置功能实体</param>
 /// <returns>系统配置功能实体系统编号</returns>
 /// <remarks>2014-01-20 周唐炬 创建</remarks>
 public abstract int Create(SyConfig model);
示例#5
0
 /// <summary>
 /// 更新系统配置功能
 /// </summary>
 /// <param name="model">系统配置功能实体</param>
 /// <returns>受影响行</returns>
 /// <remarks>2014-01-20 周唐炬 创建</remarks>
 public int Update(SyConfig model)
 {
     return(ISyConfigDao.Instance.Update(model));
 }
示例#6
0
 /// <summary>
 /// 创建系统配置功能
 /// </summary>
 /// <param name="model">系统配置功能实体</param>
 /// <returns>系统配置功能实体系统编号</returns>
 /// <remarks>2014-01-20 周唐炬 创建</remarks>
 public int Create(SyConfig model)
 {
     return(ISyConfigDao.Instance.Create(model));
 }
示例#7
0
 /// <summary>
 /// 更新系统配置功能
 /// </summary>
 /// <param name="model">系统配置功能实体</param>
 /// <returns>受影响行</returns>
 /// <remarks>2014-01-20 周唐炬 创建</remarks>
 public override int Update(SyConfig model)
 {
     return(Context.Update("SyConfig", model).AutoMap(x => x.SysNo).Where(x => x.SysNo).Execute());
 }
示例#8
0
 /// <summary>
 /// 创建系统配置功能
 /// </summary>
 /// <param name="model">系统配置功能实体</param>
 /// <returns>系统配置功能实体系统编号</returns>
 /// <remarks>2014-01-20 周唐炬 创建</remarks>
 public override int Create(SyConfig model)
 {
     return(Context.Insert <SyConfig>("SyConfig", model).AutoMap(x => x.SysNo).ExecuteReturnLastId <int>("SysNo"));
 }