private void LoadDestinationModuleData() { if (DestinationInstance.SelectedIndex > -1) { int DestModID = Int32.Parse(DestinationInstance.SelectedItem.Value); int ModuleTypeID = Int32.Parse(ModuleTypes.SelectedItem.Value); ContentManagerDB contentDB = new ContentManagerDB(); DestListBox.DataValueField = "ItemID"; DestListBox.DataTextField = "ItemDesc"; DestListBox.DataSource = contentDB.GetModuleData(ModuleTypeID, DestModID); DestListBox.DataBind(); } }
private void LoadSourceModuleData() { //check to be sure that a source instance has been selected before proceeding. //this can cause errors if not checked for! if (SourceInstance.SelectedIndex > -1) { int SourceModID = Int32.Parse(SourceInstance.SelectedItem.Value); int ModuleTypeID = Int32.Parse(ModuleTypes.SelectedItem.Value); ContentManagerDB contentDB = new ContentManagerDB(); SourceListBox.DataValueField = "ItemID"; SourceListBox.DataTextField = "ItemDesc"; SourceListBox.DataSource = contentDB.GetModuleData(ModuleTypeID, SourceModID); SourceListBox.DataBind(); } }