Exemple #1
0
        public ExchangeTypeCompositeType GetExchangeTypeById(int iIdExchangeType)
        {
            ExchangeTypeCompositeType et = new ExchangeTypeCompositeType();

            //try
            //{
            param          = new SqlParameter[1];
            param[0]       = new SqlParameter("@fiid_Exchange_type", SqlDbType.Int);
            param[0].Value = iIdExchangeType;


            DataTable dt = objDB.ExecStore("sp_getExchangeTypeById", param);


            et.iIdExchangeType = int.Parse(dt.Rows[0].ItemArray[0].ToString());
            et.sDescription    = dt.Rows[0].ItemArray[1].ToString();
            et.bStatus         = bool.Parse(dt.Rows[0].ItemArray[2].ToString());
            et.sInitial        = dt.Rows[0].ItemArray[3].ToString();

            return(et);
            //}
            //catch (Exception ex)
            //{
            //    throw ex.Message();
            //}
        }
Exemple #2
0
        /// <summary>
        /// Obtiene todos los Tipos de Cambio
        /// </summary>
        /// <returns></returns>
        public List <ExchangeTypeCompositeType> getAll()
        {
            List <ExchangeTypeCompositeType> lst = new List <ExchangeTypeCompositeType>();


            //try
            //{

            DataTable dt = objDB.Consult("sp_selectExchangeType");


            foreach (DataRow dr in dt.Rows)
            {
                ExchangeTypeCompositeType et = new ExchangeTypeCompositeType();
                et.iIdExchangeType = int.Parse(dr.ItemArray[0].ToString());
                et.sDescription    = dr.ItemArray[1].ToString();
                et.bStatus         = bool.Parse(dr.ItemArray[2].ToString());
                et.sInitial        = dr.ItemArray[3].ToString();

                lst.Add(et);
            }
            return(lst);
            //}
            //catch (Exception ex)
            //{
            //    throw ex.Message();
            //}
        }