Exemple #1
0
        public async void getDetailsFromServer()
        {
            var Wait = UserDialogs.Instance.Loading("Wait...", Cancel(), "", true, MaskType.Black);

            Wait.Show();
            try
            {
                JObject result = await _IAllDataServices.GetFranchiseDetailByFranchiseId(frID) as JObject;

                if (result != null)
                {
                    var type = (int)result["Type"];
                    if (type == 1)
                    {
                        DetailModel = JsonConvert.DeserializeObject <FranchiseeFullDetailModel>(result["Result"].ToString());
                        if (DetailModel != null)
                        {
                            initialiseList();
                        }
                    }
                    else
                    {
                        await App.Current.MainPage.DisplayAlert("Error!", (string)result["ResponseMessage"], "Ok");
                    }
                    Wait.Hide();
                }
                else
                {
                    Wait.Hide();
                }
            }
            catch (Exception e)
            {
                Wait.Hide();
            }
        }