コード例 #1
0
        private async void GetInboxList(int emailTypeId)
        {
            try
            {
                List <EmailResponse> responseList = null;
                if (CrossConnectivity.Current.IsConnected)
                {
                    CustomProgressDialog.ShowProgDialog(mActivity, mActivity.Resources.GetString(Resource.String.loading));

                    responseList = await WebServiceMethods.InboxEmails(
                        mSharedPreferencesManager.GetString(ConstantsDroid.USER_ID_PREFERENCE, ""), emailTypeId);

                    SetInboxList(responseList);

                    CustomProgressDialog.HideProgressDialog();
                }
                else
                {
                    UtilityDroid.GetInstance().ShowAlertDialog(mActivity, Resources.GetString(Resource.String.error_alert_title),
                                                               Resources.GetString(Resource.String.alert_message_no_network_connection),
                                                               Resources.GetString(Resource.String.alert_cancel_btn), Resources.GetString(Resource.String.alert_ok_btn));
                }

                refresher.Refreshing = false;
            }
            catch (Exception ex)
            {
                CustomProgressDialog.HideProgressDialog();
                UtilityDroid.GetInstance().ShowAlertDialog(mActivity, Resources.GetString(Resource.String.error_alert_title),
                                                           Resources.GetString(Resource.String.alert_message_error),
                                                           Resources.GetString(Resource.String.alert_cancel_btn), Resources.GetString(Resource.String.alert_ok_btn));
            }
        }
コード例 #2
0
        async void GetData()
        {
            if (IosUtils.IosUtility.IsReachable())
            {
                IosUtils.IosUtility.showProgressHud("");
                var res = await WebServiceMethods.InboxEmails(IosUtils.Settings.UserId, mailTypeId);

                if (res != null)
                {
                    mails = res;
                }
                else
                {
                }
                IBContntTbl.ReloadData();
                IosUtils.IosUtility.hideProgressHud();
            }
        }