internal GenericTypeDTO getGenericType(decimal inheritedTypeId) { InheritedTypeDTO inheritedTypeDTO = inheritedTypeEntity.getInheritedTypeInfo(inheritedTypeId); GenericTypeDTO genericTypeDTO = genericTypeEntity.getGenericTypeInfo(inheritedTypeDTO.GenericTypeId); return(genericTypeDTO); }
public void TestGetGenericTypePlaceHolderList() { GenericTypeDTO genericTypeDTO = BLL.BLGenericType.getGenericTypeInfo(1); List <string> genericTokenList = Parser.getPlaceHolderList(genericTypeDTO.TokenizeString, Constant.pattern); Assert.AreEqual(genericTokenList[2], "<<<maxLength>>>"); }
public string createRenderHTML(ComponentDTO componentDTO, decimal sourcePageContentId) { string componentStr = ""; GenericTypeDTO genericTypeDTO = BLL.BLInheritedType.getGenericType(componentDTO.InheritedTypeId); List <string> cmpPlaceHolderList = Parser.getPlaceHolderList(genericTypeDTO.TokenizeString, Constant.pattern); Dictionary <string, string> tokenDic = new Dictionary <string, string>(); List <ComponentTokenDTO> componentTokenList = BLL.BLComponent.getComponentTokenList(componentDTO.ComponentId); foreach (ComponentTokenDTO componentToken in componentTokenList) { if (!tokenDic.Keys.Contains(componentToken.TokenName)) { tokenDic[componentToken.TokenName] = componentToken.TokenValue; } } List <InheritedTokenDTO> inheritedTokenList = BLL.BLInheritedToken.getInheritedTokenList(componentDTO.InheritedTypeId); foreach (InheritedTokenDTO inheritedToken in inheritedTokenList) { if (!tokenDic.Keys.Contains(inheritedToken.TokenName)) { tokenDic[inheritedToken.TokenName] = inheritedToken.TokenValue; } } componentStr = genericTypeDTO.TokenizeString; foreach (string cmpPlaceHolder in cmpPlaceHolderList) { //if (Parser.clean(cmpPlaceHolder) == "ngClick") //{ //componentStr = componentStr.Replace(cmpPlaceHolder, BLL.BLDesign.getNavigationDesign(sourcePageContentId, componentDTO.ComponentId)); //} componentStr = componentStr.Replace("<<<ngClick>>>", "makeDesign_" + componentDTO.ComponentId + "()"); //DesignDTO designDTO = BLL.BLComponent.getComponentDesign(componentDTO, sourcePageContentId); //if(designDTO.DesignId >0) // componentStr = componentStr.Replace("<<<ngClick>>>", "design_" + designDTO.DesignId + "(this)"); if (tokenDic.Keys.Contains(Parser.clean(cmpPlaceHolder))) { componentStr = componentStr.Replace(cmpPlaceHolder, tokenDic[Parser.clean(cmpPlaceHolder)]); } else { componentStr = componentStr.Replace(cmpPlaceHolder, ""); } } componentStr = Parser.removeUnUsableAttributes(componentStr); componentDTO.RenderHTML = componentStr; BLL.BLComponent.updateComponentRender(componentDTO); return(componentStr); }
public decimal changeComponentTable(decimal tableBodyId, decimal componentId, decimal sourcePageContentId) { decimal tableBodyId1 = tableEntity.changeComponentTable(tableBodyId, componentId); ComponentDTO componentDTO = BLL.BLComponent.getComponentInfo(componentId); componentDTO.TableBodyId = tableBodyId1; TableBodyDTO tableBodyDTO = BLL.BLTable.getTableData(tableBodyId); InheritedTypeDTO inheritedTypeDTO = BLL.BLInheritedType.getInheritedTypeInfo(componentDTO.InheritedTypeId); GenericTypeDTO genericTypeDTO = BLL.BLGenericType.getGenericTypeInfo(inheritedTypeDTO.GenericTypeId); BLL.BLComponent.saveComponentRenderHTML(componentDTO.ComponentId, genericTypeDTO.TokenizeString.Replace("<<<tableId>>>", tableBodyDTO.TableBodyId.ToString())); return(tableBodyId1); }