Exemple #1
0
        private async void SetReadStatus(NoticeReadStatusDto readStatusDto)
        {
            if (_commonHelper.IsNetWorkConnected() == true)
            {
                try
                {
                    var result = await _notifiMngService.UpdateReaderReadStatus(readStatusDto);

                    if (result.ResultCode == Module.ResultType.Success)
                    {
                        _commonFun.HideLoading();
                        MessagingCenter.Send <string>("", MessageConst.NOTIFI_SAVEREFRESH_GO);
                    }
                    else
                    {
                        _commonFun.HideLoading();
                        _commonFun.AlertLongText("保存失败,请重试。 " + result.Msg);
                    }
                }
                catch (OperationCanceledException)
                {
                    _commonFun.HideLoading();
                    _commonFun.AlertLongText("请求超时。");
                }
                catch (Exception)
                {
                    _commonFun.HideLoading();
                    _commonFun.AlertLongText("保存异常,请重试。");
                }
                finally
                {
                    _commonFun.HideLoading();
                }
            }
            else
            {
                _commonFun.AlertLongText("网络连接异常。");
            }
        }
 public async Task <APIResult> UpdateReaderReadStatus([FromBody] NoticeReadStatusDto paramDto)
 {
     return(await _notifiMngService.UpdateReaderReadStatus(paramDto));
 }