/// <summary>Loads the data from a row /// </summary> /// <param name="inRow">The data row</param> /// <param name="meta">For config.codes </param> public PXSqlValuepool(QueryLib_24.ValuePoolRow inRow, PXSqlMeta_24 meta) { this.vpRow = inRow; if (this.ValueTextExists.Equals(meta.Config.Codes.ValueTextExistsN)) { this.mValueTextOption = PXConstant.VALUETEXTOPTION_NOTEXT; } else { this.mValueTextOption = PXConstant.VALUETEXTOPTION_NORMAL; } mPresText = new Dictionary <string, string>(); mDomain = new Dictionary <string, string>(); foreach (string langCode in vpRow.texts.Keys) { mPresText[langCode] = vpRow.texts[langCode].PresText; mDomain[langCode] = vpRow.texts[langCode].ValuePoolAlias; if (String.IsNullOrEmpty(mDomain[langCode])) { mDomain[langCode] = vpRow.texts[langCode].ValuePoolAlias; } } }
private void SetSelectedSubTable(PXSqlMeta_24 pxsqlMeta) { Boolean isEqualValueSet; foreach (KeyValuePair <string, PCAxis.Sql.Parser_24.PXSqlSubTable> subTable in this) { isEqualValueSet = true; string subTableName = subTable.Value.SubTable; Dictionary <string, SubTableVariableRow> fromDb = pxsqlMeta.MetaQuery.GetSubTableVariableRowskeyVariable(pxsqlMeta.MainTable.MainTable, subTableName, false); foreach (PQVariable pqvariable in mPxsQuery.Query.Variables) { string variableName = pqvariable.code; string selectedValueset = pqvariable.SelectedValueset; if (!fromDb.ContainsKey(variableName)) { throw new Exception("The variable \"" + variableName + "\" given in the query, does not exist in the database, for the maintable \"" + pxsqlMeta.MainTable.MainTable + "\". Is the query of date? Or the database?"); } string valuesetIdFromSubTableVariableRow = fromDb[variableName].ValueSet; if (selectedValueset != valuesetIdFromSubTableVariableRow && selectedValueset != PXSqlKeywords.FICTIONAL_ID_ALLVALUESETS) { isEqualValueSet = false; break; } } if (isEqualValueSet) { this[subTableName].IsSelected = true; } } }
internal PXSqlNpm(PXSqlMeta_24 mMeta) { this.mMeta = mMeta; cat2Counter = 0; cat3Counter = 0; SpecialCharacterIDbyMetaAdmProprety = new Dictionary <string, string>(); //DataNotAvailable SpecialCharacterIDbyMetaAdmProprety.Add(mMeta.Config.Keywords.DataNotAvailable, mMeta.PXMetaAdmValues.DataNotAvailable); //DATANOTESUM SpecialCharacterIDbyMetaAdmProprety.Add(mMeta.Config.Keywords.DataNoteSum, mMeta.PXMetaAdmValues.DataNoteSum); //DATASYMBOLNIL SpecialCharacterIDbyMetaAdmProprety.Add(mMeta.Config.Keywords.DataSymbolNIL, mMeta.PXMetaAdmValues.DataSymbolNIL); //DATASYMBOLSUM SpecialCharacterIDbyMetaAdmProprety.Add(mMeta.Config.Keywords.DataSymbolSum, mMeta.PXMetaAdmValues.DataSymbolSum); //DEFAULTCODEMISSINGLINE SpecialCharacterIDbyMetaAdmProprety.Add(mMeta.Config.Keywords.DefaultCodeMissingLine, mMeta.PXMetaAdmValues.DefaultCodeMissingLine); // assign properties for specialcharacters setNpmCharacters(); setMetaAdm(); maxDatasymbolN = cat3Counter; }
public NPMCharacter(KeyValuePair <string, SpecialCharacterRow> myRow, PXSqlMeta_24 mMeta) { //this.id = npmId; this.characterType = myRow.Value.CharacterType; this.presCharacters = new Dictionary <string, string>(); this.presTexts = new Dictionary <string, string>(); foreach (string lang in mMeta.LanguageCodes) { this.presCharacters[lang] = myRow.Value.texts[lang].PresCharacter; this.presTexts[lang] = myRow.Value.texts[lang].PresText; } if (myRow.Value.DataCellPres == mMeta.Config.Codes.Yes && myRow.Value.AggregPossible == mMeta.Config.Codes.Yes) { this.category = 1; } else if (myRow.Value.DataCellPres == mMeta.Config.Codes.No && myRow.Value.AggregPossible == mMeta.Config.Codes.Yes) { this.category = 2; } else if (myRow.Value.DataCellPres == mMeta.Config.Codes.No && myRow.Value.AggregPossible == mMeta.Config.Codes.No) { this.category = 3; } }
public PXSqlValueSet(QueryLib_24.ValueSetRow inRow, PXSqlMeta_24 meta, bool isDefaultInGui) { this.mValueSet = inRow.ValueSet; this.elimination = new EliminationAux(inRow.EliminationMethod, inRow.EliminationCode, meta.Config.Codes); this.mSortCodeExists = inRow.SortCodeExists; this.mValuePoolId = inRow.ValuePool; this.mValuePres = inRow.ValuePres; this.mGeoAreaNo = inRow.GeoAreaNo; this.mMetaId = inRow.MetaId; this.IsDefault = isDefaultInGui; foreach (string langCode in inRow.texts.Keys) { //PresText came in version 2.1 and is optional ... desciption is up to 200 chars string asPresText = inRow.texts[langCode].PresText; if (String.IsNullOrEmpty(asPresText)) { asPresText = inRow.texts[langCode].Description; int gridPosition = asPresText.IndexOf('#'); if (gridPosition > 0) { asPresText = asPresText.Substring(0, gridPosition); } } mPresText[langCode] = asPresText; } //private int mNumberOfValues; is set outside class. Bad thing? Yes }
public PXSqlContent(ContentsRow row, PXSqlMeta_24 pxsqlMeta, SqlDbConfig_24 config, PXSqlContact contact) { mRow = row; mContact = contact; //pxsqlMeta.MetaQuery.DB.Codes.Copyright1; mContents = row.Contents; //mFootnoteContents = row.FootnoteContents; //mFootnoteTime = row.FootnoteTime; //mFootnoteValue = row.FootnoteValue; //mFootnoteVariable = row.FootnoteVariable; mPresText = new Dictionary <string, string>(); mPresTextS = new Dictionary <string, string>(); mPresCode = row.PresCode; mBasePeriod = new Dictionary <string, string>(); mRefPeriod = new Dictionary <string, string>(); mUnit = new Dictionary <string, string>(); foreach (string langCode in pxsqlMeta.LanguageCodes) { mPresText[langCode] = row.texts[langCode].PresText; mPresTextS[langCode] = row.texts[langCode].PresTextS; mBasePeriod[langCode] = row.texts[langCode].BasePeriod; mRefPeriod[langCode] = row.texts[langCode].RefPeriod; mUnit[langCode] = row.texts[langCode].Unit; } mPresDecimals = mRow.PresDecimals; pxsqlMeta.DecimalHandler.ShowDecimals = mPresDecimals; pxsqlMeta.DecimalHandler.StoreDecimals = mRow.StoreDecimals; mSeasAdj = mRow.SeasAdj.Equals(config.Codes.Yes); mDayAdj = mRow.DayAdj.Equals(config.Codes.Yes); mLastUpdatet = mRow.LastUpdated; mStockFA = PaxiomifyStockFA(mRow.StockFA, config); mCFPrices = PaxiomifyCFPrices(mRow.CFPrices, config); mAggregPossible = !mRow.AggregPossible.Equals(config.Codes.No); //not notPossible since yes is default #region mCategoryOfCellsInMissingRows and mValueOfCellsInMissingRows if (pxsqlMeta.inPresentationModus && mRow.PresCellsZero.Equals(config.Codes.No)) { // both 2.1 and 2.2 uses a mRow.PresMissingLine from the SpecialCharacter.CharacterType( which is the primary key) // or if mRow.PresMissingLine is missing: the default mValueOfCellsInMissingRows = pxsqlMeta.mPxsqlNpm.DefaultCodeMissingLineMagic; mNPMcharacterinMissingRows = pxsqlMeta.mPxsqlNpm.DefaultCodeMissingLineNPMCharacter; if (!(String.IsNullOrEmpty(mRow.PresMissingLine))) { mValueOfCellsInMissingRows = pxsqlMeta.mPxsqlNpm.DataSymbolNMagic(mRow.PresMissingLine); mNPMcharacterinMissingRows = pxsqlMeta.mPxsqlNpm.DataSymbolNNPMCharacter(mRow.PresMissingLine); } mCategoryOfCellsInMissingRows = pxsqlMeta.mPxsqlNpm.GetCategory(mValueOfCellsInMissingRows).ToString(); } #endregion mCategoryOfCellsInMissingRows and mValueOfCellsInMissingRows }
// public PXSqlParser_24() { } public PXSqlParser_24(PXSqlMeta_24 inPXSqlMeta) { mPXSqlMeta = inPXSqlMeta; if (mPXSqlMeta.inPresentationModus) { symbols = mPXSqlMeta.mPxsqlNpm; } }
/// <summary> /// Constructor called when parser is in selectionmode and there are no grouping ids in pxs or no pxs at all. /// </summary> /// <returns></returns> public PXSqlGrouping(GroupingRow groupingRow, PXSqlMeta_24 meta, PXSqlVariableClassification var, GroupingIncludesType include) { Init(groupingRow, meta, var); //TODO overriding include from paxiom, have to discuss how paxion can override database default. this.mIncludeType = include; //DONE, is now passed to paxiom as part of GroupingInfo ... this.mIncludeType = this.mDefaultIncludeType; //TODO end tempValueList = new StringCollection(); StringCollection tempParentList = new StringCollection(); mGroups = new List <PXSqlGroup>(); PXSqlGroup tmpGroup = null; this.isHierarchy = this.mHierarchy != meta.Config.Codes.HierarchyNon; if (!isHierarchy) // Not hierarchical groups { this.mIncludeType = include; List <ValueGroupRow> myValuegroupRows = meta.MetaQuery.GetValueGroupRowsSorted(mGroupingId, null, true, meta.MainLanguageCode); foreach (ValueGroupRow myRow in myValuegroupRows) { if (!tempParentList.Contains(myRow.GroupCode)) { tmpGroup = new PXSqlGroup(myRow.GroupCode); mGroups.Add(tmpGroup); tempParentList.Add(myRow.GroupCode); } else { foreach (PXSqlGroup group in mGroups) { if (group.ParentCode == myRow.GroupCode) { tmpGroup = group; break; } } } tmpGroup.AddChildCode(myRow.ValueCode); } AddValues(mValuePoolId, tempParentList, valuePoolValueTextExists); } else //hierarchical groups { this.mIncludeType = GroupingIncludesType.All; createHierarchy(meta.MetaQuery.GetValueGroupRowsSorted(mGroupingId, levelOne, true, meta.MainLanguageCode)); setHierarchyLevelsOpen(); setHierarchyLevels(); setHierarchyNames(); variable.Values.Clear(); AddValues(mValuePoolId, tempValueList, valuePoolValueTextExists); } }
public void ParseMeta(IPXModelParser.MetaHandler handler, PXSqlMeta_24 mPXSqlMeta) { string keyword; string noLanguage = null; string subkey = null; StringCollection values; if (mPXSqlMeta.inPresentationModus) { // NPM Characters //DataNoteSum { subkey = null; keyword = PXKeywords.DATANOTESUM; foreach (string langCode in mPXSqlMeta.LanguageCodes) { values = new StringCollection(); values.Add(this.DataSymbolSumPresChar(langCode)); handler(keyword, langCode, subkey, values); } values = null; } //DataSymbolN { for (int i = 1; i <= this.maxDatasymbolN; i++) { subkey = null; values = new StringCollection(); keyword = "DATASYMBOL" + i.ToString(); values.Add(this.DataSymbolNPresChar(i, mPXSqlMeta.LanguageCodes[0])); handler(keyword, noLanguage, subkey, values); values = null; } } //DataSymbolNil { subkey = null; values = new StringCollection(); keyword = PXKeywords.DATASYMBOLNIL; values.Add(this.DataSymbolNilPresChar(mPXSqlMeta.LanguageCodes[0])); handler(keyword, noLanguage, subkey, values); values = null; } //DataSymbolSum { subkey = null; values = new StringCollection(); keyword = PXKeywords.DATASYMBOLSUM; values.Add(this.DataSymbolSumPresChar(mPXSqlMeta.LanguageCodes[0])); handler(keyword, noLanguage, subkey, values); values = null; } } }
/// <summary> /// Receives the data and stores it. /// </summary> /// <param name="inDataNoteCellEntries">the data</param> internal PXSqlParseMetaPostData_24(Dictionary <string, string> inDataNoteCellEntries, Dictionary <string, StringCollection> attributeEntries, string defaultAttributes, PXSqlAttributes attributes, StringCollection languages, IEnumerable <PXSqlNpm.NPMCharacter> usedNPMCharacters, PXSqlMeta_24 meta) { theDataNoteCellEntries = inDataNoteCellEntries; this.defaultAttributes = defaultAttributes; this.attributeEntries = attributeEntries; this.attributes = attributes; this.languages = languages; this.usedNPMCharacters = usedNPMCharacters; mMeta = meta; }
public PXSqlVariableContents(String name, PXSqlMeta_24 meta) : base(name, meta, true, false, false) { mStoreColumnNo = -1; SetSelected(); if (!meta.ConstructedFromPxs) { mIndex = mStoreColumnNo; } SetDefaultPresTextOption(); SetPresText(); }
internal PXSqlMaintable(MainTableRow mtRow, DataStorageRow dataStorageRow, MenuSelectionRow menuSelectionRow, PXSqlMeta_24 meta) { this.meta = meta; this.mtRow = mtRow; this.mDataStorageRow = dataStorageRow; this.mSubjectCode = menuSelectionRow.Selection; foreach (string langCode in menuSelectionRow.texts.Keys) { mSubjectAreaByLanguage[langCode] = menuSelectionRow.texts[langCode].PresText; } }
//for selection or presentation with grouping id in from pxs public PXSqlGrouping(GroupingRow groupingRow, PXSqlMeta_24 meta, PXSqlVariableClassification var, StringCollection outputCodes) { Init(groupingRow, meta, var); StringCollection tempParentList = new StringCollection(); mGroups = new List <PXSqlGroup>(); PXSqlGroup tmpGroup = null; this.isHierarchy = this.mHierarchy != meta.Config.Codes.HierarchyNon; foreach (string code in outputCodes) { tmpGroup = new PXSqlGroup(code); mGroups.Add(tmpGroup); } var parentGroupCodes = mGroups.Select(x => x.ParentCode).ToArray(); Dictionary <string, ValueGroupRow> templist = meta.MetaQuery.GetValueGroupRowskeyValueCode(mGroupingId, parentGroupCodes, true); Dictionary <string, List <string> > childCodesByParentCode = new Dictionary <string, List <string> >(); foreach (var listItem in templist) { string parentCode = listItem.Value.GroupCode; if (!childCodesByParentCode.ContainsKey(parentCode)) { childCodesByParentCode[parentCode] = new List <string>(); } childCodesByParentCode[parentCode].Add(listItem.Key); } foreach (PXSqlGroup group in mGroups) { if (childCodesByParentCode.ContainsKey(group.ParentCode)) { foreach (var childCode in childCodesByParentCode[group.ParentCode]) { group.AddChildCode(childCode); } } else { group.AddChildCode(group.ParentCode); } } // Add the values to valuecollection of this variable AddValues(mValuePoolId, outputCodes, valuePoolValueTextExists); }
//protected Dictionary<string, StringCollection> _AttributesEntries; internal PXSqlAttributes(PXSqlMeta_24 meta) { this.mMeta = meta; mAvailableAttributes = mMeta.MetaQuery.GetAttributeRows(meta.MainTable.MainTable, true); if (mAvailableAttributes.Count > 0) { mHasAttributes = true; mSortedAttributes = getAttributesSorted(); mAllAttributesInOneColumn = CheckIfMoreAttributesInOneColumn(); if (AllAttributesInOneColumn) { mTheOneAndOnlyAttributeColumn = mAvailableAttributes.First().Value.AttributeColumn; } } }
//for presentation without grouping id in from pxs public PXSqlGrouping(PXSqlMeta_24 meta, PXSqlVariableClassification var, List <PXSqlGroup> groupFromPxs) { this.meta = meta; this.variable = var; this.valuePoolValueTextExists = var.ValuePool.ValueTextExists; this.mValuePoolId = var.ValuePool.ValuePool; this.mGroups = groupFromPxs; StringCollection parentCodes = new StringCollection(); foreach (PXSqlGroup group in groupFromPxs) { parentCodes.Add(group.ParentCode); } AddValues(mValuePoolId, parentCodes, valuePoolValueTextExists); }
//private bool mTableContainsMetaOnly; #endregion props #region contructor public PXSqlVariableTime(MainTableVariableRow aTVRow, PXSqlMeta_24 meta) : base(aTVRow.Variable, meta, false, true, false) { mStoreColumnNo = int.Parse(aTVRow.StoreColumnNo); if (!meta.ConstructedFromPxs) { mIndex = mStoreColumnNo; } SetSelected(); SetPresText(); SetDefaultPresTextOption(); SetTimeValues(); mTimeScale = new PXSqlTimeScale(meta.MetaQuery.GetTimeScaleRow(meta.MainTable.TimeScale), meta.Config); SetTimeVal(); PossiblyResetPresText(); }
public PXSqlVariable(string name, PXSqlMeta_24 meta, bool isContVar, bool isTimeVar, bool isClassVar) { this.Name = name; this.IsTimevariable = isTimeVar; this.IsContentVariable = isContVar; this.IsClassificationVariable = isClassVar; this.IsStub = false; this.IsHeading = false; this.Values = new PxSqlValues(); this.PresText = new Dictionary <string, string>(); this.meta = meta; this.metaQuery = meta.MetaQuery; // should be moved to classvar this.IsEliminatedByValue = false; this.selectedValueset = PXSqlKeywords.FICTIONAL_ID_ALLVALUESETS; }
private void Init(GroupingRow groupingRow, PXSqlMeta_24 meta, PXSqlVariableClassification var) { this.meta = meta; this.variable = var; this.valuePoolValueTextExists = var.ValuePool.ValueTextExists; this.mValuePoolId = groupingRow.ValuePool; this.mValuesetIds = var.ValusetIds; this.mGroupingId = groupingRow.Grouping; this.mGroupPres = groupingRow.GroupPres; // throw new NotImplementedException("I init i PXSqlGrouping"); //TODO; tok bort this.mGeoAreaNo = groupingRow.GeoAreaNo; // this.mGeoAreaNo = groupingRow.GeoAreaNo; this.mHierarchy = groupingRow.Hierarchy; this.Description = groupingRow.Description; this.mIsDefault = !string.IsNullOrEmpty(groupingRow.DefaultInGui) && groupingRow.DefaultInGui == meta.Config.Codes.Yes; this.PresText = new Dictionary <string, string>(); foreach (string langCode in meta.LanguageCodes) { this.PresText[langCode] = groupingRow.texts[langCode].PresText; } this.SortCode = groupingRow.texts[meta.MainLanguageCode].SortCode; //TODO added databasedefault to override value from paxiom, should be possible to do both switch (this.mGroupPres.ToUpper()) { case "I": mDefaultIncludeType = GroupingIncludesType.SingleValues; break; case "A": mDefaultIncludeType = GroupingIncludesType.AggregatedValues; break; case "B": mDefaultIncludeType = GroupingIncludesType.All; break; default: mDefaultIncludeType = GroupingIncludesType.AggregatedValues; break; } }
/// <summary>Initializes a new instance of the PXSqlGroupingInfos class, and fills the list of PXSqlGroupingInfo</summary> /// <param name="meta">Holds the state of the builder</param> /// <param name="variableName">The variable which has these groupings.</param> /// <param name="valueSetIds">The valueSets that apply to this builder </param> internal PXSqlGroupingInfos(PXSqlMeta_24 meta, string variableName, StringCollection valueSetIds) { this.variableName = variableName; // finding the IDs of the grouping which may be used for this var valueSetIdsByGroupingId = new Dictionary <string, List <string> >(); groupingIDs = new StringCollection(); foreach (string valueSetId in valueSetIds) { foreach (string groupingId in meta.MetaQuery.GetValueSetGroupingRowskeyGrouping(valueSetId, true).Keys) { groupingIDs.Add(groupingId); if (!valueSetIdsByGroupingId.ContainsKey(groupingId)) { valueSetIdsByGroupingId[groupingId] = new List <string>(); } valueSetIdsByGroupingId[groupingId].Add(valueSetId); } } // finding the ID's of hierarchical groups foreach (string groupingId in meta.MetaQuery.GetMainTableVariableHierarchyRows_KeyIsGroupingID(meta.MainTable.MainTable, variableName, true).Keys) { groupingIDs.Add(groupingId); } //Må sortere groupingIDs List <GroupingRow> sortedGroupingRows = meta.MetaQuery.GetGroupingRowsSorted(groupingIDs, false, meta.MainLanguageCode); // creating Info for them; foreach (GroupingRow groupingRow in sortedGroupingRows) { infos.Add(new PXSqlGroupingInfo(groupingRow, meta.Config.Codes, valueSetIdsByGroupingId[groupingRow.Grouping])); } }
internal PXSqlThingsThatWouldBeTheSameInAllPXSqlContent(ContentsRow someContentsRow, PXSqlMeta_24 meta, SqlDbConfig_24 config) { mStatAuthorityCode = someContentsRow.StatAuthority; string copyright = someContentsRow.Copyright; if (copyright.Equals(config.Codes.Copyright1) || copyright.Equals(config.Codes.Copyright2)) { mCopyright = false; } else if (copyright.Equals(config.Codes.Copyright3)) { mCopyright = true; } else { mCopyright = true; log.Error("The database has copyright=" + copyright + ", but the valid codes from config are " + config.Codes.Copyright1 + "," + config.Codes.Copyright2 + " or " + config.Codes.Copyright3 + "."); } if (copyright.Equals(config.Codes.Copyright1)) { mOfficialStatistics = true; } else { mOfficialStatistics = false; } OrganizationRow org = meta.MetaQuery.GetOrganizationRow(mStatAuthorityCode); foreach (string language in org.texts.Keys) { nameByLangCode.Add(language, org.texts[language].OrganizationName); } }
/// <summary> /// Builds the Contactstring for each language in meta.LanguageCodes. /// </summary> public PXSqlContact(PXSqlMeta_24 meta, string mMainTableId) { foreach (string language in meta.LanguageCodes) { mBigFatContactStringsByLanguage.Add(language, ""); } try { Dictionary <string, MainTablePersonRow> personIDs = new Dictionary <string, MainTablePersonRow>(); try { foreach (KeyValuePair <string, MainTablePersonRow> RoleMain in meta.MetaQuery.GetMainTablePersonRows(mMainTableId, meta.Config.Codes.RoleMain, false)) { if (!personIDs.ContainsKey(RoleMain.Key)) { personIDs.Add(RoleMain.Key, RoleMain.Value); } } } catch (Exceptions.PCAxisSqlException e) { log.Error("Cant add RoleMain", e); } try { foreach (KeyValuePair <string, MainTablePersonRow> RoleContact in meta.MetaQuery.GetMainTablePersonRows(mMainTableId, meta.Config.Codes.RoleContact, true)) { if (!personIDs.ContainsKey(RoleContact.Key)) { personIDs.Add(RoleContact.Key, RoleContact.Value); } } } catch (Exceptions.PCAxisSqlException e) { log.Error("Cant add RoleContact", e); } bool firstPerson = true; foreach (string personId in personIDs.Keys) { PersonRow person = meta.MetaQuery.GetPersonRow(personId); if (!orgs.ContainsKey(person.OrganizationCode)) { orgs.Add(person.OrganizationCode, meta.MetaQuery.GetOrganizationRow(person.OrganizationCode)); } OrganizationRow org = orgs[person.OrganizationCode]; foreach (string language in meta.LanguageCodes) { if (!firstPerson) { //mBigFatContactStringsByLanguage[language] += "#"; // mBigFatContactStringsByLanguage[language] += "||"; } //mBigFatContactStringsByLanguage[language] += person.Forename + " " + person.Surname + ", " + org.texts[language].OrganizationName + // "# " + PCAxis.Paxiom.Localization.PxResourceManager.GetResourceManager().GetString("PxcContactPhone", language) + ": " + person.PhonePrefix + " " + person.PhoneNo + // "#" + PCAxis.Paxiom.Localization.PxResourceManager.GetResourceManager().GetString("PxcContactFax", language) + ": " + person.PhonePrefix + " " + person.FaxNo + // "#" + PCAxis.Paxiom.Localization.PxResourceManager.GetResourceManager().GetString("PxcContactEMail", language) + ": " + person.Email; mBigFatContactStringsByLanguage[language] += person.Forename + "#" + person.Surname + "# " + person.PhonePrefix + "#" + person.PhoneNo + "#" + person.Email + "#" + org.texts[language].OrganizationName + "#" + org.texts[language].Department + "#" + org.texts[language].Unit + "||"; } firstPerson = false; } } catch (Exceptions.PCAxisSqlException e) { log.Error("Cant find contact info", e); } }
// public PXSqlVariableClassification() { } public PXSqlVariableClassification(MainTableVariableRow aTVRow, PXSqlMeta_24 meta) : base(aTVRow.Variable, meta, false, false, true) { if (this.meta.ConstructedFromPxs) { foreach (PQVariable tmpVar in this.meta.PxsFile.Query.Variables) { if (this.Name == tmpVar.code) { this.pxsQueryVariable = tmpVar; } } } SetSelected(); if (this.isSelected) { this.mStoreColumnNo = int.Parse(aTVRow.StoreColumnNo); if (!this.meta.ConstructedFromPxs) { this.mIndex = this.mStoreColumnNo; } SetValueset(); SetValuePool(); SetPresText(); SetDefaultPresTextOption(); // would be overwritten if options set in pxs if (this.meta.ConstructedFromPxs) { SetOptionsFromPxs(); } if (this.meta.inSelectionModus) { this.groupingInfos = new PXSqlGroupingInfos(this.meta, this.Name, valusetIds); } } else { SetValueset(); } // Elimination must be done after SetValues moved down. // if (this.meta.InstanceModus == Instancemodus.selection) // SetElimForSelection(); // else // SetElimForPresentation(); if (this.aggregationType.Equals("G")) { if (String.IsNullOrEmpty(this.aggregatingStructureId)) { throw new ApplicationException("Not implemented yet"); } else if (this.aggregatingStructureId.Equals("UNKNOWNSTRUCTUREID")) { List <PXSqlGroup> groupFromFile = GetListOfGroupFromPxs(); currentGrouping = new PXSqlGrouping(this.meta, this, groupFromFile); } else { currentGrouping = new PXSqlGrouping(this.metaQuery.GetGroupingRow(this.aggregatingStructureId), this.meta, this, this.pxsQueryVariable.GetCodesNoWildcards()); } } else { SetValues(); SetCodelists(); } SetMetaIdFromAllGroupings(); if (this.meta.inSelectionModus) { SetElimForSelection(); } else { SetElimForPresentation(); } }
public PXSqlVariables(PXSqlMeta_24 meta) { this.meta = meta; }
public PXSqlSubTables(Dictionary <string, SubTableRow> altIBasen, PxsQuery pPxsQuery, PXSqlMeta_24 pxsqlMeta) : base() { this.mPxsQuery = pPxsQuery; PXSqlSubTable mSubTable; foreach (SubTableRow subTableRow in altIBasen.Values) { mSubTable = new PXSqlSubTable(subTableRow); this.Add(mSubTable.SubTable, mSubTable); } // set selected subtables. if (pPxsQuery == null) { foreach (PXSqlSubTable subTable in this.Values) { subTable.IsSelected = true; } } else { SetSelectedSubTable(pxsqlMeta); } }
/// <summary> /// IDisposable implemenatation /// </summary> override public void Dispose() { mPXSqlMeta = null; }
/// <summary> /// Creating a parser that sends data for the named variable /// </summary> /// <param name="inPXSqlMeta">PXSqlMeta holding variables</param> /// <param name="variableCode">Name of the vaiable</param> public PXSqlParserForCodelists_24(PXSqlMeta_24 inPXSqlMeta, String variableCode) { mPXSqlMeta = inPXSqlMeta; _variables = new List <PXSqlVariableClassification>(); _variables.Add(inPXSqlMeta.VariablesClassification[variableCode]); }