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

                Wait.Show();


                string  frID   = Application.Current.Properties["OtherId"].ToString();
                JObject result = await IAllDataServices_data.GetReturnListByFranchiseId(frID) as JObject;

                if (result != null)
                {
                    var type = (int)result["Type"];
                    if (type == 1)
                    {
                        allReturnDataList = JsonConvert.DeserializeObject <ObservableCollection <CustomerReturnViewItem> >(result["Result"].ToString());
                        if (allReturnDataList.Count == 0)
                        {
                            await App.Current.MainPage.DisplayAlert("Oops!", "Goods Return Not Found", "Ok");
                        }
                    }
                    else
                    {
                        await App.Current.MainPage.DisplayAlert("Error!", (string)result["ResponseMessage"], "Ok");
                    }
                    Wait.Hide();
                }
            }
            catch (Exception ee)
            {
                await App.Current.MainPage.DisplayAlert("Error!", ee.Message, "Ok");
            }
        }