예제 #1
0
    protected void DListFilterOrganizations_SelectedIndexChanged(object sender, EventArgs e)
    {
        int OrganizationsID = int.Parse(DListFilterOrganizations.SelectedValue);

        if (e == null)
        {
            OrganizationsID = sender._ToInt16();
        }

        PnlFilterDate.Visible = false;
        DListFilterDownloadsTypes.DataSource = DALC.GetDataTableBySqlCommand("GetDownloadsTypesFromDownloads",
                                                                             new string[] { "OrganizationsID" },
                                                                             new object[] { OrganizationsID },
                                                                             CommandType.StoredProcedure);
        DListFilterDownloadsTypes.DataBind();

        if (DListFilterDownloadsTypes.Items.Count > 1)
        {
            DListFilterDownloadsTypes.Items.Insert(0, new ListItem("--", "-1"));
        }

        if (DListFilterDownloadsTypes.Items.Count > 0)
        {
            PnlFilterDate.Visible = true;
            DListFilterDownloadsTypes_SelectedIndexChanged(null, null);
        }
    }
예제 #2
0
 private void BindDList()
 {
     DListFilterDownloadsTypes.DataSource = DALC.GetList(Tools.Table.DownloadsTypes);
     DListFilterDownloadsTypes.DataBind();
     if (DListFilterDownloadsTypes.Items.Count > 1)
     {
         DListFilterDownloadsTypes.Items.Insert(0, new ListItem("--", "-1"));
     }
 }