Example #1
0
        void sendMessage(Guide_Tourist gt)
        {
            TouristController c = new TouristController();
            PushNotData       p = new PushNotData();

            p.to    = gt.Token;
            p.body  = gt.GuideEmail + "As Accept your request";
            p.title = "Accept Request";
            c.PostNotif(p);
        }
        public List <Tourist> Get(string email)
        {
            Guide_Tourist gt = new Guide_Tourist();

            return(gt.GetAllTouristsOfGuide(email));
        }
        // POST api/<controller> //מכניס ניקוד של תייר לSQL
        public int Post([FromBody] Guide_Tourist guide_Tourist)
        {
            Guide_Tourist g = new Guide_Tourist();

            return(g.PostGuideTouristRank(guide_Tourist));
        }
        // GET api/<controller>/5  //מקבל את כל הניקודים שהמדריך קיבל מהתיירים
        public double Get(int id)
        {
            Guide_Tourist g = new Guide_Tourist();

            return(g.GetAllRanksOfGuide(id));
        }
        // PUT api/<controller>/5   Update tourist request
        public List <Guide_Tourist> Put(Guide_Tourist g)
        {
            Guide_Tourist gt = new Guide_Tourist();

            return(gt.UpdateRequest(g));
        }
        public int PostRequest(Guide_Tourist gt)
        {
            Guide_Tourist g = new Guide_Tourist();

            return(g.AddRequest(gt));
        }
        public Guide_Tourist GetTouristStatus(string email)
        {
            Guide_Tourist gt = new Guide_Tourist();

            return(gt.GetTouristStatus(email));
        }
        public List <Guide_Tourist> GetAllListStatus(List <Tourist> Tourists)
        {
            Guide_Tourist gt = new Guide_Tourist();

            return(gt.GetAllListStatus(Tourists));
        }
        public List <Guide_Tourist> GetRequests(string email)
        {
            Guide_Tourist gt = new Guide_Tourist();

            return(gt.GetRequestsFromSQL(email));
        }
        //GET api/<controller>  GET ALL Requests
        public IEnumerable <Guide_Tourist> Get()
        {
            Guide_Tourist gt = new Guide_Tourist();

            return(gt.GetAllRequests());
        }