Example #1
0
        public static Confs GetSearchPubs(int ConfID, string cancertype, string subject, string audience, string publicationformat, string series, string languages)
        {
            String procedureName = "sp_KIOSK_SearchPubs";

            Database  db        = DatabaseFactory.CreateDatabase();
            DbCommand dbCommand = db.GetStoredProcCommand(procedureName);

            db.AddInParameter(dbCommand, "ConfID", DbType.Int32, ConfID);
            db.AddInParameter(dbCommand, "cancertype", DbType.String, cancertype);
            db.AddInParameter(dbCommand, "subject", DbType.String, subject);
            db.AddInParameter(dbCommand, "audience", DbType.String, audience);
            db.AddInParameter(dbCommand, "publicationformat", DbType.String, publicationformat);
            db.AddInParameter(dbCommand, "series", DbType.String, series);
            db.AddInParameter(dbCommand, "languages", DbType.String, languages);

            using (System.Data.IDataReader dr = ExecuteReader(db, dbCommand))
            {
                Confs coll = new Confs();
                Conf  newConf;

                while (dr.Read())
                {
                    newConf = new Conf(Convert.ToInt32(dr["pubid"]),
                                       (string)dr["productid"]);
                    coll.Add(newConf);
                }
                return(coll);
            }
        }
Example #2
0
        public static Confs GetSearchCategory(int ConfID, String CategoryType)
        {
            String procedureName = "";

            if (CategoryType == "CANCERTYPE")
            {
                procedureName = "sp_KIOSK_getCancerTypesByConfID";
            }
            else if (CategoryType == "SUBJECT")
            {
                procedureName = "sp_KIOSK_getSubjectByConfID";
            }
            else if (CategoryType == "AUDIENCE")
            {
                procedureName = "sp_KIOSK_getAudienceByConfID";
            }
            else if (CategoryType == "PUBLICATIONFORMAT")
            {
                procedureName = "sp_KIOSK_getFormatByConfID";
            }
            else if (CategoryType == "SERIES") //Collections
            {
                procedureName = "sp_KIOSK_getSeriesByConfID";
            }
            else if (CategoryType == "LANGUAGES")
            {
                procedureName = "sp_KIOSK_getLanguageByConfID";
            }

            Database  db        = DatabaseFactory.CreateDatabase();
            DbCommand dbCommand = db.GetStoredProcCommand(procedureName);

            db.AddInParameter(dbCommand, "ConfID", DbType.Int32, ConfID);
            using (System.Data.IDataReader dr = ExecuteReader(db, dbCommand))
            {
                Confs coll = new Confs();
                Conf  newConf;

                while (dr.Read())
                {
                    newConf = new Conf(Convert.ToInt32(dr["OPT_ID"]),
                                       (string)dr["OPT_DESC"]);
                    coll.Add(newConf);
                }
                return(coll);
            }
        }
Example #3
0
        public static Confs GetAllConf()
        {
            Database  db        = DatabaseFactory.CreateDatabase();
            DbCommand dbCommand = db.GetStoredProcCommand(strSpGetAllConfName);

            using (System.Data.IDataReader dr = ExecuteReader(db, dbCommand))
            {
                Confs coll = new Confs();
                Conf  newConf;

                while (dr.Read())
                {
                    newConf = new Conf(Convert.ToInt32(dr["CONFERENCEID"]),
                                       (string)dr["CONFERENCENAME"]);
                    coll.Add(newConf);
                }
                return(coll);
            }
        }