Exemplo n.º 1
0
        private async void RestoreClientAsync(ClientName job)
        {
            bool result = await RecoverClientWarning();

            if (!result)
            {
                if (job.Name != null)
                {
                    job.IsSoftDeleted = false;
                    ClientList.Remove(job);
                }
                else
                {
                    job.IsSoftDeleted = false;
                    EstimateList.Remove(job);
                }

                database.Update(job);

                //start
                RefreshList();

                SearchBarVisible();
                ESearchBarVisible();

                if (ClientList.Count == 3)
                {
                    SearchText = "";
                    SearchTextChanged();
                }
                else
                {
                    SearchTextChanged();
                }

                if (EstimateList.Count == 3)
                {
                    ESearchText = "";
                    SearchETextChanged();
                }
                else
                {
                    SearchETextChanged();
                }
                //finish
            }
        }
Exemplo n.º 2
0
        //finish

        private async void RemoveClientAsync(ClientName job)
        {
            bool result = await DeleteClientWarning();

            if (!result)
            {
                if (job.Name != null)
                {
                    ClientList.Remove(job);
                }
                else
                {
                    EstimateList.Remove(job);
                }

                database.Table <ClientName>().Delete(x => x.Id == job.Id);

                database.Update(job);

                //start
                RefreshList();

                SearchBarVisible();
                ESearchBarVisible();

                if (ClientList.Count == 3)
                {
                    SearchText = "";
                    SearchTextChanged();
                }
                else
                {
                    SearchTextChanged();
                }

                if (EstimateList.Count == 3)
                {
                    ESearchText = "";
                    SearchETextChanged();
                }
                else
                {
                    SearchETextChanged();
                }
                //finish
            }
        }
Exemplo n.º 3
0
        public async void RemoveClient(ClientName client)
        {
            bool result = await DeleteClientWarning();

            if (!result)
            {
                if (client.Name != null)
                {
                    ClientList.Remove(client);
                }
                else
                {
                    EstimateList.Remove(client);
                }

                client.IsSoftDeleted = true;

                database.Update(client);

                RefreshList();

                SearchBarVisible();
                ESearchBarVisible();

                if (ClientList.Count == 3)
                {
                    SearchText = "";
                    SearchTextChanged();
                }
                else
                {
                    SearchTextChanged();
                }

                if (EstimateList.Count == 3)
                {
                    ESearchText = "";
                    SearchETextChanged();
                }
                else
                {
                    SearchETextChanged();
                }
            }
        }