예제 #1
0
    /// <summary>
    /// loads sections filter and section drops
    /// </summary>
    private void loadDropSectionsFilter(int sectionId)
    {
        DropSectionsFilter.Items.Clear();

        var filter = new SectionsFilter();
        filter.Id = sectionId;
        List<Section> recordList = new SectionsManager(true, true).GetByFilter(filter, "");
        foreach (Section record1 in recordList)
        {
            DropSectionsFilter.Items.Add(new ListItem(record1.Title, record1.Id.ToString()));
        }
        if (this.LastSelectedSectionId > 0)
            Utility.SetDropByValue(DropSectionsFilter, this.LastSelectedSectionId.ToString());
    }
예제 #2
0
    private void loadDropSectionsFilter(int sectionId)
    {
        DropSectionsFilter.Items.Clear();

        var secFilter = new SectionsFilter();
        secFilter.Id = sectionId;
        var secList = new SectionsManager(true, true).GetByFilter(secFilter, "");

        foreach (var sec in secList)
        {
            DropSectionsFilter.Items.Add(new ListItem(sec.Title, sec.Id.ToString()));
        }
        if (base.LastSelectedSectionId > 0)
            Utility.SetDropByValue(DropSectionsFilter, base.LastSelectedSectionId.ToString());
    }
예제 #3
0
    protected void ObjDs1_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
    {
        SectionsFilter filter = new SectionsFilter();

        filter.Enabled = Utility.TristateBool.NotSet;
        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;
        }

        e.InputParameters["filter"] = filter;
    }