protected async Task ExecuteSubmitCommand1()
        {
            try
            {
                bool   isValid      = true;
                string errorMessage = string.Empty;

                if (string.IsNullOrEmpty(this.ContractorEmail))
                {
                    errorMessage = errorMessage + "Email is required.\n";
                }
                else if (!Utility.IsValidEmailAddress(this.ContractorEmail))
                {
                    errorMessage = errorMessage + "Please enter valid email address.\n";
                }

                if (string.IsNullOrEmpty(this.ContractorFirstName))
                {
                    errorMessage = errorMessage + "Firstname is required.\n";
                }
                if (string.IsNullOrEmpty(this.ContractorFirstName))
                {
                    errorMessage = errorMessage + "Lastname is required.\n";
                }

                if (!this.IsCheckedProperty)
                {
                    errorMessage = errorMessage + "terms & condition must be checked.";
                }

                if (!string.IsNullOrEmpty(errorMessage))
                {
                    isValid = false;
                    MessagingCenter.Send(this, "msg", errorMessage);
                }
                else
                {
                    var obj = new Contractor()
                    {
                        Id                    = this.Id,
                        AgentId               = Settings.GeneralSettings,
                        FirstName             = this.ContractorFirstName,
                        LastName              = this.ContractorLastName,
                        Email                 = this.ContractorEmail,
                        Phone                 = this.ContractorPhone,
                        AdditionalInformation = this.ContractorAdditionalInfo,
                        InsertDate            = DateTime.Now
                    };

                    var result = await contractorDataService.AddContractor(obj);

                    if (result != null)
                    {
                        this.CreateContractor(result);
//						var page = new MyContractorPage();
//						var md = new MasterDetailPage();
//						md.Master = new MenuPage(md);
//						md.Detail = new NavigationPage(page) { BarBackgroundColor = Color.Gray };
//						await navigation.PushAsync(md);
                        await navigation.PushAsync(new MyContractorPage());
                    }
                }
            }
            catch (Exception ex)
            {
            }
        }
        protected async Task ExecuteSubmitCommand()
        {
            try
            {
                string errorMessage = string.Empty;
                this.progressService.Show();

                if (string.IsNullOrEmpty(this.ContractorFirstName))
                {
                    errorMessage = errorMessage + Utility.FIRSTNAMEMESSAGE;
                }
                if (string.IsNullOrEmpty(this.ContractorLastName))
                {
                    errorMessage = errorMessage + Utility.LASTNAMEMESSAGE;
                }

                if (string.IsNullOrEmpty(this.ContractorEmail))
                {
                    errorMessage = errorMessage + Utility.EAMAILMESSAGE;
                }
                else if (!Utility.IsValidEmailAddress(this.ContractorEmail))
                {
                    errorMessage = errorMessage + Utility.INVALIDEMAILMESSAGE;
                }

                if (!this.IsCheckedProperty)
                {
                    errorMessage = errorMessage + Utility.TERMSANDCONDITIONMESSAGE;
                }

                if (!string.IsNullOrEmpty(errorMessage))
                {
                    this.progressService.Dismiss();
                    MessagingCenter.Send(this, "msg", errorMessage);
                }
                else
                {
                    var obj = new Contractor()
                    {
                        Id                    = this.Id,
                        AgentId               = Settings.GeneralSettings,
                        FirstName             = this.ContractorFirstName,
                        LastName              = this.ContractorLastName,
                        Email                 = this.ContractorEmail,
                        Phone                 = this.ContractorPhone,
                        AdditionalInformation = this.ContractorAdditionalInfo,
                        InsertDate            = DateTime.Now
                    };
                    var x = DependencyService.Get <FormSample.Helpers.Utility.INetworkService>().IsReachable();
                    if (!x)
                    {
                        this.CreateContractor(obj);
                        progressService.Dismiss();
                        App.RootPage.NavigateTo("Home");
                    }
                    else
                    {
                        var result = await contractorDataService.AddContractor(obj);

                        if (result != null)
                        {
                            App.RootPage.NavigateTo("Home");
                        }
                    }
                }
            }
            catch (Exception)
            {
                progressService.Dismiss();
                MessagingCenter.Send(this, "msg", Utility.SERVERERRORMESSAGE);
            }
        }