コード例 #1
0
 protected override void loadData()
 {
     var table = new DynamicTable( new EwfTableColumn( "Email", Unit.Percentage( 50 ) ), new EwfTableColumn( "Role", Unit.Percentage( 50 ) ) );
     table.AddActionLink( new ActionButtonSetup( "Create User", new EwfLink( new EditUser.Info( es.info, null ) ) ) );
     foreach( var user in UserManagementStatics.GetUsers() )
         table.AddTextRow( new RowSetup { ClickScript = ClickScript.CreateRedirectScript( new EditUser.Info( es.info, user.UserId ) ) }, user.Email, user.Role.Name );
     ph.AddControlsReturnThis( table );
 }
コード例 #2
0
        protected override void loadData()
        {
            var table = new DynamicTable(new EwfTableColumn("Email", Unit.Percentage(50)), new EwfTableColumn("Role", Unit.Percentage(50)));

            table.AddActionLink(new ActionButtonSetup("Create User", new EwfLink(new EditUser.Info(es.info, null))));
            foreach (var user in UserManagementStatics.GetUsers())
            {
                table.AddTextRow(new RowSetup {
                    ClickScript = ClickScript.CreateRedirectScript(new EditUser.Info(es.info, user.UserId))
                }, user.Email, user.Role.Name);
            }
            ph.AddControlsReturnThis(table);
        }
コード例 #3
0
        private DynamicTable buildTree( string name, IEnumerable<MergeRow> emptyRowTree )
        {
            var singleRow = emptyRowTree.Single();

            var table = new DynamicTable( new EwfTableColumn( "Field name" ), new EwfTableColumn( "Description" ) ) { Caption = name };
            foreach( var field in singleRow.Values )
                table.AddTextRow( getFieldNameCellText( field ), field.GetDescription() );

            foreach( var child in singleRow.Children ) {
                var panel = new Panel();
                panel.Style.Add( HtmlTextWriterStyle.MarginLeft, "2em" );
                panel.Controls.Add( buildTree( child.NodeName, child.Rows ) );

                table.AddRow( panel.ToCell( new TableCellSetup( fieldSpan: 2 ) ) );
            }

            return table;
        }