private void LoadTemplateTypes() { var client = new TemplateManagerClient(); cmbTemplateTypes.DataSource = null; cmbTemplateTypes.DataSource = client.GetTemplateTypes(); cmbTemplateTypes.DisplayMember = "TemplateObject"; cmbTemplateTypes.ValueMember = "TemplateTypeId"; client.Close(); }
private void GetTemplates(int templetTypeId) { var client = new TemplateManagerClient(); LstTemplates.DataSource = null; LstTemplates.DataSource = client.GetTemplates(templetTypeId); LstTemplates.DisplayMember = "Name"; LstTemplates.ValueMember = "TemplateId"; client.Close(); }
private void ShowFields(int templateId) { var client = new TemplateManagerClient(); LstFields.DataSource = null; LstFields.Items.Clear(); LstFields.DataSource = client.GetFieldsByTemplateId(templateId); LstFields.DisplayMember = "Field"; LstFields.ValueMember = "TemplateId"; client.Close(); }