internal static List <IFactorLevelPoint> GetCollection(DataTable dataItems, enumFactorFormatType factorformattypeid) { List <IFactorLevelPoint> listCollection = new List <IFactorLevelPoint>(); IFactorLevelPoint current = null; if (dataItems != null) { for (int i = 0; i < dataItems.Rows.Count; i++) { if (factorformattypeid == enumFactorFormatType.FES) { current = new FesFactorLevelPoints(dataItems.Rows[i]); } else if (factorformattypeid == enumFactorFormatType.GSSG) { current = new GSSGFactorLevelPoints(dataItems.Rows[i]); } listCollection.Add(current); } } else { throw new Exception("You cannot create a FactorLevelPoint collection from a null data table."); } return(listCollection); }
protected virtual void FillObject(IFactorLevelPoint factorlevelpointobj, enumFactorFormatType factoformatypeid) { this._factorID = factorlevelpointobj.FactorID; this._factorLevelID = factorlevelpointobj.FactorLevelID; this._levelID = factorlevelpointobj.LevelID; this._point = factorlevelpointobj.Point; }
protected virtual void FillObjectFromRowData(DataRow returnRow) { this._positionfactorLogID = (long)returnRow["PositionFactorLogID"]; this._positionDescriptionID = (long)returnRow["PositionDescriptionID"]; this._positionFactorID = (int)returnRow["PositionFactorID"]; this._factorFormatTypeID = (enumFactorFormatType)returnRow["FactorFormatTypeID"]; this._factorLevelID = (int)returnRow["FactorLevelID"]; this._point = (int)returnRow["Point"]; this._language = returnRow["Language"].ToString(); this._justification = returnRow["Justification"].ToString(); this._recommendationNote = returnRow["RecommendationNote"].ToString(); this._workflowStatusID = (PDStatus)returnRow["WorkflowStatusID"]; this._workflowCreateDate = (DateTime)returnRow["WorkflowCreateDate"]; this._workflowCreatedByID = (int)returnRow["WorkflowCreatedByID"]; }
protected virtual void FillObject(ISeriesFactorLevelLanguage seriesfactorlevellanguage, enumFactorFormatType factorformattypeid) { this._factorformattypeID = factorformattypeid; this._seriesID = seriesfactorlevellanguage.SeriesID; this._factorlevelID = seriesfactorlevellanguage.FactorLevelID; if (seriesfactorlevellanguage.FactorLevelLanguage != null) { this._factorLevelLanguage = seriesfactorlevellanguage.FactorLevelLanguage; } this._levelID = seriesfactorlevellanguage.LevelID; this._point = seriesfactorlevellanguage.Point; this._factorID = seriesfactorlevellanguage.FactorID; }
public FactorLevelPoint(int factorlevelid, enumFactorFormatType factorformattypeid) { try { if (factorformattypeid == enumFactorFormatType.FES) { FesFactorLevelPoints fesfactorlevelpoints = new FesFactorLevelPoints(factorlevelid); FillObject(fesfactorlevelpoints, factorformattypeid); } else if (factorformattypeid == enumFactorFormatType.GSSG) { GSSGFactorLevelPoints gssgfactorlevelpoints = new GSSGFactorLevelPoints(factorlevelid); FillObject(gssgfactorlevelpoints, factorformattypeid); } } catch (Exception ex) { HandleException(ex); } }
//public SeriesFactorLevelLanguage(DataRow singleRowData) //{ // // Load Object by dataRow // try // { // this.FillObjectFromRowData(singleRowData); // } // catch (Exception ex) // { // HandleException(ex); // } //} public SeriesFactorLevelLanguage(int seriesid, int fesfactorlevelid, enumFactorFormatType factorformattypeid) { try { if (factorformattypeid == enumFactorFormatType.FES) { SeriesFesFactorLevelLanguage seriesfesfactorlevellanguage = new SeriesFesFactorLevelLanguage(seriesid, fesfactorlevelid); FillObject(seriesfesfactorlevellanguage, factorformattypeid); } else if (factorformattypeid == enumFactorFormatType.GSSG) { SeriesGSSGFactorLevelLanguage seriesgssgfactorlevellanguage = new SeriesGSSGFactorLevelLanguage(seriesid, fesfactorlevelid); FillObject(seriesgssgfactorlevellanguage, factorformattypeid); } } catch (Exception ex) { HandleException(ex); } }
public NarrativeFactor(enumFactorFormatType factorformattypeid) { // Load Object by ID DataTable returnTable; try { if ((factorformattypeid == enumFactorFormatType.Narrative) || (factorformattypeid == enumFactorFormatType.NarrativeSupervisory)) { returnTable = ExecuteDataTable("spr_GetNarrativeFactorLanguageByFactorFormatType", (int)factorformattypeid); loadData(returnTable); } else { throw new ApplicationException("NarrativeFactor object supports Narrative Factor Format types."); } } catch (Exception ex) { HandleException(ex); } }