Example #1
0
        public void UpdateExhibit([FromBody] Exhibit exhibit)
        {
            //create the exhibit manager
            ExhibitDBManager exhibitDBManager = new ExhibitDBManager();

            //insert exhibit into database
            exhibitDBManager.Update(exhibit);
        }
Example #2
0
        public void DeleteExhibit([FromBody] Exhibit exhibitData)
        {
            //create the exhibit manager
            ExhibitDBManager exhibitDBManager = new ExhibitDBManager();

            int exhibitID = exhibitData.getId();

            //update exhibit and add it to the database
            exhibitDBManager.Delete(exhibitID);
        }
Example #3
0
        public string GetAllExhibits()
        {
            //get list of exhibits
            ExhibitDBManager exhibitDBManager = new ExhibitDBManager();
            List <Exhibit>   exhibitsArr      = exhibitDBManager.getExhibits();

            //IEnumerable<Exhibit> temp = exhibitsArr;
            //  string json =  Newtonsoft.Json.JsonConvert.SerializeObject(temp);
            string jsonExhibitsArr = Newtonsoft.Json.JsonConvert.SerializeObject(exhibitsArr);

            return(jsonExhibitsArr);
        }