public async Task GetReturnInvoice()
        {
            try
            {
                var Wait = UserDialogs.Instance.Loading("Wait...", Cancel(), "Cancel", true, MaskType.Black);
                Wait.Show();
                JObject result = await _IAllDataServices.GetAllGoodReturn() as JObject;

                if (result != null)
                {
                    var type = (int)result["Type"];
                    if (type == 1)
                    {
                        _GoodsReturn_Class_List = JsonConvert.DeserializeObject <ObservableCollection <FranchiseGoodReturn_Class> >(result["Result"].ToString());
                        if (_GoodsReturn_Class_List.Count == 0)
                        {
                            await App.Current.MainPage.DisplayAlert("Oops!", "Order Return Invoice Not Found", "Ok");

                            ShowReturnInvoice.IsVisible = false;
                        }
                        else
                        {
                            ShowReturnInvoice.IsVisible            = true;
                            MsgResult.IsVisible                    = false;
                            MsgResul.IsVisible                     = false;
                            MsgResu.IsVisible                      = false;
                            ReturnOrderMasterClassList.ItemsSource = _GoodsReturn_Class_List.Where(x => x.Action == "Accepted").ToList();
                        }
                    }
                    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");
            }
        }
Exemple #2
0
        public async Task GetData()
        {
            try
            {
                var Wait = UserDialogs.Instance.Loading("Wait...", Cancel(), "Cancel", true, MaskType.Black);
                Wait.Show();
                JObject result = await _IAllDataServices.GetAllGoodReturn() as JObject;

                if (result != null)
                {
                    var type = (int)result["Type"];
                    if (type == 1)
                    {
                        _GoodsReturn_Class_List = JsonConvert.DeserializeObject <ObservableCollection <FranchiseGoodReturn_Class> >(result["Result"].ToString());
                        if (_GoodsReturn_Class_List.Count == 0)
                        {
                            await App.Current.MainPage.DisplayAlert("Oops!", "Goods Return Not Found", "Ok");

                            //  _Show_Hide_Msg = true;
                            _Request_List = false;
                        }
                        else
                        {
                            _Request_List = true;
                            //   _Show_Hide_Msg = false;
                        }
                    }
                    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");
            }
        }