Esempio n. 1
0
        private async void B5_Clicked(object sender, EventArgs e)
        {
            try
            {
                //Cancel Job
                B5.IsEnabled = false;
                var answer = await DisplayAlert("You are about to cancel a job ", AlertMessages.Canceljob, "Yes", "No");

                if (answer == true)
                {
                    //await loadData(idforsaving);
                    RestClient <bool> Dl = new RestClient <bool>();
                    JobCancel         jc = new JobCancel()
                    {
                        id = ((jobsDetailsViewModel)this.BindingContext)._jobModel.jobApplicantId, status = (int)(JobStatus.Canceled)
                    };
                    var res = await Dl.PutAsync(URLConfig.Changestatus, null, jc);

                    if (res == true)
                    {
                        await loadData(idforsaving);
                        await ButtonApperance();
                    }
                }
                B5.IsEnabled = true;
            }
            catch (Exception exception)
            {
                var logged = new LoggedException.LoggedException("Error in jobdetails.xaml.cs", exception);
                logged.LoggAPI();
            }
        }
Esempio n. 2
0
        //await Navigation.PushAsync(new MapJobLocation(lat, lang));

        private async void Button_Clicked_5(object sender, EventArgs e)
        {
            try
            {
                //Confirm Hiring
                confirmhiring.IsEnabled = false;
                RestClient <bool> Dl = new RestClient <bool>();
                JobCancel         jc = new JobCancel()
                {
                    id = jaid, status = (int)(UserType.Employee)
                };
                var responsex = await Dl.PutAsync(URLConfig.Changestatus, null, jc);

                if (responsex == true)
                {
                    await loadData(idforsaving);
                    await ButtonApperance();
                }

                ThirdGrid.IsVisible  = false;
                secondGrid.IsVisible = false;
                firstgrid.IsVisible  = true;
                await firstgrid.FadeTo(1);

                await secondGrid.FadeTo(0);

                await ThirdGrid.FadeTo(0);
                await ButtonApperance();

                confirmhiring.IsEnabled = true;
            }
            catch (Exception exception)
            {
                var logged = new LoggedException.LoggedException("Error in jobdetails.xaml.cs", exception);
                logged.LoggAPI();
            }
        }