Esempio n. 1
0
        /// <summary>
        /// 创建或更新用户配置
        /// </summary>
        /// <param name="args"></param>
        /// <returns></returns>
        public CommandResult <int> CreateOrUpdateSysConfig(CreateOrUpdateSysConfigArgs args)
        {
            ArgumentHelper.Require(args.UserId, "UserId", Arguments.Positive);
            ArgumentHelper.Require(args.SchoolId, "SchoolId", Arguments.Positive);
            ArgumentHelper.Require(args.SKey, "SKey", Arguments.NotEmptyOrWhitespace);
            ArgumentHelper.Require(args.SValue, "SValue", Arguments.NotEmptyOrWhitespace);

            return(ContainerFactory <ISysConfigRepository> .Instance.CreateOrUpdateSysConfig(args));
        }
Esempio n. 2
0
        public CommandResult <int> CreateOrUpdateSysConfig(CreateOrUpdateSysConfigArgs args)
        {
            try
            {
                var result = ContainerFactory <ISqlExcuteContext> .Instance.ExcuteProceDure(0, "create_or_update_sys_config", args);

                return(result);
            }
            catch (Exception e)
            {
                LogHelper.Error(this.GetType(), "系统配置模块--创建或更新配置失败", e);
                return(CommandResult.Failure <int>(e.ToString()));
            }
        }