示例#1
0
        static ConfigDataController()
        {
            ListFields.AddField("Scope", "Value");

            AddFormFields.RemoveCreateField();
            AddFormFields.RemoveField("Version");

            EditFormFields.RemoveCreateField();
            EditFormFields.RemoveUpdateField();
            EditFormFields.RemoveField("Version");
        }
示例#2
0
        static UserController()
        {
            MenuOrder = 100;

            ListFields.RemoveField("Avatar", "RoleIds", "Online", "RegisterIP", "RegisterTime");
            ListFields.RemoveField("Phone", "Code", "Question", "Answer");
            ListFields.RemoveField("Ex1", "Ex2", "Ex3", "Ex4", "Ex5", "Ex6");
            ListFields.RemoveUpdateField();
            ListFields.RemoveField("Remark");

            {
                var df = ListFields.AddListField("Link", "Logins");
                df.Header      = "链接";
                df.HeaderTitle = "第三方登录的链接信息";
                df.DisplayName = "链接";
                df.Title       = "第三方登录的链接信息";
                df.Url         = "UserConnect?userId={ID}";
            }

            {
                var df = ListFields.AddListField("Token", "Logins");
                df.Header      = "令牌";
                df.DisplayName = "令牌";
                df.Url         = "UserToken?userId={ID}";
            }

            {
                var df = ListFields.AddListField("Log", "Logins");
                df.Header      = "日志";
                df.DisplayName = "日志";
                df.Url         = "Log?userId={ID}";
            }

            {
                var df = ListFields.AddListField("OAuthLog", "Logins");
                df.Header      = "OAuth日志";
                df.DisplayName = "OAuth日志";
                df.Url         = "OAuthLog?userId={ID}";
            }

            {
                var df = AddFormFields.AddDataField("RoleIds", "RoleNames");
                df.DataSource = (entity, field) => Role.FindAllWithCache().ToDictionary(e => e.ID, e => e.Name);
                AddFormFields.RemoveField("RoleNames");
            }

            {
                var df = EditFormFields.AddDataField("RoleIds", "RoleNames");
                df.DataSource = (entity, field) => Role.FindAllWithCache().ToDictionary(e => e.ID, e => e.Name);
                EditFormFields.RemoveField("RoleNames");
            }
        }
示例#3
0
        static ConfigDataController()
        {
            ListFields.AddDataField("Value", null, "Scope");
            ListFields.AddDataField("NewValue", null, "NewStatus");
            //ListFields.RemoveField("Remark");
            ListFields.RemoveField("CreateIP", "UpdateIP");

            AddFormFields.RemoveCreateField();
            AddFormFields.RemoveUpdateField();
            AddFormFields.RemoveField("Version", "NewVersion", "NewValue", "NewStatus");

            EditFormFields.RemoveCreateField();
            EditFormFields.RemoveUpdateField();
            EditFormFields.RemoveField("Version", "NewVersion");

            {
                var df = EditFormFields.GetField("Value");
                df.Readonly = true;
            }
        }