public async Task <bool> DeleteClientAsync(Client client)
        {
            try
            {
                ClientCollection clientCollection = await LoadClientsAsync();

                clientCollection.clients.Remove(clientCollection.clients.Where(x => x.Id == client.Id).First());

                bool saved = await JsonHandler.SaveObject("clientData.json", clientCollection);

                if (saved)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch
            {
                return(false);
            }
        }
        public async Task <bool> AddClientDataAsync(ClientData clientData)
        {
            try
            {
                ClientDataCollection clientDataCollection = await LoadClientData();

                clientDataCollection.clientDataEntries.Add(clientData);

                bool saved = await JsonHandler.SaveObject("clientHistoryData.json", clientDataCollection);

                if (saved)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch
            {
                return(false);
            }
        }
        public async Task <bool> AddClientAsync(Client client)
        {
            try
            {
                ClientCollection clientCollection = await LoadClientsAsync();

                clientCollection.clients.Add(client);

                bool saved = await JsonHandler.SaveObject("clientData.json", clientCollection);

                if (saved)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch
            {
                return(false);
            }
        }
 public static async Task <DoctorCollection> LoadDoctors()
 {
     return(await JsonHandler.LoadObjectAsync <DoctorCollection>("doctorData.json"));
 }
 public static async Task <ClientDataCollection> LoadClientData()
 {
     return(await JsonHandler.LoadObjectAsync <ClientDataCollection>("clientHistoryData.json"));
 }
 public static ClientCollection LoadClients()
 {
     return(JsonHandler.LoadObject <ClientCollection>("clientData.json"));
 }