private void frmSelectValueDomain_Load(object sender, EventArgs e) { try { CommonItem.WaitOn(); BaseArtefactInfo[] vlList; SelectedValueDomain = null; VTLInt_Service.ServiceClient VTL_service = VTLInt_ServiceManager.GetClient(CommonItem.CurrentSettings.InteractionWebService); vlList = VTL_service.GetValueDomains(); ValuDomainListBox.Items.Clear(); if (vlList == null) { MessageBox.Show("There are not ValueDomain available into the database. Please, import the metadata from the metadata repository. (Metadata import)", "Empty", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } foreach (BaseArtefactInfo aInfo in vlList) { ValuDomainListBox.Items.Add(aInfo); } CommonItem.WaitOff(); } catch (Exception ex) { CommonItem.ErrManger.ErrorManagement(ex, false, this); } }
private void FillValueDomainListBox() { try { CommonItem.WaitOn(); BaseArtefactInfo[] dsList; VTLInt_Service.ServiceClient VTL_service = VTLInt_ServiceManager.GetClient(CommonItem.CurrentSettings.InteractionWebService); dsList = VTL_service.GetValueDomains(); if (dsList == null) { MessageBox.Show("There are not Value Domain available into the database. Please, import the metadata from the metadata repository. (Metadata import)", "Empty", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } this.ValueDomainListComboBox.Items.Clear(); this.ValueDomainListComboBox.Items.Add("Select a value domain parent..."); foreach (BaseArtefactInfo aInfo in dsList) { ValueDomainListComboBox.Items.Add(new ValueDomainContainer(aInfo)); } CommonItem.WaitOff(); } catch (Exception) { throw; } }
private void LoadCodelist(string webserviceId, TreeNode trNode) { try { CommonItem.WaitOn(); List <BaseArtefactInfo> vlList; bool raiseError = false; MetadataLoader mtl = new MetadataLoader(CommonItem.CurrentSettings.QueriesPath, new WebServiceLayer.classes.service.Net.WebServiceLayer(CommonItem.CurrentSettings, int.Parse(webserviceId))); vlList = mtl.LoadCodelist21(); VTLInt_Service.ServiceClient VTL_service = VTLInt_ServiceManager.GetClient(CommonItem.CurrentSettings.InteractionWebService); BaseArtefactInfo[] alreadyPresent = VTL_service.GetValueDomains(); foreach (BaseArtefactInfo aInfo in vlList) { string text; if (switchTreeView.isCode()) { text = aInfo.vtlId; } else if (aInfo.name.Count == 0) { raiseError = true; text = aInfo.vtlId; } else { text = aInfo.name[0].value.ToString(); } TreeNode tmp = trNode.Nodes.Add(aInfo.sdmxId, text); tmp.ForeColor = Color.Black; if (alreadyPresent != null) { var found = from i in alreadyPresent where i.vtlId == text select i; if (found.Count() > 0) { tmp.ForeColor = Color.DarkGreen; } } tmp.Tag = new ArtefactNodeInfo(webserviceId, aInfo, ArtefactNodeInfo.ArtefactType.ValueDomains); } CommonItem.WaitOff(); if (raiseError) { MessageBox.Show("The description is not available for one or more items.The ID will be shown", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } catch (Exception ex) { CommonItem.ErrManger.ErrorManagement(ex, false, this); } }