public List <User> GetAllUsers()
        {
            string responseJsonString = null;

            using (var httpClient = new WebClient())
            {
                try
                {
                    responseJsonString = httpClient.DownloadString(UrlConstant.BaseUrl + UrlConstant.GetAllUsers);
                    var data = new DeserializeData <ResponseData <User> >(responseJsonString);
                    users = data.DeserializedObject.data;
                }
                catch (Exception)
                {
                    ///throw;
                }
            }
            return(users);
        }
        public List <Programare> GetDoctorProgramations(int DoctorId)
        {
            string responseJsonString = null;

            using (var httpClient = new WebClient())
            {
                try
                {
                    responseJsonString = httpClient.DownloadString(UrlConstant.BaseUrl + UrlConstant.GetProgramationByIdDoctor + DoctorId);
                    var data = new DeserializeData <ResponseData <Programare> >(responseJsonString);
                    programare_dct = data.DeserializedObject.data;
                }
                catch (Exception)
                {
                    throw;
                }
            }
            return(programare_dct);
        }
        public List <AvailableDay> GetAllAvailableDays()
        {
            string responseJsonString = null;

            using (var httpClient = new WebClient())
            {
                try
                {
                    responseJsonString = httpClient.DownloadString(UrlConstant.BaseUrl + UrlConstant.GetAllAvailableDay);
                    var data = new DeserializeData <ResponseData <AvailableDay> >(responseJsonString);
                    availableDays = data.DeserializedObject.data;
                }
                catch (Exception)
                {
                    throw;
                }
            }
            return(availableDays);
        }
        public List <Programare> GetAllProgramation()
        {
            string responseJsonString = null;

            using (var httpClient = new WebClient())
            {
                try
                {
                    responseJsonString = httpClient.DownloadString(UrlConstant.BaseUrl + UrlConstant.GetAllProgramation);
                    var data = new DeserializeData <ResponseData <Programare> >(responseJsonString);
                    programari = data.DeserializedObject.data;
                }
                catch (Exception)
                {
                    ///throw;
                }
            }

            return(programari);
        }
        public List <RelationProcedureDoctor> GetAllProcedureDocRelations()
        {
            List <RelationProcedureDoctor> relations;
            string responseJsonString = null;

            using (var httpClient = new WebClient())
            {
                try
                {
                    responseJsonString = httpClient.DownloadString(UrlConstant.BaseUrl + UrlConstant.GetAllProcedureDocRelation);
                    var data = new DeserializeData <ResponseData <RelationProcedureDoctor> >(responseJsonString);
                    relations = data.DeserializedObject.data;
                }
                catch (Exception)
                {
                    throw;
                }
            }
            return(relations);
        }
        public User GetUserLog(string login, string password)
        {
            List <User> loggedUser;
            string      responseJsonString = null;

            using (var httpClient = new WebClient())
            {
                try
                {
                    responseJsonString = httpClient.DownloadString(UrlConstant.BaseUrl + UrlConstant.GetUserById + login + '.' + password);
                    var data = new DeserializeData <ResponseData <User> >(responseJsonString);
                    loggedUser = data.DeserializedObject.data;
                }
                catch (Exception)
                {
                    throw;
                }
            }
            return(loggedUser.FirstOrDefault());
        }
        public List <Procedura> GetAllProcedure()
        {
            string responseJsonString = null;

            using (var httpClient = new WebClient())
            {
                string url = UrlConstant.BaseUrl + UrlConstant.GetAllProcedure;
                responseJsonString = httpClient.DownloadString(url);
                var data = new DeserializeData <ResponseData <Procedura> >(responseJsonString);
                procedures = data.DeserializedObject.data;
                //try
                //{

                //}
                //catch (Exception)
                //{
                //    throw;
                //}
            }

            return(procedures);
        }