コード例 #1
0
        public int FirstTimeInIsraelUPDATE(Tourist tourist)
        {
            DBservices db = new DBservices();

            return(db.FirstTimeInIsraelUPDATE(tourist));
        }
コード例 #2
0
        //מנרמלת תייר ספציפי ע"פ פורמט ההשוואה
        public Match ConvertSpecificTourist(Tourist t)
        {
            Match m = new Match();

            m.Rank = 0;
            m.Id   = t.TouristID;

            //ממיר תאריך לידה לשנה על מנת להשוות בין גילאים
            string o = "";

            if (t.YearOfBirth == null)
            {
                o = "03/03/2020";
            }
            else
            {
                o = t.YearOfBirth;
            }
            char str = '/';

            string[] listTemp = o.Split(str);
            m.Age = int.Parse(listTemp[2]);
            //תאריך לידה

            //מוסיף את השפה של התייר
            List <int> langArray = new List <int>();

            if (t.LanguageCode == 0)
            {
                langArray.Add(0);
            }
            else
            {
                langArray.Add(t.LanguageCode);
            }
            m.Language = langArray;

            //מוסיף את רשימת התחביבים של התייר
            List <int> HobArray = new List <int>();

            if (t.Hobbies != null)
            {
                m.Hobbies = t.Hobbies;
            }
            else
            {
                m.Hobbies = new List <int>();
            }

            //מוסיף את רשימת ההתמחויות של התייר
            List <int> ExperArray = new List <int>();

            if (t.Expertises != null)
            {
                m.Expertises = t.Expertises;
            }
            else
            {
                m.Expertises = new List <int>();
            }
            return(m);
        }
コード例 #3
0
        public int SetBudget(Tourist tourist)
        {
            DBservices db = new DBservices();

            return(db.BudgetUPDATE(tourist));
        }
コード例 #4
0
        public int FlightsDates(Tourist tourist)
        {
            DBservices db = new DBservices();

            return(db.FlightsDatesUpdate(tourist));
        }
コード例 #5
0
        //0= db error
        //1= update succeeded
        public int UploadPicture(Tourist tourist)
        {
            DBservices db = new DBservices();

            return(db.UploadPicture(tourist));
        }
コード例 #6
0
        //0= db error
        //1= update succeeded
        public int EditProfile(Tourist tourist)
        {
            DBservices db = new DBservices();

            return(db.EditProfile(tourist));
        }
コード例 #7
0
        public int InsertTourist(Tourist tourist)
        {
            DBservices db = new DBservices();

            return(db.PostTouristToSQL(tourist));
        }