private void loadDropTemplateBlocks() { DropTemplateBlockName.Items.Clear(); DropTemplateBlockNameFilter.Items.Clear(); DropTemplateBlockNameFilter.Items.Add(new ListItem(Utility.GetLabel("LblSelectPosition", "Select position"), "")); TemplateBlockFilter filter = new TemplateBlockFilter(); filter.Enabled = Utility.TristateBool.NotSet; List<TemplateBlock> recordList = new TemplateBlocksManager().GetByFilter(filter, ""); foreach (TemplateBlock record1 in recordList) { DropTemplateBlockName.Items.Add( new ListItem(record1.Name, record1.Name)); DropTemplateBlockNameFilter.Items.Add( new ListItem(record1.Name, record1.Name)); } }
protected void ObjDs1_Selecting(object sender, ObjectDataSourceSelectingEventArgs e) { TemplateBlockFilter filter = new TemplateBlockFilter(); switch (DropEnabledFilter.SelectedValue) { case "1": filter.Enabled = Utility.TristateBool.True; break; case "0": filter.Enabled = Utility.TristateBool.False; break; default: filter.Enabled = Utility.TristateBool.NotSet; break; } filter.Name = ""; e.InputParameters["filter"] = filter; }