public void SyncTimeTableData(int userID, int UserType)
        {
            string servicestring = string.Empty; ///1. faculty

            ///shrink student attendance on server
            //check server ip and port
            if (!string.IsNullOrEmpty(ServiceAPIInfo.serviceAPI))
            {
                servicestring = ServiceAPIInfo.serviceAPI;

                GeneralMethod.syncTimeTable(userID, (enumUserType)UserType).ConfigureAwait(false);
            }
            //
        }
        public async void OnStudentdataClick()
        {
            try
            {
                var id       = CrossSettings.Current.GetValueOrDefault("FacultyId", 0);
                var userType = CrossSettings.Current.GetValueOrDefault("UserType", 0);
                UserDialogs.Instance.ShowLoading("Downloading.....");
                await Task.Delay(100);

                var status = generalMethod.GetMetadataService('S');
                UserDialogs.Instance.HideLoading();
                if (status == true)
                {
                    GeneralMethod.syncTimeTable(id, (enumUserType)userType, false).ConfigureAwait(false);
                    UserDialogs.Instance.Toast("Successful Download Student Data !");
                    CrossSettings.Current.AddOrUpdateValue("StatusStudentData", true);
                    StatusStudent = true;
                }
                else
                {
                    UserDialogs.Instance.Toast("Fail Download Student Data !");
                    CrossSettings.Current.AddOrUpdateValue("StatusStudentData", false);
                    StatusStudent = false;
                }
            }
            catch (Exception ex)
            {
                UserDialogs.Instance.HideLoading();
                Console.WriteLine(ex.Message);
                UserDialogs.Instance.Toast(ex.Message);
            }
            finally
            {
                UserDialogs.Instance.HideLoading();
            }
        }