Example #1
0
        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);
        }
Example #2
0
        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);
        }