public async Task ClearBadgeForApp(string id, string type)
 {
     try
     {
         var endPoint = String.Format(AppBadgeClear, id, type);
         var result   = await HttpClientBase.Get <AppBadgeClearResponse>(endPoint);
     }
     catch (Exception ex)
     {
         Acr.UserDialogs.UserDialogs.Instance.Alert(ex.Message.ToString());
     }
 }
 public async Task LogoutTokenFromApp(string id, string type)
 {
     try
     {
         var endPoint = String.Format(AppLogout, id, type);
         var result   = await HttpClientBase.Get <LogoutResponse>(endPoint);
     }
     catch (Exception ex)
     {
         Acr.UserDialogs.UserDialogs.Instance.Alert(ex.Message.ToString());
     }
 }
Example #3
0
        public async Task <FileModel> DownloadFileBytes(string endPoint)
        {
            try
            {
                FileModel result = await HttpClientBase.Get <FileModel>(endPoint);

                return(result);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
        public async Task <ProfilePicResponseModel> Download(string endPoint)
        {
            try
            {
                ProfilePicResponseModel result = await HttpClientBase.Get <ProfilePicResponseModel>(endPoint);

                return(result);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
Example #5
0
        public async Task <byte[]> Download(string endPoint)
        {
            try
            {
                var result = await HttpClientBase.GetStream(endPoint);

                return(result);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
        public async Task <AppLatestVersionResponseModel> CheckAppVersion(string platform, string version)
        {
            try
            {
                var endPoint = String.Format(AppVersion, platform, version);
                var result   = await HttpClientBase.Get <AppLatestVersionResponseModel>(endPoint);

                return(result);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
Example #7
0
        public async Task <AppSettings> GetAppSettingsKey(string key)
        {
            try
            {
                var endPoint = String.Format(AppSettingsKey, key);
                var result   = await HttpClientBase.Get <AppSettings>(endPoint);

                return(result);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
        public async Task <BaseModel> UpdateRating(string role, string userId, string rating)
        {
            try
            {
                var endPoint = String.Format(UpdateAppRatingKey, role, userId, rating);
                var result   = await HttpClientBase.Get <BaseModel>(endPoint);

                return(result);
            }
            catch (Exception ex)
            {
                return(new UserProfileModel()
                {
                    Message = ex.Message
                });
            }
        }
        public async Task <BaseModel> UpdateProfile(string role, string userId, string name, string email, string phoneNumber, string password, bool receiveNotification)
        {
            try
            {
                var endPoint = String.Format(UpdateProfileKey, role, userId, name, email, phoneNumber, password, receiveNotification);
                var result   = await HttpClientBase.Get <BaseModel>(endPoint);

                return(result);
            }
            catch (Exception ex)
            {
                return(new UserProfileModel()
                {
                    Message = ex.Message
                });
            }
        }
        public async Task <UserProfileModel> Login(string userInfo, string password)
        {
            try
            {
                var endPoint = String.Format(LoginKey, userInfo, password);
                var result   = await HttpClientBase.Get <UserProfileModel>(endPoint);

                return(result);
            }
            catch (Exception ex)
            {
                return(new UserProfileModel()
                {
                    Message = ex.Message
                });
            }
        }
Example #11
0
        public async Task <ReportsApiModel> SetSeenReports(string role, string branch, string year, string refrence, string isViewed)
        {
            try
            {
                var endPoint = String.Format(SetSeenReportsKey, role, branch, year, refrence, isViewed);
                var result   = await HttpClientBase.Get <ReportsApiModel>(endPoint);

                return(result);
            }
            catch (Exception ex)
            {
                return(new ReportsApiModel()
                {
                    Message = ex.Message
                });
            }
        }
Example #12
0
        public async Task <ReportCountApiModel> GetLabReportsCount(string role, string id)
        {
            try
            {
                var endPoint = String.Format(GetLabReportsCountKey, role, id);
                var result   = await HttpClientBase.Get <ReportCountApiModel>(endPoint);

                return(result);
            }
            catch (Exception ex)
            {
                return(new ReportCountApiModel()
                {
                    Message = ex.Message
                });
            }
        }
        public async Task <BaseModel> InsertFirebaseToken(string labId, string type, string token, bool isAndroid, string dateUpdated)
        {
            try
            {
                var endPoint = String.Format(InsertFirebaseTokenKey, labId, type, token, isAndroid, dateUpdated);
                var result   = await HttpClientBase.Get <BaseModel>(endPoint);

                return(result);
            }
            catch (Exception ex)
            {
                return(new BaseModel()
                {
                    Message = ex.Message
                });
            }
        }
Example #14
0
        public async Task <ReportsApiModel> GetLabReports(string role, string id, string labType, int pageNumber)
        {
            try
            {
                var endPoint = String.Format(GetReportsKey, role, id, labType, pageNumber);
                var result   = await HttpClientBase.Get <ReportsApiModel>(endPoint);

                return(result);
            }
            catch (Exception ex)
            {
                return(new ReportsApiModel()
                {
                    Message = ex.Message
                });
            }
        }
Example #15
0
        public async Task <AttachmentApiModel> GetAttachmentsList(string name)
        {
            try
            {
                var endPoint = String.Format(GetAttachmentsListKey, name);
                var result   = await HttpClientBase.Get <AttachmentApiModel>(endPoint);

                return(result);
            }
            catch (Exception ex)
            {
                return(new AttachmentApiModel()
                {
                    Message = ex.Message
                });
            }
        }
        public async Task <NewsApiModel> GetAllNews()
        {
            try
            {
                var endPoint = String.Format(GetAllNewsKey);
                var result   = await HttpClientBase.Get <NewsApiModel>(endPoint);

                return(result);
            }
            catch (Exception ex)
            {
                return(new NewsApiModel()
                {
                    Message = ex.Message
                });
            }
        }
Example #17
0
        public async Task <ReportsApiModel> GetAllLabReports(string role, string id, string labType, DateTime startDate, DateTime endDate)
        {
            try
            {
                var endPoint = String.Format(GetAllReportsKey, role,
                                             id,
                                             labType,
                                             startDate.ToString("yyyy-MM-ddTHH:mm:ss"),
                                             endDate.ToString("yyyy-MM-ddTHH:mm:ss"));
                var result = await HttpClientBase.Get <ReportsApiModel>(endPoint);

                return(result);
            }
            catch (Exception ex)
            {
                return(new ReportsApiModel()
                {
                    Message = ex.Message
                });
            }
        }
        public async Task <ProfilePicResponseModel> PostFileUpload(string name, byte[] byteArr)
        {
            try
            {
                var             endPoint = String.Format(PostFileUploadKey);
                ProfilePicModel obj      = new ProfilePicModel
                {
                    LabId     = $"{name}",
                    ImageData = (byteArr)
                };
                var result = await HttpClientBase.Post <ProfilePicResponseModel>(endPoint, JsonConvert.SerializeObject(obj));

                return(result);
            }
            catch (Exception ex)
            {
                return(new ProfilePicResponseModel()
                {
                    Message = ex.Message
                });
            }
        }