public void PostJourneyLocationDetails(String StrDeviceId, FrmProgress obj)
        {
            try
            {

                ObjProgressPage = obj;
                CreteXmlBodyForLocPost(StrDeviceId);

                if (Microsoft.Phone.Net.NetworkInformation.NetworkInterface.NetworkInterfaceType != Microsoft.Phone.Net.NetworkInformation.NetworkInterfaceType.None)
                {

                    Uri RequestSubmitDetailsUri = new Uri(ClsCommon.WebserviceLink );

                    HttpWebRequest req = (HttpWebRequest)WebRequest.Create(RequestSubmitDetailsUri);
                    req.Credentials = ClsCommon.cred;
                    req.ContentType = "text/xml;charset=\"utf-8\"";
                    req.Accept = "text/xml";
                    req.Method = "POST";
                    req.BeginGetRequestStream(searchOnlineRequest, req);
                    RequestSubmitDetailsUri = null;
                }

                else
                {
                    MessageBox.Show("Internet connection not available. Please try again later!");
                }
            }
            catch
            { }
        }
예제 #2
0
        public void GetJourneyDetails(String StrDeviceId, string JourneyId, FrmProgress obj)
        {
            ObjFrmProgress = obj;
            try
            {
                if (Microsoft.Phone.Net.NetworkInformation.NetworkInterface.NetworkInterfaceType != Microsoft.Phone.Net.NetworkInformation.NetworkInterfaceType.None)
                {

                    envelope = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                   "<journeydetails><journey_id>"+ JourneyId.ToString() +"</journey_id><deviceid>"+ StrDeviceId.ToString() +"</deviceid></journeydetails>";
                    Uri RequestJourneyDetailslUri = new Uri(ClsCommon.WebserviceLink + "?action=get_points");
                    HttpWebRequest req = (HttpWebRequest)WebRequest.Create(RequestJourneyDetailslUri);
                    req.Credentials = ClsCommon.cred;
                    req.ContentType = "text/xml;charset=\"utf-8\"";
                    req.Accept = "text/xml";
                    req.Method = "POST";
                    req.BeginGetRequestStream(searchOnlineRequest, req);
                    RequestJourneyDetailslUri = null;

                }

                else
                {
                    MessageBox.Show("Internet connection not available. Please try again later!");
                }
            }
            catch
            { }
        }