示例#1
0
文件: ConfigApp.cs 项目: ahbaer/baer
        public string SubmitForm(ConfigEntity configEntity, string keyValue)
        {
            string tip = "";

            if (service.IQueryable(m => m.ConfigName == configEntity.ConfigName && m.F_Id != keyValue).ToList().Count > 0)
            {
                tip = "已存在该系统参数!";
            }
            else
            {
                if (!string.IsNullOrEmpty(keyValue))
                {
                    configEntity.Modify(keyValue);
                    service.Update(configEntity);
                }
                else
                {
                    configEntity.Create();
                    service.Insert(configEntity);
                }
            }

            return(tip);
        }