Beispiel #1
0
    private void RefreshActiveClassInPackages()
    {
        lblPackageName.Text = packageProvider.Get(RowID).Name;

        var classes = classProvider.GetAllActiveClasses();

        cblClass.DataSource     = classes;
        cblClass.DataValueField = "ID";
        cblClass.DataTextField  = "Name";
        cblClass.DataBind();

        var activeClasses = packageProvider.PopulateClassForSelectedPackage(RowID);

        foreach (var cls in activeClasses)
        {
            cblClass.Items.FindByValue(cls.ID.ToString()).Selected = true;
        }
    }