public SymbolComponentData(COMPONENT_SYMBOLS componentSymbol) { this.Component_Symbol_Id = componentSymbol.Component_Symbol_Id; this.Abbreviation = componentSymbol.Abbreviation; this.File_Name = componentSymbol.File_Name; this.Symbol_Name = componentSymbol.Symbol_Name; this.IsService = componentSymbol.IsService; }
public SymbolComponentData(COMPONENT_SYMBOLS componentSymbol) { this.Name = componentSymbol.Name; this.XML_Name = componentSymbol.Diagram_Type_Xml; this.Abbreviation = componentSymbol.Abbreviation; this.File_Name = componentSymbol.File_Name; this.Long_Name = componentSymbol.Long_Name; this.Display_Name = componentSymbol.Display_Name; this.IsService = componentSymbol.IsService; }
public void BuildComponentInfoTab(ComponentQuestionInfoData info, CSET_Context controlContext) { try { IsComponent = true; ShowRequirementFrameworkTitle = false; this.RequirementFrameworkTitle = "Components"; NEW_QUESTION question = BuildFromNewQuestion(info, info.Set, controlContext); ComponentVisibility = true; // Build multiServiceComponent types list if any ComponentTypes.Clear(); int salLevel = controlContext.UNIVERSAL_SAL_LEVEL.Where(x => x.Universal_Sal_Level1 == question.Universal_Sal_Level).First().Sal_Level_Order; List <ComponentOverrideLinkInfo> tmpList = new List <ComponentOverrideLinkInfo>(); foreach (COMPONENT_QUESTIONS componentType in controlContext.COMPONENT_QUESTIONS.Where(x => x.Question_Id == info.QuestionID)) { bool enabled = info.HasComponentsForTypeAtSal(componentType.Component_Symbol_Id, salLevel); COMPONENT_SYMBOLS componentTypeData = info.DictionaryComponentInfo[componentType.Component_Symbol_Id]; tmpList.Add(new ComponentOverrideLinkInfo() { Component_Symbol_Id = componentTypeData.Component_Symbol_Id, Symbol_Name = componentTypeData.Symbol_Name, Enabled = enabled }); } ComponentTypes = tmpList.OrderByDescending(x => x.Enabled).ThenBy(x => x.Symbol_Name).ToList(); var reqid = controlContext.REQUIREMENT_QUESTIONS.Where(x => x.Question_Id == info.QuestionID).First().Requirement_Id; BuildDocuments(reqid, controlContext); var requirement = controlContext.NEW_REQUIREMENT.Where(x => x.Requirement_Id == reqid).Select(t => new { Question_or_Requirement_Id = t.Requirement_Id, Text = FormatRequirementText(t.Requirement_Text), SupplementalInfo = FormatSupplementalInfo(t.Supplemental_Info) }).FirstOrDefault(); if (requirement != null) { RequirementsData = new RequirementTabData() { RequirementID = requirement.Question_or_Requirement_Id, Text = requirement.Text, SupplementalInfo = FormatSupplementalInfo(requirement.SupplementalInfo), }; QuestionsVisible = false; ShowSALLevel = true; } } catch (Exception ex) { //CSETLogger.Fatal("Failed to get component information tab data.", ex); } }