public KPIType GetKPITypesByID(string kpiTypeID, string language) { if (string.IsNullOrEmpty(language)) { language = Artexacta.App.Utilities.LanguageUtilities.GetLanguageFromContext(); } KPIType theData = null; try { KPITypeDS.KPITypeDetailDataTable theTable = theAdapter.GetKPITypeById(kpiTypeID, language); if (theTable != null && theTable.Rows.Count > 0) { KPITypeDS.KPITypeDetailRow theRow = theTable[0]; theData = FillRecord(theRow); } } catch (Exception exc) { log.Error("Ocurrió un error mientras se obtenÃa un KPIType.", exc); throw exc; } return(theData); }
private static KPIType FillRecord(KPITypeDS.KPITypeDetailRow row) { KPIType theNewRecord = new KPIType( row.kpiTypeID, row.directionID, row.strategyID, row.unitID, row.typeName, row.description); return(theNewRecord); }