Exemplo n.º 1
0
        public void AddPrice(ApiHeader apiHeader, EditPriceModel models)
        {
            var url = ApiUrl.Default.RootApi + ApiUrl.Default.AddPrice;

            //var ob = JsonConvert.SerializeObject(models);
            Restful.Post(url, apiHeader, models);
        }
Exemplo n.º 2
0
        public IList <AppointmentResult> GetListAppointment(FilterAppointmentModel model)
        {
            var url  = ApiUrl.Default.RootApi + ApiUrl.Default.GetListAppointmentsOfDoctor;
            var data = Restful.Post(url, null, model);

            _total = data["Total"].ToObject <int>();
            return(data.GetList <AppointmentResult>(ApiKeyData.ListAppointment));
        }
Exemplo n.º 3
0
        public AuthInfo GetAuthInfo(string email)
        {
            var url  = ApiUrl.Default.RootApi + ApiUrl.Default.LoginDoctor;
            var data = new
            {
                Email365 = email
            };

            return(Restful.Post(url, null, data).Get <AuthInfo>());
        }
Exemplo n.º 4
0
        public PatientResult GetByPhone(string phoneNumber)
        {
            var url  = ApiUrl.Default.RootApi + ApiUrl.Default.GetPatientByPhone;
            var data = new
            {
                Phone = phoneNumber
            };

            return(Restful.Post(url, null, data).Get <PatientResult>());
        }
Exemplo n.º 5
0
        public void ResendInviteEmail(string userId, string clinicId)
        {
            var url  = ApiUrl.Default.RootApi + ApiUrl.Default.ResendInviteEmail;
            var data = new
            {
                ClinicId = clinicId,
                DoctorId = userId
            };

            Restful.Post(url, null, data);
        }
Exemplo n.º 6
0
        public void UpdateStatus(string id, int status)
        {
            var url  = ApiUrl.Default.RootApi + ApiUrl.Default.UpateAppointmentStatus;
            var data = new
            {
                AppointmentId = id,
                Status        = status
            };

            Restful.Post(url, null, data);
        }
Exemplo n.º 7
0
        public StatusResult CheckDoctorExists(string clinicId, string email)
        {
            var url  = ApiUrl.Default.RootApi + ApiUrl.Default.CheckDoctorExists;
            var data = new
            {
                ClinicId = clinicId,
                Email    = email
            };

            return(Restful.Post(url, null, data).Get <StatusResult>());
        }
Exemplo n.º 8
0
        public IList <PatientModel> ListPatients(int start = GlobalConstant.StartIndex, int length = GlobalConstant.Length, string search = null)
        {
            var url  = ApiUrl.Default.RootApi + ApiUrl.Default.ListPatient;
            var data = Restful.Post(url, null, new
            {
                Start = start,
                Limit = length
            });

            _total = data["Total"].ToObject <int>();
            return(data.GetList <PatientModel>(ApiKeyData.ListPatient));
        }
Exemplo n.º 9
0
        public IList <UserModel> ListClinicUsers(int start, int lenght, string keyword)
        {
            var url  = ApiUrl.Default.RootApi + ApiUrl.Default.ListUser;
            var data = Restful.Post(url, null, new {
                Start    = start,
                Limit    = lenght,
                Keywords = keyword,
            });

            _total = data["Total"].ToObject <int>();
            return(data.GetList <UserModel>(ApiKeyData.ListDoctor));
        }
Exemplo n.º 10
0
        public StatusResult CheckUpcomingAppointmentsOfDoctor(string doctorId, string clinicId, long timeCurrent)
        {
            var url  = ApiUrl.Default.RootApi + ApiUrl.Default.CheckUpcomingAppointmentsOfDoctor;
            var data = new
            {
                DoctorId    = doctorId,
                ClinicId    = clinicId,
                TimeCurrent = timeCurrent,
            };

            return(Restful.Post(url, null, data).Get <StatusResult>());
        }
Exemplo n.º 11
0
        public void SendMailAccount365(string email, string firstname, string email365, string password365)
        {
            var url  = ApiUrl.Default.RootApi + ApiUrl.Default.SendOffice365ToUser;
            var data = new {
                FirstName   = firstname,
                Email       = email,
                Email365    = email365,
                Password365 = password365
            };

            Restful.Post(url, null, data);
        }
Exemplo n.º 12
0
        public void UpdateAccountOffice365(string doctorId, string email365, string password365)
        {
            var url  = ApiUrl.Default.RootApi + ApiUrl.Default.UpdateAccountOffice365;
            var data = new
            {
                DoctorId    = doctorId,
                Email365    = email365,
                Password365 = password365
            };

            Restful.Post(url, null, data);
        }
