コード例 #1
0
        public string getDestination(string Origin)
        {

            string _json = "";
            var _linq = new linq.linq_pricer_feedsDataContext();

            var _rec = from d in _linq.pricer_dest_countries
                       join o in _linq.pricer_origin_points
                           on d.origin_point_ID equals o.origin_point_ID
                       where o.origin_point == Origin
                       orderby d.country_name
                       select new keyvalues { itemId = d.dest_country_ID, itemDescription = d.country_name };


            JavaScriptSerializer _js = new JavaScriptSerializer();
            _json += _js.Serialize(_rec);
            return _json;
        }
コード例 #2
0
        public string getFinal(string Origin, string CountryName)
        {

            string _json = "";
            var _linq = new linq.linq_pricer_feedsDataContext();

            var _rec = from f in _linq.pricer_dest_finals
                       join d in _linq.pricer_dest_countries on f.dest_country_ID equals d.country_id
                       join o in _linq.pricer_origin_points on d.origin_point_ID equals o.origin_point_ID
                       where d.country_name == CountryName
                       where o.origin_point == Origin
                       orderby f.dest_final
                       select new keyvalues { itemId = f.dest_final_ID, itemDescription = f.dest_final };


            JavaScriptSerializer _js = new JavaScriptSerializer();
            _json += _js.Serialize(_rec);
            return _json;
        }
コード例 #3
0
        public string getDestination(string Origin)
        {
            string _json = "";
            var    _linq = new linq.linq_pricer_feedsDataContext();

            var _rec = from d in _linq.pricer_dest_countries
                       join o in _linq.pricer_origin_points
                       on d.origin_point_ID equals o.origin_point_ID
                       where o.origin_point == Origin
                       orderby d.country_name
                       select new keyvalues {
                itemId = d.dest_country_ID, itemDescription = d.country_name
            };


            JavaScriptSerializer _js = new JavaScriptSerializer();

            _json += _js.Serialize(_rec);
            return(_json);
        }
コード例 #4
0
        public string getFinal(string Origin, string CountryName)
        {
            string _json = "";
            var    _linq = new linq.linq_pricer_feedsDataContext();

            var _rec = from f in _linq.pricer_dest_finals
                       join d in _linq.pricer_dest_countries on f.dest_country_ID equals d.country_id
                       join o in _linq.pricer_origin_points on d.origin_point_ID equals o.origin_point_ID
                       where d.country_name == CountryName
                       where o.origin_point == Origin
                       orderby f.dest_final
                       select new keyvalues {
                itemId = f.dest_final_ID, itemDescription = f.dest_final
            };


            JavaScriptSerializer _js = new JavaScriptSerializer();

            _json += _js.Serialize(_rec);
            return(_json);
        }