Ejemplo n.º 1
0
        public List <CurrencyUnit> GetCurrencyUnitsByCurrency(string language, string currencyID)
        {
            List <CurrencyUnit> theList = new List <CurrencyUnit>();
            CurrencyUnit        theData = null;

            try
            {
                CurrencyDS.CurrencyUnitsForCurrencyDataTable theTable = theAdapter.GetCurrencyUnitByCurrency(language, currencyID);

                if (theTable != null && theTable.Rows.Count > 0)
                {
                    foreach (CurrencyDS.CurrencyUnitsForCurrencyRow theRow in theTable.Rows)
                    {
                        theData = FillRecord(theRow);
                        theList.Add(theData);
                    }
                }
            }
            catch (Exception exc)
            {
                log.Error("Ocurrió un error al obtener la lista de CurrencyUnits de la Base de Datos", exc);
                throw exc;
            }

            return(theList);
        }
Ejemplo n.º 2
0
    public void CreateCurrencyUnits()
    {
        List <CurrencyUnits> cu = new List <CurrencyUnits>();

        CurrencyDSTableAdapters.CurrencyUnitsForCurrencyTableAdapter ta =
            new CurrencyDSTableAdapters.CurrencyUnitsForCurrencyTableAdapter();
        CurrencyDS.CurrencyUnitsForCurrencyDataTable table = ta.GetCurrencyUnitsForCurrencies("EN");
        foreach (CurrencyDS.CurrencyUnitsForCurrencyRow row in table)
        {
            cu.Add(new CurrencyUnits(row.currencyID, row.currencyUnitID));
        }

        currencies = cu.ToArray();
    }
Ejemplo n.º 3
0
        public CurrencyUnit GetCurrencyUnitsById(string language, string currencyId, string currencyUnitId)
        {
            CurrencyUnit theData = null;

            try
            {
                CurrencyDS.CurrencyUnitsForCurrencyDataTable theTable = theAdapter.GetCurrencyUnitByID(language, currencyId, currencyUnitId);

                if (theTable != null && theTable.Rows.Count > 0)
                {
                    theData = FillRecord(theTable[0]);
                }
            }
            catch (Exception exc)
            {
                log.Error("Ocurrió un error al obtener un CurrencyUnit de la Base de Datos", exc);
                throw exc;
            }

            return(theData);
        }