Ejemplo n.º 1
0
partial         void OnTemplate(AdministrationSimpleListTemplate template, ControllerContext controllerContext)
        {
            var urlHelper = new UrlHelper(controllerContext.RequestContext);
            template.GlobalButtons = new List<IClickable>
            {
                new Button(MaintCultureTextResources.Search),
                new Link(MaintCultureTextResources.New, urlHelper.Action("Create", "Role"), LinkStyle.Button),
                new Button(MaintCultureTextResources.Disable, "Disable"),
                new Button(MaintCultureTextResources.Enable, "Enable"),
            };
            var tableBuilder = new TableBuilder<Role>();
            template.Table = tableBuilder.Add(tableBuilder.CheckBox(x => x.RoleId.ToString(), controllerContext, "ids"), "", "RoleId")
                .Add(tableBuilder.Literal(x => x.Name.Format(), controllerContext), MaintCultureTextResources.RoleName, "Name")
                .Add(tableBuilder.Literal(x => x.IsBuildIn.Format(), controllerContext), MaintCultureTextResources.RoleIsBuildIn, "IsBuildIn")
                .Add(tableBuilder.Literal(x => x.IsEnabled.Format(), controllerContext), MaintCultureTextResources.RoleIsEnabled, "IsEnabled")
                .Add(x =>
                {
                    return new ControlCollection()
                    {
                        Controls = new List<Control>
                        {
                            new Link(MaintCultureTextResources.Edit, urlHelper.Action("Edit", "Role", new {id = x.Target.RoleId}), LinkStyle.Normal)
                        }
                    };
                }, MaintCultureTextResources.Operation).Build();
        }
Ejemplo n.º 2
0
partial         void OnTemplate(AdministrationSimpleListTemplate template, ControllerContext controllerContext)
        {
            var tableBuilder = new TableBuilder<ExceptionLog>();
            template.GlobalButtons = new List<IClickable>
            {
                new Button(MaintCultureTextResources.Search),
            };
            template.Table = tableBuilder
              .Add(tableBuilder.Literal(x => x.CreationTime.Format(), controllerContext), MaintCultureTextResources.ExceptionLogCreationTime, "CreationTime")
              .Add(tableBuilder.Literal(x => x.RouteData.Format(), controllerContext), MaintCultureTextResources.ExceptionLogRouteData, "RouteData")
              .Add(tableBuilder.Literal(x => x.Exception.Format(), controllerContext), MaintCultureTextResources.ExceptionLogException, "Exception")
              .Build();
        }
partial         void OnTemplate(AdministrationSimpleListTemplate template, ControllerContext controllerContext)
        {
            var urlHelper = new UrlHelper(controllerContext.RequestContext);
            template.GlobalButtons = new List<IClickable>
            {
                new Button(MaintCultureTextResources.Search),
                new Button(MaintCultureTextResources.Delete, "Delete"),
            };
            var tableBuilder = new TableBuilder<UserLoginFailedLog>();
            template.Table = tableBuilder
                .Add(tableBuilder.CheckBox(x => x.UserLoginFailedLogId.Format(), controllerContext, name: "ids"), "", "UserLoginFailedLogId")
                .Add(x => new Link(x.Target.User.UserName, urlHelper.Action("Edit", "User", new { id = x.Target.UserId })), MaintCultureTextResources.UserLoginFailedLogUser, "CreateTime")
                .Add(tableBuilder.Literal(x => x.IpAddress.Format(), controllerContext), MaintCultureTextResources.UserLoginFailedLogIpAddress, "IpAddress")
                .Add(tableBuilder.Literal(x => x.CreationTime.Format(), controllerContext), MaintCultureTextResources.UserLoginFailedLogCreateTime, "CreateTime")
                .Build();
        }
