예제 #1
0
        protected override void CreateChildControls()
        {
            Controls.Clear();

            ddTests.EnableViewState = false;
            ddTests.AutoPostBack    = true;
            Controls.Add(ddTests);

            btPromote.Text   = "Promote";
            btPromote.Click += new EventHandler(btPromote_Click);
            Controls.Add(btPromote);

            cbAllMembers                 = new CheckBox();
            cbAllMembers.Text            = "All Members";
            cbAllMembers.EnableViewState = false;
            cbAllMembers.AutoPostBack    = true;
            Controls.Add(cbAllMembers);

            bindDropDownLists();

            ComponentArt.Web.UI.ToolBar testToolbar = ToolBarUtility.DefaultToolBar("Test");
            ToolBarUtility.AddControlItem(testToolbar, ddTests);
            ToolBarUtility.AddControlItem(testToolbar, btPromote);
            toolbars.Add(testToolbar);

            ChildControlsCreated = true;
        }
예제 #2
0
        protected override void CreateChildControls()
        {
            base.CreateChildControls();

            ddSearchMode    = new DropDownList();
            ddSearchMode.ID = "ddSearchMode";
            if (ddSearchMode.Items.Count == 0)
            {
                ddSearchMode.Items.Add("Today");
                ddSearchMode.Items.Add("This Week");
                ddSearchMode.Items.Add("Last Week");
                ddSearchMode.Items.Add("This Month");
                ddSearchMode.Items.Add("Last Month");
                ddSearchMode.Items.Add("This Year");
                ddSearchMode.Items.Add("All");
            }
            ddSearchMode.AutoPostBack = true;
            Controls.Add(ddSearchMode);

            cbSeminarFilter              = new CheckBox();
            cbSeminarFilter.ID           = "cbSeminarFilter";
            cbSeminarFilter.Text         = "Seminars Only";
            cbSeminarFilter.AutoPostBack = true;
            Controls.Add(cbSeminarFilter);

            toolbars[0].Items.Add(ToolBarUtility.Break());
            ToolBarUtility.AddControlItem(toolbars[0], ddSearchMode);
            ToolBarUtility.AddControlItem(toolbars[0], cbSeminarFilter);
            toolbars[0].Items.Add(ToolBarUtility.Copy());
            toolbars[0].Items.Add(ToolBarUtility.Paste());

            ChildControlsCreated = true;
        }
예제 #3
0
        protected override void CreateChildControls()
        {
            base.CreateChildControls();

            ddSearchMode              = new DropDownList();
            ddSearchMode.ID           = "ddSearchMode";
            ddSearchMode.AutoPostBack = true;
            Controls.Add(ddSearchMode);

            ddMembers              = new DropDownList();
            ddMembers.ID           = "ddMembers";
            ddMembers.AutoPostBack = true;
            Controls.Add(ddMembers);

            ddInstructors              = new DropDownList();
            ddInstructors.ID           = "ddInstructors";
            ddInstructors.AutoPostBack = true;
            Controls.Add(ddInstructors);

            ddClassDefinitions              = new DropDownList();
            ddClassDefinitions.ID           = "ddClassDefinitions";
            ddClassDefinitions.AutoPostBack = true;
            Controls.Add(ddClassDefinitions);

            ddView    = new DropDownList();
            ddView.ID = "ddView";
            ddView.Items.Add(new ListItem("Default", "default"));
            ddView.Items.Add(new ListItem("Weekly", "weekly"));
            ddView.Items.Add(new ListItem("Weekly Summary", "weeklysummary"));
            ddView.AutoPostBack    = true;
            ddView.EnableViewState = false;
            Controls.Add(ddView);

            toolbars[0].Items.Add(ToolBarUtility.Break());
            ToolBarUtility.AddControlItem(toolbars[0], ddSearchMode);
            ToolBarUtility.AddControlItem(toolbars[0], ddMembers);
            ToolBarUtility.AddControlItem(toolbars[0], ddClassDefinitions);
            ToolBarUtility.AddControlItem(toolbars[0], ddInstructors);

            toolbars[0].Items.Add(ToolBarUtility.Break());
            ToolBarUtility.AddControlItem(toolbars[0], ddView);

            ChildControlsCreated = true;

            bindDropDownLists();
        }
