Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Stored Procedures for a new Method

$
0
0

I am looking to resolve a stored procedure issue.  I am trying to return the results for the following method:

[WebMethod]
        public ReturnICAOInformation GetICAO(string ICAO, string Country, string City, string LAT, string LONG)
        {
            ReturnICAOInformation returnParam = new ReturnICAOInformation();

            using (MASInventoryDbDataContext db = new MASInventoryDbDataContext())
            {

                usp_ValidateICAORresult result = db.usp_ValidateICAO(ICAO, Country, City, LAT, LONG).SingleOrDefault();
                if (result != null)
                {
                    returnParam.ICAO = result.ICAO;
                    returnParam.Country = result.Counrty;
                    returnParam.City = result.City;
                    returnParam.LAT = result.LAT;
                    returnParam.LONG = result.LONG;
                    returnParam.ReturnCode = result.ReturnCode;
                }
                else
                {
                    returnParam.ReturnCode = "failed";
                }
            }

            return returnParam;

        }
    }
}

Any help would be very grateful.

Thanks,

Matt


M Novak


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>