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); }
public List <KPIType> GetKPITypes(string language) { if (string.IsNullOrEmpty(language)) { language = Artexacta.App.Utilities.LanguageUtilities.GetLanguageFromContext(); } List <KPIType> theList = new List <KPIType>(); KPIType theData = null; try { KPITypeDS.KPITypeDetailDataTable theTable = theAdapter.GetKPITypes(language); if (theTable != null && theTable.Rows.Count > 0) { foreach (KPITypeDS.KPITypeDetailRow theRow in theTable) { theData = FillRecord(theRow); theList.Add(theData); } } } catch (Exception exc) { log.Error("Ocurrió un error mientras se obtenía los KPITypes.", exc); throw exc; } return(theList); }