public void GetJourneylist(String StrDeviceId, FrmRegistration obj)
        {
            try
            {
                ObjFrmRegistration = obj;
                if (Microsoft.Phone.Net.NetworkInformation.NetworkInterface.NetworkInterfaceType != Microsoft.Phone.Net.NetworkInformation.NetworkInterfaceType.None)
                {
                    envelope = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                    "<device><deviceid>" + StrDeviceId.ToString() + "</deviceid></device>";

                    Uri RequestJourneylistlUri = new Uri(ClsCommon.WebserviceLink + "?action=check_registered_device");

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

                else
                {
                    MessageBox.Show("Internet connection not available. Please try again later!");
                }
            }
            catch
            { }
        }
 private void ParseResonseJSonData(string AllJourneyData)
 {
     try
     {
         JObject jObj = JObject.Parse(AllJourneyData);
         ResponseSubmitDtls objRootHistoryDetails = JsonConvert.DeserializeObject<ResponseSubmitDtls>(AllJourneyData);
         ObjMainPage.IsSubmitComplete(objRootHistoryDetails);
         ObjMainPage = null;
         jObj = null;
     }
     catch
     { }
 }
 public void GetJourneylist(String StrDeviceId, FrmRegistration obj)
 {
     try
     {
         ObjFrmRegistration = obj;
         envelope = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + "<device><deviceid>" + StrDeviceId.ToString() + "</deviceid></device>";
         Uri RequestJourneylistlUri = new Uri(ClsCommon.WebserviceLink + "?action=check_registered_device");
         HttpWebRequest req = (HttpWebRequest)WebRequest.Create(RequestJourneylistlUri);
         req.Credentials = ClsCommon.cred;
         req.ContentType = "text/xml;charset=\"utf-8\"";
         req.Accept = "text/xml";
         req.Method = "POST";
         req.BeginGetRequestStream(searchOnlineRequest, req);
         RequestJourneylistlUri = null;
     }
     catch
     { }
 }
        public void PostSubmitDetails(String StrDeviceId, String strFirstName, String LastName, String strEmail, FrmRegistration obj)
        {
            try
            {
                ObjMainPage = obj;
                if (Microsoft.Phone.Net.NetworkInformation.NetworkInterface.NetworkInterfaceType != Microsoft.Phone.Net.NetworkInformation.NetworkInterfaceType.None)
                {
                    envelope = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                    " <user_details>" +
                    " <deviceid>" + StrDeviceId.ToString() + "</deviceid>" +
                    " <first_name>" + strFirstName.ToString() + "</first_name>" +
                    " <last_name>" + LastName.ToString() + "</last_name>" +
                    " <email>" + strEmail.ToString() + "</email>" +
                    " </user_details>";

                    //envelope = "<?xml version=\"1.0\" encoding=\"utf-8\"?><r:user_details xmlns:r=\"http://www.namespace.org/user_details\"> <deviceid>XKVicElWiaSlb6v1ZVf9Bzdgo0</deviceid> <first_name>ttyyy</first_name> <last_name>ydgff</last_name> <email>[email protected]</email> </r:user_details>";

                    Uri RequestSubmitDetailsUri = new Uri(ClsCommon.WebserviceLink + "?action=register");

                    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
            { }
        }
        private void ParseJourneylistlJSonData(string AllJourneyData)
        {
            try
            {
                JObject jObj = JObject.Parse(AllJourneyData);
                RootObjectJourneydetail objRootHistoryDetails = JsonConvert.DeserializeObject<RootObjectJourneydetail>(AllJourneyData);

                if (ObjFrmRegistration==null)
                {

                ObjMainPage.IsDeviceRegistered(objRootHistoryDetails);
                ObjMainPage = null;
                 jObj = null;
                }
                else
                {

                    ObjFrmRegistration.IsSkip(objRootHistoryDetails);
                    ObjFrmRegistration = null;
                    jObj = null;
                }
            }
            catch
            { }
        }