示例#1
0
 public Mechanic_RequestDonePage(Int32 MaintananceID)
 {
     InitializeComponent();
     NavigationPage.SetHasNavigationBar(this, false);
     _objM_CheckListResponse   = new M_CheckListResponse();
     _objM_CheckListRequest    = new M_CheckListRequest();
     _objM_RequestDoneResponse = new M_RequestDoneResponse();
     _objM_RequestDoneRequest  = new M_RequestDoneRequest();
     _objHeaderModel           = new HeaderModel();
     _baseUrl         = Settings.Url + Domain.M_CheckboxListApiConstant;
     _baseUrlPostdata = Settings.Url + Domain.M_SendRequestDoneApiConstant;
     _apiServices     = new RestApi();
     CheckBoxObj      = new List <int>();
     _maintananceId   = MaintananceID;
     LoadPageData();
 }
示例#2
0
        private async void LoadPageData()
        {
            //RbtnList.Add("Yes");
            //RbtnList.Add("No");
            try
            {
                _objHeaderModel.TokenCode = Settings.TokenCode;
                _objM_CheckListRequest    = new M_CheckListRequest
                {
                    Id = Settings.UserId,
                };
                if (!CrossConnectivity.Current.IsConnected)
                {
                    DependencyService.Get <IToast>().Show("No Internet Connection!");
                }
                else
                {
                    await Navigation.PushPopupAsync(new LoadingPopPage());

                    _objM_CheckListResponse = await _apiServices.M_ChecklIstDataAsync(new Get_API_Url().CommonBaseApi(_baseUrl), true, _objHeaderModel, _objM_CheckListRequest);

                    if (_objM_CheckListResponse.Response.StatusCode == 200)
                    {
                        sepListView.FlowItemsSource = _objM_CheckListResponse.Response.CheckListList;
                        DependencyService.Get <IToast>().Show("Sucess");
                        await Navigation.PopAllPopupAsync();
                    }
                    else
                    {
                        DependencyService.Get <IToast>().Show("Something Bad Happend please Try again Later!");
                        await Navigation.PopAllPopupAsync();
                    }
                }
            }
            catch (Exception ex)
            {
                var msg = ex.Message;
                await Navigation.PopAllPopupAsync();
            }
        }