public void OnFirstClick() { XmlElement sd = ServiceDAL.GetServiceDefinition(this.ContractName, this.PackageName, this.ServiceName); bool isDBHelperService = sd.GetAttribute("Type").ToLower() == "dbhelper"; bool isJavascriptService = sd.GetAttribute("Type").ToLower() == "javascript"; this.Editors = new List <IEditable>(); IEditable editable = null; if (isDBHelperService) { editable = new ServiceUIEditable("Service - " + this.ServiceName, this); this.Editors.Add(editable); } if (isJavascriptService) { editable = new ServiceJSEditable(ServiceName, this); this.Editors.Add(editable); } IEditable xmlEditable = new ServiceXmlEditable("Service - " + this.ServiceName, this); this.Editors.Add(xmlEditable); if (editable == null) { this.CurrentEditor = xmlEditable; } else { this.CurrentEditor = editable; } this.IsFirstClick = false; }
public void OnFirstClick() { XmlElement sd = ServiceDAL.GetServiceDefinition(this.ContractName, this.PackageName, this.ServiceName); bool isDBHelperService = sd.GetAttribute("Type").ToLower() == "dbhelper"; bool isJavascriptService = sd.GetAttribute("Type").ToLower() == "javascript"; this.Editors = new List<IEditable>(); IEditable editable = null; if (isDBHelperService) { editable = new ServiceUIEditable("Service - " + this.ServiceName, this); this.Editors.Add(editable); } if (isJavascriptService) { editable = new ServiceJSEditable(ServiceName, this); this.Editors.Add(editable); } IEditable xmlEditable = new ServiceXmlEditable("Service - " + this.ServiceName, this); this.Editors.Add(xmlEditable); if (editable == null) this.CurrentEditor = xmlEditable; else this.CurrentEditor = editable; this.IsFirstClick = false; }