Beispiel #1
0
 private void SetVariables()
 {
     //mVariables = new Dictionary<string, PXSqlVariable>();
     mVariables = new PXSqlVariables(this);
     mVariablesClassification = new PXSqlVariablesClassification();
     // Get all the variables connected to the selected maintable
     foreach (MainTableVariableRow aTVRow in mMetaQuery.GetMainTableVariableRows(mMainTableId))
     {
         if (aTVRow.VariableType == mConfig.Codes.VariableTypeT)
         {
             mTimeVariable = new PXSqlVariableTime(aTVRow, this);
             mSqlVariable  = mTimeVariable;
             mVariables.Add(mSqlVariable.Name, mSqlVariable);
         }
         else
         { // Should be changed so that variabletype is set separate.
             if (!mVariables.ContainsKey(aTVRow.Variable))
             {
                 mSqlVariable = new PXSqlVariableClassification(aTVRow, this);
                 mVariablesClassification.Add(mSqlVariable.Name, (PXSqlVariableClassification)mSqlVariable);
                 mVariables.Add(mSqlVariable.Name, mSqlVariable);
             }
         }
         mSqlVariable.VariableType = aTVRow.VariableType;
     }
 }
Beispiel #2
0
 private void SetVariableNotes(RelevantFootNotesRow footNoteRow)
 {
     if (mVariables.ContainsKey(footNoteRow.Variable))
     {
         if (mVariables[footNoteRow.Variable].isSelected)
         {
             PXSqlNote mNote;
             mNote = new PXSqlNote(footNoteRow, this.mMeta);
             mVariableNotes.Add(mNote);
             //  mPXSqlVariables[footNoteRow.Variable].FootNotesVariable.Add(footNoteRow);
         }
     }
 }
Beispiel #3
0
        private void CheckPxs()
        {
            if (this.ConstructedFromPxs)
            {
                foreach (PQVariable selVar in mPxsFile.Query.Variables)
                {
                    if (!mVariables.ContainsKey(selVar.code))  //Should this be considered as an error? YES
                    {
                        throw new PCAxis.Sql.Exceptions.DbPxsMismatchException(7, selVar.code);
                    }
                }

                if (mPxsFile.Query.Time.ToString().Length < 1)
                {
                    throw new PCAxis.Sql.Exceptions.PxsException(8);
                }
                if (!mTimeVariable.Name.Equals(mPxsFile.Query.Time.code))
                {
                    throw new PCAxis.Sql.Exceptions.PxsException(9);
                }
            }
        }