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); } }
private void BindDList() { DListFilterDownloadsTypes.DataSource = DALC.GetList(Tools.Table.DownloadsTypes); DListFilterDownloadsTypes.DataBind(); if (DListFilterDownloadsTypes.Items.Count > 1) { DListFilterDownloadsTypes.Items.Insert(0, new ListItem("--", "-1")); } }