public void ParseNote(PXSqlMeta_21 mMeta, PCAxis.Paxiom.IPXModelParser.MetaHandler handler, string langCode) { string keyWord; string subKeyWord; StringCollection parseValue; foreach (PXSqlNote note in this) { if ((note.ShowFootNote == mMeta.Config.Codes.FootnoteShowP) || (note.ShowFootNote == mMeta.Config.Codes.FootnoteShowB)) { if (note.MandOpt == mMeta.Config.Codes.FootnoteM) { keyWord = "VALUENOTEX"; } else { keyWord = "VALUENOTE"; } subKeyWord = note.Variable + "\",\"" + note.ValueCode; parseValue = new StringCollection(); parseValue.Add(note.NotePresTexts[langCode]); handler(keyWord, langCode, subKeyWord, parseValue); } } }
/// <PXKeyword name="VARIABLENAME (used in local SetMeta) "> /// <rule> /// <description>Sets the Paxiom-variable-name.</description> /// <table modelName ="Variable"> /// <column modelName="PresText"/> /// </table> /// </rule> /// </PXKeyword> internal virtual void ParseMeta(PCAxis.Paxiom.IPXModelParser.MetaHandler handler, StringCollection LanguageCodes, string preferredLanguage) { if (this.isSelected) { StringCollection values = new StringCollection(); string subkey = this.Name; //VARIABLENAME //OBS located in PXSQLBuilder near SetVariableName foreach (string langCode in LanguageCodes) { values.Clear(); values.Add(this.PresText[langCode]); handler("VARIABLENAME", langCode, subkey, values); } ParseMetaId(handler); // PRESTEXT ParsePresTextOption(handler, LanguageCodes, preferredLanguage); // VALUE_TEXT_OPTION ParseValueTextOption(handler); // denne ble kjørt uavhenging av isSelected da den lå i ParseMeta.cs //keyword = "VALUES" and CODES ParseCodeAndValues(handler, LanguageCodes, preferredLanguage); } }
internal void ParseMeta(PCAxis.Paxiom.IPXModelParser.MetaHandler handler, StringCollection LanguageCodes) { string noLanguage = null; string keyword; string subkey = null; StringCollection values = new StringCollection(); //STUB keyword = PXKeywords.STUB; foreach (PXSqlVariable var in this.GetStubSorted()) { values.Add(var.Name); } handler(keyword, noLanguage, subkey, values); values.Clear(); //HEADING keyword = PXKeywords.STUB; values = new StringCollection(); foreach (PXSqlVariable var in this.GetHeadingSorted()) { values.Add(var.Name); } handler(keyword, noLanguage, subkey, values); values.Clear(); }
/// <PXKeyword name="ELIMINATION"> /// <rule> /// <description>Is set directly in paxiom.</description> /// <table modelName ="ValueSet"> /// <column modelName="Elimination"/> /// </table> /// </rule> /// </PXKeyword> internal void ParseElimination(PCAxis.Paxiom.IPXModelParser.MetaHandler handler, string preferredLanguage) { string subkey = this.Name; string noLanguage = null; StringCollection values = new StringCollection(); if (this.isSelected) //29.6.2010 This keyword should only be sent if the variable is selected. { if (this.PaxiomElimination == PXConstant.YES) { if (this.ValueSets[selectedValueset].Elimination == meta.Config.Codes.EliminationA) { foreach (PXSqlContent pxsqlCont in meta.Contents.Values) { if (!pxsqlCont.AggregPossible) { this.PaxiomElimination = PXConstant.NO; break; } } } } values.Clear(); values.Add(this.PaxiomElimination); handler(PXKeywords.ELIMINATION, noLanguage, subkey, values); } }
/// <summary> /// Sends the data /// </summary> /// <param name="handler"></param> /// <param name="preferredLanguage"></param> public override void ParseMeta(PCAxis.Paxiom.IPXModelParser.MetaHandler handler, string preferredLanguage) { foreach (PXSqlVariableClassification variable in _variables) { variable.ParseForApplyValueSet(handler, mPXSqlMeta.LanguageCodes, preferredLanguage); } }
internal void ParseForApplyValueSet(PCAxis.Paxiom.IPXModelParser.MetaHandler handler, StringCollection LanguageCodes, string preferredLanguage) { string subkey = this.Name; StringCollection values = new StringCollection(); // ELIMINATION ParseElimination(handler, preferredLanguage); //PresText base.ParsePresTextOption(handler, LanguageCodes, preferredLanguage); //Codes and values base.ParseCodeAndValues(handler, LanguageCodes, preferredLanguage); //Hierarchies if (this.currentGrouping != null) { if (this.currentGrouping.isHierarchy) { ParseHierarchies(handler); ParseHierarchyLevelsOpen(handler); ParseHierarchyLevels(handler); ParseHierarchyNames(handler, LanguageCodes); } } }
internal override void ParseMeta(PCAxis.Paxiom.IPXModelParser.MetaHandler handler, StringCollection LanguageCodes, string preferredLanguage) { base.ParseMeta(handler, LanguageCodes, preferredLanguage); if (this.isSelected) { // DOMAIN ParseDomain(handler, LanguageCodes); //MAP ParseMap(handler); // VALUESET_X ParseValueSetKeywords(handler, LanguageCodes); } // ELIMINATION ParseElimination(handler, preferredLanguage); //CANDIDATEMUSTSELECT Extendet property ParseCandidateMustSelect(handler, preferredLanguage); //GROUPING (only for selected and selectionMode) if (this.groupingInfos != null) { this.groupingInfos.ParseMeta(handler); } }
public void ParseNote(PXSqlMeta_21 mMeta, PCAxis.Paxiom.IPXModelParser.MetaHandler handler, string langCode) { string keyWord; string subKeyWord = null; StringCollection parseValue; foreach (PXSqlNote note in this.tableNotes.Values) { if (note.MandOpt == mMeta.Config.Codes.FootnoteM) { keyWord = "NOTEX"; } else { keyWord = "NOTE"; } parseValue = new StringCollection(); parseValue.Add(note.NotePresTexts[langCode]); handler(keyWord, langCode, subKeyWord, parseValue); } foreach (PXSqlNote note in this.variableNotes) { if (note.MandOpt == mMeta.Config.Codes.FootnoteM) { keyWord = "NOTEX"; } else { keyWord = "NOTE"; } subKeyWord = note.Variable; parseValue = new StringCollection(); parseValue.Add(note.NotePresTexts[langCode]); handler(keyWord, langCode, subKeyWord, parseValue); } foreach (PXSqlNote note in this.contentsNotes) { subKeyWord = mMeta.ContensCode + "\",\"" + mMeta.ContentsVariable.Values.GetValueByContentsCode(note.Contents).ValueCode; //subKeyWord = mMeta.ContensCode + "," + note.Contents; if (note.MandOpt == mMeta.Config.Codes.FootnoteM) { keyWord = "VALUENOTEX"; } else { keyWord = "VALUENOTE"; } parseValue = new StringCollection(); parseValue.Add(note.NotePresTexts[langCode]); handler(keyWord, langCode, subKeyWord, parseValue); } }
/// <PXKeyword name="VALUE_TEXT_OPTION"> /// <rule> /// <description>Is "normal" except for those classification variables which has a ValuePool where ValueTextExists is coded as no text or loooong text.</description> /// <table modelName ="ValuePool"> /// <column modelName="ValueTextExists"/> /// </table> /// </rule> /// </PXKeyword> private void ParseValueTextOption(PCAxis.Paxiom.IPXModelParser.MetaHandler handler) { StringCollection values = new StringCollection(); string subkey = this.Name; string noLanguage = null; values.Add(this.mValueTextOption); handler(PXKeywords.VALUE_TEXT_OPTION, noLanguage, subkey, values); }
/// <PXKeyword name="PRESTEXT"> /// <rule> /// <description>For Contents and Time value is read from Config.Codes.ValuePresT (T for Long Value Text, not time :-) and ValuePresC (C for Codes). </description> /// <table modelName ="ValueSet"> /// <column modelName="ValuePres"/> /// </table> /// <table modelName ="ValuePool"> /// <column modelName="ValuePres"/> /// </table> /// </rule> /// </PXKeyword> internal virtual void ParsePresTextOption(PCAxis.Paxiom.IPXModelParser.MetaHandler handler, StringCollection LanguageCodes, string preferredLanguage) { // PRESTEXT StringCollection values = new StringCollection(); string subkey = this.Name; string noLanguage = null; values.Clear(); values.Add(PresTextOptionToPxiomPresText(this.PresTextOption)); handler(PXKeywords.PRESTEXT, noLanguage, subkey, values); }
/// <PXKeyword name="VARIABLETYPE"> /// <rule> /// <description>Variabletype</description> /// <table modelName ="SubTableVariable"> /// <column modelName="VariableType"/> /// </table> /// </rule> /// </PXKeyword> private void ParseVariableType(PCAxis.Paxiom.IPXModelParser.MetaHandler handler) { if (this.VariableType != null) { StringCollection values = new StringCollection(); string subkey = this.Name; string noLanguage = null; values.Add(this.VariableType); handler(PXKeywords.VARIABLE_TYPE, noLanguage, subkey, values); } }
/// <summary>Sends the list of Grouping Info to paxiom</summary> /// <param name="handler">The paxiom feeder</param> /// <PXKeyword name="GROUPING_ID (incerted directly in paxiom)"> /// <rule> /// <description>(incerted directly in paxiom, not via the BuilderAdapter)</description> /// <table modelName ="Grouping"> /// <column modelName="Grouping"/> /// </table> /// </rule> /// </PXKeyword> /// <PXKeyword name="GROUPING_NAME"> /// <rule> /// <description>(incerted directly in paxiom, not via the BuilderAdapter)</description> /// <table modelName ="Grouping"> /// <column modelName="PresText"/> /// </table> /// </rule> /// </PXKeyword> internal void ParseMeta(PCAxis.Paxiom.IPXModelParser.MetaHandler handler) { if (this.infos.Count > 0) { string subkey = this.variableName; StringCollection values = new StringCollection(); //tried with sorting on each language, but skipped it. Use sort in sql where added sort on prestext first language in addition to sortcode //List<PXSqlGroupingInfo> sortedGroupingInfoList; foreach (string langCode in this.infos[0].PresTextByLanguage.Keys) { // sortedGroupingInfoList = new List<PXSqlGroupingInfo>(); // foreach (PXSqlGroupingInfo info in this.infos) // { // sortedGroupingInfoList.Add(info); // } // sortedGroupingInfoList.Sort(PXSqlGroupingInfo.SortGroupingInfo(langCode)); values.Clear(); //foreach (PXSqlGroupingInfo info in sortedGroupingInfoList) foreach (PXSqlGroupingInfo info in this.infos) { values.Add(info.GroupingId); log.Debug("Sending groupingID: " + info.GroupingId); } handler(PXKeywords.GROUPING_ID, langCode, subkey, values); values.Clear(); //groupPres foreach (PXSqlGroupingInfo info in this.infos) { values.Add(info.GroupPres); } handler(PXKeywords.GROUPING_GROUPPRES, langCode, subkey, values); values.Clear(); //this.infos.Sort(PXSqlGroupingInfo.SortGroupingInfo(langCode)); //foreach (PXSqlGroupingInfo info in sortedGroupingInfoList) foreach (PXSqlGroupingInfo info in this.infos) { values.Add(info.PresTextByLanguage[langCode]); } handler(PXKeywords.GROUPING_NAME, langCode, subkey, values); } } }
/// <summary> /// Sends the number of levels which should be initial opened. /// </summary> internal void ParseHierarchyLevelsOpen(PCAxis.Paxiom.IPXModelParser.MetaHandler handler) { string subkey = this.Name; string noLanguage = null; StringCollection values = new StringCollection(); //HIERARCHYLEVELSOPEN values.Clear(); values.Add(currentGrouping.HierarchyLevelsOpen); handler(PXKeywords.HIERARCHYLEVELSOPEN, noLanguage, subkey, values); values = null; }
/// <PXKeyword name="DOMAIN"> /// <rule> /// <description>Deviates from the standard languagehandeling which would be to read the ValuePool column of secondary language table. Doamin is read /// from column ValuePoolEng(2.0) or ValuePoolAlias (later). </description> /// <table modelName ="ValuePool"> /// <column modelName="ValuePool"/> /// </table> /// <table modelName ="ValuePool(secondary language)"> /// <column modelName="ValuePoolEng(2.0)"/> /// <column modelName="ValuePoolAlias(later)"/> /// </table> /// </rule> /// </PXKeyword> private void ParseDomain(PCAxis.Paxiom.IPXModelParser.MetaHandler handler, StringCollection LanguageCodes) { StringCollection values = new StringCollection(); string subkey = this.Name; foreach (string langCode in LanguageCodes) { values.Clear(); values.Add(this.ValuePool.Domain[langCode]); handler(PXKeywords.DOMAIN, langCode, subkey, values); } }
/// <PXKeyword name="MAP"> /// <rule> /// <description> </description> /// <table modelName ="ValueSet"> /// <column modelName="GeoAreaNo"/> /// </table> /// <table modelName ="Grouping"> /// <column modelName="GeoAreaNo"/> /// </table> /// <table modelName ="GroupingLevel"> /// <column modelName="GeoAreaNo"/> /// </table> /// <table modelName ="TextCatalogt"> /// <column modelName="PresText (of main language)"/> /// </table> /// </rule> /// </PXKeyword> private void ParseMap(PCAxis.Paxiom.IPXModelParser.MetaHandler handler) { StringCollection values = new StringCollection(); string subkey = this.Name; string noLanguage = null; if (this.PaxiomMap != null) { values.Clear(); values.Add(this.PaxiomMap); handler(PXKeywords.MAP, noLanguage, subkey, values); } }
internal void ParseForApplyValueSet(PCAxis.Paxiom.IPXModelParser.MetaHandler handler, StringCollection LanguageCodes, string preferredLanguage) { string subkey = this.Name; StringCollection values = new StringCollection(); // ELIMINATION ParseElimination(handler, preferredLanguage); //PresText base.ParsePresTextOption(handler, LanguageCodes, preferredLanguage); //Codes and values base.ParseCodeAndValues(handler, LanguageCodes, preferredLanguage); }
/// <PXKeyword name="TIMEVAL"> /// <rule> /// <description> </description> /// <table modelName ="MainTable"> /// <column modelName="TimeScale"/> /// </table> /// <table modelName ="TimeScale"> /// <column modelName="TimeUnit"/> /// </table> /// <table modelName ="ContentsTime"> /// <column modelName="TimePeriod"/> /// </table> /// </rule> /// </PXKeyword> internal override void ParseMeta(PCAxis.Paxiom.IPXModelParser.MetaHandler handler, StringCollection LanguageCodes, string preferredLanguage) { base.ParseMeta(handler, LanguageCodes, preferredLanguage); //log.Debug("PPPPPPPPPPPPPPPPPParsing"); //TIMEVAL if (mHasTimeVal) { string language = null; string subkey = this.Name; StringCollection values = this.mTimeVal; handler(PXKeywords.TIMEVAL, language, subkey, values); values = null; } }
/// <summary> /// Sends the hierachy for a variable to paxiom /// </summary> internal void ParseHierarchies(PCAxis.Paxiom.IPXModelParser.MetaHandler handler) { string subkey = this.Name; string noLanguage = null; StringCollection values = new StringCollection(); //HIERARCHIES values.Clear(); foreach (string hierarchyParentChild in currentGrouping.getHierarchyForParsing()) { values.Add(hierarchyParentChild); } handler(PXKeywords.HIERARCHIES, noLanguage, subkey, values); values = null; }
public void ParseNote(PXSqlMeta_21 mMeta, PCAxis.Paxiom.IPXModelParser.MetaHandler handler, string langCode) { string keyWord; string subKeyWord = null; StringCollection parseValue; foreach (PXSqlNote note in this) { if (mMeta.Contents.Count == 1) { if ((note.ShowFootNote == mMeta.Config.Codes.FootnoteShowP) || (note.ShowFootNote == mMeta.Config.Codes.FootnoteShowB)) { if (note.MandOpt == mMeta.Config.Codes.FootnoteM) { keyWord = "NOTEX"; } else { keyWord = "NOTE"; } subKeyWord = note.Variable; parseValue = new StringCollection(); parseValue.Add(note.NotePresTexts[langCode]); handler(keyWord, langCode, subKeyWord, parseValue); } } // if more than one contentsvariable is selected the note should be presented different, but there are // no way to parse it to PAXIOm and specify that the note is valid for only one contents. else { if ((note.ShowFootNote == mMeta.Config.Codes.FootnoteShowP) || (note.ShowFootNote == mMeta.Config.Codes.FootnoteShowB)) { if (note.MandOpt == mMeta.Config.Codes.FootnoteM) { keyWord = "NOTEX"; } else { keyWord = "NOTE"; } subKeyWord = note.Variable; parseValue = new StringCollection(); parseValue.Add(note.NotePresTexts[langCode]); handler(keyWord, langCode, subKeyWord, parseValue); } } } }
/// <PXKeyword name="CONTVARIABLE"> /// <rule> /// <description>Hardcoded to ContentsCode</description> /// </rule> /// </PXKeyword> /// <PXKeyword name="AGGREGALLOWED"> /// <rule> /// <description>"No" if any of the selected content has a "no".</description> /// <table modelName ="Contents"> /// <column modelName="AggregPossible"/> /// </table> /// </rule> /// </PXKeyword> internal override void ParseMeta(PCAxis.Paxiom.IPXModelParser.MetaHandler handler, StringCollection LanguageCodes, string preferredLanguage) { base.ParseMeta(handler, LanguageCodes, preferredLanguage); //CONTVARIABLE string language = null; string subkey = null; StringCollection values = new StringCollection(); values.Add(this.Name); handler(PXKeywords.CONTVARIABLE, language, subkey, values); // AggregAllowed language = null; subkey = null; string tmpAggregPossible = PXConstant.YES; foreach (PXSqlContent pxsqlCont in meta.Contents.Values) { if (!pxsqlCont.AggregPossible) { tmpAggregPossible = PXConstant.NO; break; } } values.Clear(); values.Add(tmpAggregPossible); handler(PXKeywords.AGGREGALLOWED, language, subkey, values); language = null; subkey = meta.ContensCode; values = new StringCollection(); values.Clear(); values.Add(PXConstant.YES); handler("CandidateMustSelect", language, subkey, values); log.Debug("meta.Contents.Values.Count=" + meta.Contents.Values.Count.ToString()); // "ContentInfo" // og PXKeywords.PRECISION foreach (PXSqlContent pxsqlCont in meta.Contents.Values) { pxsqlCont.ParseMeta(handler, LanguageCodes); } }
/// <summary> /// Sends the hierachynames to paxiom /// </summary> internal void ParseHierarchyNames(PCAxis.Paxiom.IPXModelParser.MetaHandler handler, StringCollection LanguageCodes) { string subkey = this.Name; StringCollection values = new StringCollection(); //HIERARCYNAMES foreach (string langCode in LanguageCodes) { values.Clear(); foreach (string hierarchyNames in currentGrouping.HierarchyNames[langCode]) { values.Add(hierarchyNames); } handler(PXKeywords.HIERARCHYNAMES, langCode, subkey, values); } values = null; }
/// <PXKeyword name="META_ID"> /// <rule> /// <description>New in 2.3.</description> /// <table modelName ="ValuePool"> /// <column modelName="MetaId"/> /// </table> /// </rule> /// </PXKeyword> private void ParseMetaId(PCAxis.Paxiom.IPXModelParser.MetaHandler handler) { if (this.metaids.Count > 0) { StringCollection values = new StringCollection(); string subkey = this.Name; string noLanguage = null; string theStringToSend = String.Join(",", metaids.ToArray()); log.Debug("Sending METAID string:" + theStringToSend); values.Clear(); values.Add(theStringToSend); handler(PXKeywords.META_ID, noLanguage, subkey, values); } }
/// /// <PXKeyword name="DATANOTECELL"> /// <rule> /// <description>Sends codes from SpecialCharacter when found in datatables.</description> /// <table modelName ="Maintable"> /// <column modelName="SpecCharExists"/> /// </table> /// <table modelName ="SpecialCharacter"> /// <column modelName="all"/> /// </table> /// <table modelName ="The datatables"> /// <column modelName="NPM columns and missing rows"/> /// </table> /// </rule> /// </PXKeyword> /// public void ParseMeta(PCAxis.Paxiom.IPXModelParser.MetaHandler handler, string preferredLanguage) { string keyword; string noLanguage = null; StringCollection values; foreach (KeyValuePair <string, string> dcn in theDataNoteCellEntries) { keyword = PXKeywords.DATANOTECELL; values = new StringCollection(); values.Add(dcn.Value); String myKey = dcn.Key.Replace(",", "\",\"");//for PXModelBuilder.SplittString A","B","C // not "A","B","C" handler(keyword, noLanguage, myKey, values); } }
/// <PXKeyword name="VALUESET_ID"> /// <rule> /// <description> </description> /// <table modelName ="ValueSet"> /// <column modelName="ValueSet"/> /// </table> /// </rule> /// </PXKeyword> /// <PXKeyword name="VALUESET_NAME"> /// <rule> /// <description> </description> /// <table modelName ="ValueSet"> /// <column modelName="PresText"/> /// </table> /// </rule> /// </PXKeyword> private void ParseValueSetKeywords(PCAxis.Paxiom.IPXModelParser.MetaHandler handler, StringCollection LanguageCodes) { StringCollection values = new StringCollection(); string subkey = this.Name; string noLanguage = null; bool parseValueSet; if (meta.inPresentationModus) { parseValueSet = true; } else { if ((this.ValueSets.Values.Count > 1) || (this.groupingInfos.Infos.Count > 0)) { parseValueSet = true; } else { parseValueSet = false; } } if (parseValueSet) { foreach (PXSqlValueSet valueSet in this.ValueSets.Values) { values.Add(valueSet.ValueSet); } handler(PXKeywords.VALUESET_ID, noLanguage, subkey, values); foreach (string langCode in LanguageCodes) { values.Clear(); foreach (PXSqlValueSet valueSet in this.ValueSets.Values) { values.Add(valueSet.PresText[langCode]); } handler(PXKeywords.VALUESET_NAME, langCode, subkey, values); } } }
///<ships PXKeywords="CHARSET"> "ANSI" </ships> ///<ships PXKeywords="AXIS_VERSION"> "2000" <hei>hei</hei></ships> ///<ships PXKeywords="CREATION_DATE"> System.DateTime.UtcNow </ships> /// <PXKeyword name="CODEPAGE"> /// <rule> /// <description>If there exists a Optional_PXCodepage entry in the keywords-section of the dbconfig then the corresponding MetaAdm-row is used otherwise "iso-8859-1"</description> /// <table modelName ="MetaAdm"> /// <column modelName="Value"/> /// </table> /// </rule> /// </PXKeyword> /// <PXKeyword name="AXIS_VERSION"> /// <rule> /// <description>If there exists a Optional_PXAxisVersion entry in the keywords-section of the dbconfig then the corresponding MetaAdm-row is used otherwise "2000"</description> /// <table modelName ="MetaAdm"> /// <column modelName="Value"/> /// </table> /// </rule> /// </PXKeyword> /// /// <PXKeyword name="CHARSET"> /// <rule> /// <description>If there exists a Optional_PXCharset entry in the keywords-section of the dbconfig then the corresponding MetaAdm-row is used otherwise "ANSI"</description> /// <table modelName ="MetaAdm"> /// <column modelName="Value"/> /// </table> /// </rule> /// </PXKeyword> /// <PXKeyword name="DESCRIPTIONDEFAULT"> /// <rule> /// <description>If there exists a Optional_PXDescriptionDefault entry in the keywords-section of the dbconfig then the corresponding MetaAdm-row is used otherwise false</description> /// <table modelName ="MetaAdm"> /// <column modelName="Value"/> /// </table> /// </rule> /// </PXKeyword> /// /// <PXKeyword name="CREATION_DATE"> /// <rule> /// <description> System.DateTime.Now.ToString("yyyy-MM-ddTHH:mm:sszzz") </description> /// /// </rule> /// </PXKeyword> internal void ParseMeta(PCAxis.Paxiom.IPXModelParser.MetaHandler handler, PXMetaAdmValues metaAdm) { string noLanguage = null; string subkey = null; StringCollection values = new StringCollection(); values.Add(metaAdm.PXCharset); handler(PXKeywords.CHARSET, noLanguage, subkey, values); values.Clear(); values.Add(metaAdm.PXAxisVersion); handler(PXKeywords.AXIS_VERSION, noLanguage, subkey, values); values.Clear(); values.Add(metaAdm.PXCodepage); handler(PXKeywords.CODEPAGE, noLanguage, subkey, values); values.Clear(); if (metaAdm.PXDescriptionDefault) { values.Add(PXConstant.YES); } else { values.Add(PXConstant.NO); } handler(PXKeywords.DESCRIPTIONDEFAULT, noLanguage, subkey, values); values.Clear(); // string nowString = System.DateTime.UtcNow.ToString("yyyyMMdd hh:mm"); bug 193 wrong time // string nowString = System.DateTime.Now.ToString(); // string nowString = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm"); // ørebro vedtak(beslut). //ørebro 27.11.2012 Nytt formatvedtak //string nowString = System.DateTime.Now.ToString("yyyy-MM-ddTHH:mm:sszzz"); string nowString = System.DateTime.Now.ToString("yyyyMMdd HH:mm"); values.Add(nowString); handler(PXKeywords.CREATION_DATE, noLanguage, subkey, values); }
internal void ParseAllNotes(PCAxis.Paxiom.IPXModelParser.MetaHandler handler) { //CellNote foreach (string langCode in mMeta.LanguageCodes) { this.CellNotes.ParseNote(mMeta, handler, langCode); } //MainTableNote + SubTableNote + VariableNotes + ContentsNotes foreach (string langCode in mMeta.LanguageCodes) { mMeta.TheNotes.PaxiomNotes.ParseNote(mMeta, handler, langCode); } //MaintValueNotes foreach (string langCode in mMeta.LanguageCodes) { mMeta.TheNotes.MaintValueNotes.ParseNote(mMeta, handler, langCode); } //ValueNotes foreach (string langCode in mMeta.LanguageCodes) { mMeta.TheNotes.ValueNotes.ParseNote(mMeta, handler, langCode); } //ContValueNotes foreach (string langCode in mMeta.LanguageCodes) { mMeta.TheNotes.ContValueNotes.ParseNote(mMeta, handler, langCode); } //ContTimeNotes foreach (string langCode in mMeta.LanguageCodes) { mMeta.TheNotes.ContTimeNotes.ParseNote(mMeta, handler, langCode); } //ContVblNotes foreach (string langCode in mMeta.LanguageCodes) { mMeta.TheNotes.ContVblNotes.ParseNote(mMeta, handler, langCode); } }
internal void ParseCandidateMustSelect(PCAxis.Paxiom.IPXModelParser.MetaHandler handler, string preferredLanguage) { string subkey = this.Name; string noLanguage = null; StringCollection values = new StringCollection(); values.Clear(); if (isCandidateMustSelect()) { values.Add(PXConstant.YES); } else { values.Add(PXConstant.NO); } //handler(PXKeywords.POSSIBLENOTELIM, noLanguage, subkey, values); handler("CandidateMustSelect", noLanguage, subkey, values); }
/// <summary>For PXKeywords.SOURCE and PXKeywords.COPYRIGHT /// </summary> /// <param name="handler"></param> /// <PXKeyword name="SOURCE"> /// <rule> /// <description>Language dependent.</description> /// <table modelName ="Organization"> /// <column modelname="OrganizationName"/> /// </table> /// </rule> /// </PXKeyword> /// <PXKeyword name="COPYRIGHT"> /// <rule> /// <description>If db config value code is Copyright1 or Copyright2 then PXKeywords.COPYRIGHT is set to PXConstant.NO else set to PXConstant.YES</description> /// <table modelName ="Organization"> /// <column modelname="Copyright"/> /// </table> /// </rule> /// </PXKeyword> public void ParseMeta(PCAxis.Paxiom.IPXModelParser.MetaHandler handler) { StringCollection values = new StringCollection(); string subkey = null; foreach (string langCode in nameByLangCode.Keys) { // SOURCE values.Clear(); values.Add(this.nameByLangCode[langCode]); handler(PXKeywords.SOURCE, langCode, subkey, values); } string noLanguage = null; // COPYRIGHT values.Clear(); if (mCopyright) { values.Add(PXConstant.YES); } else { values.Add(PXConstant.NO); } handler(PXKeywords.COPYRIGHT, noLanguage, subkey, values); // OFFICIALSTATISTICS values.Clear(); if (mOfficialStatistics) { values.Add(PXConstant.YES); } else { values.Add(PXConstant.NO); } handler(PXKeywords.OFFICIAL_STATISTICS, noLanguage, subkey, values); }
/// /// <PXKeyword name="DATANOTECELL"> /// <rule> /// <description>Sends codes from SpecialCharacter when found in datatables.</description> /// <table modelName ="Maintable"> /// <column modelName="SpecCharExists"/> /// </table> /// <table modelName ="SpecialCharacter"> /// <column modelName="all"/> /// </table> /// <table modelName ="The datatables"> /// <column modelName="NPM columns and missing rows"/> /// </table> /// </rule> /// </PXKeyword> /// public void ParseMeta(PCAxis.Paxiom.IPXModelParser.MetaHandler handler, string preferredLanguage) { PXSqlNpm myNpms = mMeta.mPxsqlNpm; StringCollection datanoteDistictValues = new StringCollection(); string keyword = PXKeywords.DATANOTECELL; StringCollection values; foreach (KeyValuePair <string, string> dcn in theDataNoteCellEntries) { PXSqlNpm.NPMCharacter myNpm = myNpms.GetNpmBySpeciaCharacterType(dcn.Value); foreach (string lang in mMeta.LanguageCodes) { string presCharacter = myNpm.presCharacters[lang]; values = new StringCollection(); values.Add(presCharacter); String myKey = dcn.Key.Replace(",", "\",\"");//for PXModelBuilder.SplittString A","B","C // not "A","B","C" handler(keyword, lang, myKey, values); } // Keep distinct values of special character to get Presetext. if (!datanoteDistictValues.Contains(dcn.Value)) { datanoteDistictValues.Add(dcn.Value); } } keyword = PXKeywords.NOTE; foreach (string datanoteDistinctValue in datanoteDistictValues) { PXSqlNpm.NPMCharacter myNpm = myNpms.GetNpmBySpeciaCharacterType(datanoteDistinctValue); foreach (string lang in mMeta.LanguageCodes) { string presText = myNpm.presCharacters[lang] + "=" + myNpm.presTexts[lang]; values = new StringCollection(); values.Add(presText); handler(keyword, lang, null, values); } } }
/// <PXKeyword name="TIMEVAL"> /// <rule> /// <description> </description> /// <table modelName ="MainTable"> /// <column modelName="TimeScale"/> /// </table> /// <table modelName ="TimeScale"> /// <column modelName="TimeUnit"/> /// </table> /// <table modelName ="ContentsTime"> /// <column modelName="TimePeriod"/> /// </table> /// </rule> /// </PXKeyword> internal override void ParseMeta(PCAxis.Paxiom.IPXModelParser.MetaHandler handler, StringCollection LanguageCodes, string preferredLanguage) { base.ParseMeta(handler, LanguageCodes, preferredLanguage); //log.Debug("PPPPPPPPPPPPPPPPPParsing"); string language; string subkey = this.Name; StringCollection values; //TIMEVAL if (mHasTimeVal) { language = null; values = this.mTimeVal; handler(PXKeywords.TIMEVAL, language, subkey, values); values = null; } language = null; values = new StringCollection(); values.Clear(); values.Add(PXConstant.YES); handler("CandidateMustSelect", language, subkey, values); }