Exemplo n.º 13
0
        public void ActiveUser(string doctorId, int status, string clinicId)
        {
            var url  = ApiUrl.Default.RootApi + ApiUrl.Default.ActiveDoctor;
            var data = new
            {
                DoctorId = doctorId,
                Status   = status,
                ClinicId = clinicId
            };

            Restful.Post(url, null, data);
        }
Exemplo n.º 14
0
        public void ActiveUserInvite(string email, string hash, string clinicId)
        {
            var url = ApiUrl.Default.RootApi + ApiUrl.Default.ChangeStatusUserClinic;

            Restful.Post(url, null, new
            {
                Email    = email,
                HashCode = hash,
                ClinicId = clinicId,
                Status   = 1,
                Type     = "ACTIVE"
            });
        }
Exemplo n.º 15
0
        public IList <UserClinicModel> ListUsers(string clinicId, int start, int lenght, string orderType, string keyword)
        {
            var url  = ApiUrl.Default.RootApi + ApiUrl.Default.ListClinicUser;
            var data = Restful.Post(url, null, new
            {
                ClinicId    = clinicId,
                Start       = start,
                Limit       = lenght,
                OrderByType = orderType,
                OrderByKey  = "DoctorName"
            });

            _total = data["Total"].ToObject <int>();
            return(data.GetList <UserClinicModel>(ApiKeyData.ListDoctor));
        }
Exemplo n.º 16
0
        public void ChangeStatusUser(string email, string clinicId, int otherAccount, long timeCurrent, int status, string statusType)
        {
            var url  = ApiUrl.Default.RootApi + ApiUrl.Default.ChangeStatusUserClinic;
            var data = new
            {
                Email        = email,
                ClinicId     = clinicId,
                OtherAccount = otherAccount,
                TimeCurrent  = timeCurrent,
                Status       = status,
                Type         = statusType
            };

            Restful.Post(url, null, data);
        }
Exemplo n.º 17
0
        public IList <ClinicResult> GetListClinic(string type, string orderByName, string keyWords, int start = 0, int length = int.MaxValue)
        {
            var url  = ApiUrl.Default.RootApi + string.Format(ApiUrl.Default.GetListClinic);
            var data = new
            {
                Type        = type,
                Start       = start,
                Limit       = length,
                OrderByName = string.IsNullOrEmpty(orderByName) ? "" : orderByName.ToUpper(),
                Keywords    = string.IsNullOrEmpty(keyWords) ? "" : keyWords
            };
            var result = Restful.Post(url, null, data);

            _total = result["Total"].ToObject <int>();
            return(result.GetList <ClinicResult>(ApiKeyData.Clinics));
        }
Exemplo n.º 18
0
        public void CancelAppointment(CancelAppoinmentModel model)
        {
            var url = ApiUrl.Default.RootApi + ApiUrl.Default.CancelAppointment;

            Restful.Post(url, null, model);
        }
Exemplo n.º 19
0
        public void UpdateAppointment(CreateUpdateAppointmentModel model)
        {
            var url = ApiUrl.Default.RootApi + ApiUrl.Default.UpdateAppointment;

            Restful.Post(url, null, model);
        }
Exemplo n.º 20
0
        public ClinicResult Update(ClinicModel model)
        {
            var url = ApiUrl.Default.RootApi + string.Format(ApiUrl.Default.UpdateClinic);

            return(Restful.Post(url, null, model).Get <ClinicResult>());
        }
Exemplo n.º 21
0
        public void NotifyClinic(ApiHeader apiHeader, NotifyClinicModel model)
        {
            var url = ApiUrl.Default.RootApi + ApiUrl.Default.NotifyClinic;

            Restful.Post(url, apiHeader, model);
        }
Exemplo n.º 22
0
        public void SignUp(SignUpModel model)
        {
            var url = ApiUrl.Default.RootApi + ApiUrl.Default.SignUp;

            Restful.Post(url, null, model);
        }
Exemplo n.º 23
0
        public void AddOrEditBank(BankModel model)
        {
            var url = ApiUrl.Default.RootApi + ApiUrl.Default.AddOrEditBankAccount;

            Restful.Post(url, null, model);
        }
Exemplo n.º 24
0
        private void CreatePassword(ApiHeader apiHeader, CreateNewPasswordModel model)
        {
            var url = ApiUrl.Default.RootApi + ApiUrl.Default.ChangePassword;

            Restful.Post(url, apiHeader, model);
        }
Exemplo n.º 25
0
        public void SetPassword(ApiHeader apiHeader, string password)
        {
            var url = ApiUrl.Default.RootApi + ApiUrl.Default.SetPasswordForSignUp;

            Restful.Post(url, apiHeader, new { newPassword = password });
        }