Ejemplo n.º 1
0
        public static QuyTacCollection SelectAll()
        {
            QuyTacCollection List = new QuyTacCollection();

            using (IDataReader rd = SqlHelper.ExecuteReader(DAL.con(), CommandType.StoredProcedure, "sp_tblQuyTac_Select_SelectAll_hoangda"))
            {
                while (rd.Read())
                {
                    List.Add(getFromReader(rd));
                }
            }
            return(List);
        }
Ejemplo n.º 2
0
        public static QuyTacCollection SelectByHost(string host)
        {
            SqlParameter[] obj = new SqlParameter[1];
            if (!string.IsNullOrEmpty(host))
            {
                obj[0] = new SqlParameter("host", host);
            }
            else
            {
                obj[0] = new SqlParameter("host", DBNull.Value);
            }
            QuyTacCollection List = new QuyTacCollection();

            using (IDataReader rd = SqlHelper.ExecuteReader(DAL.con(), CommandType.StoredProcedure, "sp_tblQuyTac_Select_SelectByHost_hoangda", obj))
            {
                while (rd.Read())
                {
                    List.Add(getFromReader(rd));
                }
            }
            return(List);
        }