Esempio n. 1
0
        public areaCompositeType GetAreaById(int iIdArea)
        {
            areaCompositeType et = new areaCompositeType();

            param          = new SqlParameter[1];
            param[0]       = new SqlParameter("@fiid_area", SqlDbType.Int);
            param[0].Value = iIdArea;
            DataTable dt = objDB.ExecStore("sp_getAreaById", param);

            et.iIdArea      = int.Parse(dt.Rows[0].ItemArray[0].ToString());
            et.sDescription = dt.Rows[0].ItemArray[1].ToString();
            et.iNumber      = int.Parse(dt.Rows[0].ItemArray[2].ToString());
            et.bStatus      = bool.Parse(dt.Rows[0].ItemArray[3].ToString());
            return(et);
        }
Esempio n. 2
0
        /// <summary>
        /// Obtiene todos los Tipos de Cambio
        /// </summary>
        /// <returns></returns>
        public List <areaCompositeType> getAll()
        {
            List <areaCompositeType> lst = new List <areaCompositeType>();
            DataTable dt = objDB.Consult("sp_selectArea");

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

                lst.Add(et);
            }
            return(lst);
        }