예제 #4
0
        protected override void CreateChildControls()
        {
            if (connectionString == string.Empty)
            {
                throw(new Exception("Empty connection string."));
            }

            ddParentSeminar = new DropDownList();
            ddParentSeminar.AutoPostBack = true;
            Controls.Add(ddParentSeminar);

            ddView = new DropDownList();
            ddView.Items.Add(new ListItem("Default"));
            ddView.Items.Add(new ListItem("Address"));
            ddView.AutoPostBack = true;
            Controls.Add(ddView);

            cbIsPaid = new CheckBox();
            if (!Page.IsPostBack)
            {
                cbIsPaid.Checked = true;                                        // Be sure to check this box by default.
            }
            cbIsPaid.AutoPostBack = true;
            Controls.Add(cbIsPaid);

            btExport        = new Button();
            btExport.Text   = "Export";
            btExport.Click += new System.EventHandler(this.btExport_Click);
            Controls.Add(btExport);

            ComponentArt.Web.UI.ToolBar searchToolBar = ToolBarUtility.DefaultToolBar("Search");
            ToolBarUtility.AddControlItem(searchToolBar, cbIsPaid);
            ToolBarUtility.AddControlItem(searchToolBar, ddParentSeminar);
            ToolBarUtility.AddControlItem(searchToolBar, ddView);
            ToolBarUtility.AddControlItem(searchToolBar, btExport);
            toolbars.Add(searchToolBar);

            ChildControlsCreated = true;

            bindDropDownLists();
        }
예제 #5
0
        protected override void CreateToolBarControls()
        {
            base.CreateToolBarControls();

            ddFormatType    = new DropDownList();
            ddFormatType.ID = "ddFormatType";
            ddFormatType.Items.Add("Default");
            ddFormatType.Items.Add("Addresses");
            ddFormatType.Items.Add("Email List");
            ddFormatType.Items.Add("Member IDs");
            ddFormatType.AutoPostBack    = true;
            ddFormatType.EnableViewState = false;
            Controls.Add(ddFormatType);

            ddListType    = new DropDownList();
            ddListType.ID = "ddListType";
            ddListType.Items.Add("Active");
            ddListType.Items.Add("Inactive");
            ddListType.Items.Add("Instructors");
            ddListType.Items.Add("Yudansha");
            ddListType.Items.Add("Mudansha");
            ddListType.Items.Add("Past Due");
            ddListType.Items.Add("Invalid Contacts");
            ddListType.Items.Add("All");
            ddListType.AutoPostBack    = true;
            ddListType.EnableViewState = false;
            Controls.Add(ddListType);

            ddSortType    = new DropDownList();
            ddSortType.ID = "ddSortType";
            ddSortType.Items.Add(new ListItem("Last Name"));
            ddSortType.Items.Add(new ListItem("First Name"));
            ddSortType.Items.Add(new ListItem("Rank"));
            ddSortType.Items.Add(new ListItem("Member Type"));
            ddSortType.Items.Add(new ListItem("Last Signin"));
            ddSortType.Items.Add(new ListItem("ID"));
            ddSortType.AutoPostBack    = true;
            ddSortType.EnableViewState = false;
            Controls.Add(ddSortType);

            ddCommands    = new DropDownList();
            ddCommands.ID = "ddCommands";
            ddCommands.Items.Add(new ListItem("--- Select ---"));
            ddCommands.Items.Add(new ListItem("Activate", "activate"));
            ddCommands.Items.Add(new ListItem("Deactivate", "deactivate"));
            ddCommands.Items.Add(new ListItem("Grant Membership", "grantmembership"));
            ddCommands.Items.Add(new ListItem("--- Address ---"));
            ddCommands.Items.Add(new ListItem("Validate", "validateaddress"));
            ddCommands.Items.Add(new ListItem("Invalidate", "invalidateaddress"));
            ddCommands.Items.Add(new ListItem("--- Dues ---"));
            ddCommands.Items.Add(new ListItem("Clear Dues", "cleardues"));
            ddCommands.Items.Add(new ListItem("Past Due", "pastdue"));
            ddCommands.SelectedIndexChanged += new System.EventHandler(this.ddCommands_SelectIndexChanged);
            ddCommands.AutoPostBack          = true;
            ddCommands.EnableViewState       = false;
            Controls.Add(ddCommands);

            // TO ADD ITEMS TO THE TOOL BAR AFTER???

            ToolBarUtility.AddControlItem(toolbars[0], ddListType);
            ToolBarUtility.AddControlItem(toolbars[0], ddFormatType);
            ToolBarUtility.AddControlItem(toolbars[0], ddSortType);
            ToolBarUtility.AddControlItem(toolbars[0], ddCommands);
            toolbars[0].Items.Add(ToolBarUtility.Break());
            toolbars[0].Items.Add(ToolBarUtility.CommandItem("export", "Export", "export.gif"));

            bool adminMode = Page.User.IsInRole("Tessen/Administrator");

            this.deleteButton.Enabled = adminMode;
            this.editButton.Enabled   = adminMode;
            this.newButton.Enabled    = adminMode;
            this.ddCommands.Enabled   = adminMode;
        }