Beispiel #1
0
        public MsgModel AddConfig(sys_config sys_Config)
        {
            sys_Config.id = new Snowflake().GetId();
            var result = _baseSysConfigService.AddRange(sys_Config);

            return(result ? MsgModel.Success("新增配置成功!") : MsgModel.Fail("新增配置失败!"));
        }
Beispiel #2
0
        public ActionResult Add(FormCollection collection)
        {
            var model = new sys_config();

            this.TryUpdateModel <sys_config>(model);

            try
            {
                bll.AddEntities(model);
            }
            catch
            {
                return(View("Edit", model));
            }

            return(this.JscriptMsg("信息已添加成功", false, "Success"));
        }
Beispiel #3
0
        public MsgModel AddConfig(sys_config sys_Config)
        {
            var result = _baseSysConfigService.Insert(sys_Config);

            return(result ? MsgModel.Success("新增配置成功!") : MsgModel.Fail("新增配置失败!"));
        }
Beispiel #4
0
        public MsgModel UpdateConfig(sys_config sys_Config)
        {
            var result = _baseSysConfigService.Update(sys_Config);

            return(result ? MsgModel.Success("更新配置成功!") : MsgModel.Fail("更新配置失败!"));
        }