Ejemplo n.º 4
0
partial         void OnTemplate(AdministrationSimpleListTemplate template, ControllerContext controllerContext)
        {
            var urlHelper = new UrlHelper(controllerContext.RequestContext);
            template.GlobalButtons = new List<IClickable>
            {
                new Button(MaintCultureTextResources.Search),
                new Link(MaintCultureTextResources.New, urlHelper.Action("Create", "User"), LinkStyle.Button),
                new Button(MaintCultureTextResources.Disable, "Disable"),
                new Button(MaintCultureTextResources.Enable, "Enable"),
            };
            var tableBuilder = new TableBuilder<User>();
            template.Table = tableBuilder
                .Add(tableBuilder.CheckBox(x => x.UserId.Format(), controllerContext, name: "ids"), "", "UserId")
                .Add(tableBuilder.Literal(x => x.UserName.Format(), controllerContext), MaintCultureTextResources.AdminUserUserName, "UserName")
                .Add(tableBuilder.Literal(x => x.LoginName.Format(), controllerContext), MaintCultureTextResources.AdminUserLoginName, "LoginName")
                .Add(tableBuilder.Literal(x => x.Gender.Format(), controllerContext), MaintCultureTextResources.AdminUserGender, "Gender")
                .Add(tableBuilder.Literal(x => x.DateOfBirth.Format(), controllerContext), MaintCultureTextResources.AdminUserDateOfBirth, "DateOfBirth")
                .Add(tableBuilder.Literal(x => x.IsBuildIn.Format(), controllerContext), MaintCultureTextResources.AdminUserIsBuildIn, "IsBuildIn")
                .Add(tableBuilder.Literal(x => x.IsEnabled.Format(), controllerContext), MaintCultureTextResources.AdminUserIsEnabled, "IsEnabled")
                .Add(tableBuilder.Literal(x => x.IsSuper.Format(), controllerContext), MaintCultureTextResources.AdminUserIsSuper, "IsSuper")
                .Add(x => new ControlCollection(
                    new Link(MaintCultureTextResources.Edit, urlHelper.Action("Edit", "User", new { id = x.Target.UserId }), LinkStyle.Normal),
                    new Link(MaintCultureTextResources.UserLoginFailedLogIndex, urlHelper.Action("UserLoginFailedLogIndex", "User", new { UserId = x.Target.UserId }), LinkStyle.Normal)
                    ), MaintCultureTextResources.Operation).Build();
        }
Ejemplo n.º 5
0
partial         void OnTemplate(AdministrationSimpleListTemplate template, ControllerContext controllerContext)
        {
            var urlHelper = new UrlHelper(controllerContext.RequestContext);
            template.GlobalButtons = new List<IClickable>
            {
                new Button(MaintCultureTextResources.Search ),
                new Link(MaintCultureTextResources.New, urlHelper.Action("Create", "CultureText", new {cultureId = this.Culture}), LinkStyle.Button),
                new Button(MaintCultureTextResources.Delete, "Delete"),
                new Link(MaintCultureTextResources.Import, urlHelper.Action("Import", "CultureText", new {cultureId=this.Culture}), LinkStyle.Button),
            };
            var tableBuilder = new TableBuilder<CultureText>();
            template.Table = tableBuilder
                .Add(tableBuilder.CheckBox(x => x.CultureTextId.Format(), controllerContext, name: "ids"), "", "CultureTextId")
                .Add(tableBuilder.Literal(x => x.Name.Format(), controllerContext), MaintCultureTextResources.AdminUserUserName, "CultureTextName")
                .Add(tableBuilder.Literal(x => x.Text.Format(), controllerContext), MaintCultureTextResources.AdminUserLoginName, "CultureTextText")
                .Add(tableBuilder.Literal(x => x.IsEdited.Format(), controllerContext), MaintCultureTextResources.AdminUserGender, "CultureTextIsEdited")
                .Add(x => new ControlCollection(
                    new Link(MaintCultureTextResources.Edit, urlHelper.Action("Edit", "CultureText", new { id = x.Target.CultureTextId }), LinkStyle.Normal)
                    ), MaintCultureTextResources.Operation).Build();
        }
Ejemplo n.º 6
0
partial         void OnTemplate(AdministrationSimpleListTemplate template, ControllerContext controllerContext)
        {
            var urlHelper = new UrlHelper(controllerContext.RequestContext);
            template.GlobalButtons = new List<IClickable>
            {
                new Button(MaintCultureTextResources.Search),
                new Button(MaintCultureTextResources.Abort, "Abort"),
            };
            var tableBuilder = new TableBuilder<SystemJob>();
            template.Table = tableBuilder
                .Add(tableBuilder.CheckBox(x => x.SystemJobId.Format(), controllerContext, name: "ids"), "")
                .Add(tableBuilder.Literal(x => x.Title.Format(), controllerContext), MaintCultureTextResources.SystemJobTitle, "Title")
                .Add(tableBuilder.Literal(x => x.StartTime.Format(), controllerContext), MaintCultureTextResources.SystemJobStartTime, "StartTime")
                .Add(tableBuilder.Literal(x => x.ExecuteTime.Format(), controllerContext), MaintCultureTextResources.SystemJobExecuteTime, "ExecuteTime")
                .Add(tableBuilder.Literal(x => x.Status.Format(), controllerContext), MaintCultureTextResources.SystemJobStatus, "Status")
                .Add(tableBuilder.Literal(x => x.Result.Format(), controllerContext), MaintCultureTextResources.SystemJobResult, "Result")
                .Add(tableBuilder.Literal(x => x.CreationTime.Format(), controllerContext), MaintCultureTextResources.SystemJobCreationTime, "CreationTime")
                .Build();
        }