private async void Gv_Borrows_FocusedRowChanged(object sender,
                                                        DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
        {
            try
            {
                if (Gv_Borrows.FocusedRowHandle < 0)
                {
                    return;
                }
                var isExpired = Convert.ToBoolean(Gv_Borrows.GetFocusedRowCellValue("IsExpired"));
                Sb_PayFine.Enabled = isExpired;
                var id   = Guid.Parse(Gv_Borrows.GetFocusedRowCellValue("BookId").ToString());
                var book = await _bookApi.GetBook(id);

                book.Photo               = Image.FromFile(book.BookPhoto);
                Pe_Photo.Image           = book.Photo;
                Te_BookId.EditValue      = book.Id;
                Te_BookName.Text         = book.BookName;
                Te_Author.Text           = book.Author;
                Te_PublishingHouse.Text  = book.PublishingName;
                Te_Category.Text         = book.CategoryName;
                Te_Price.EditValue       = book.Price;
                Te_ISBN.Text             = book.ISBN;
                Te_ReleaseTime.EditValue = book.ReleaseDate;
            }
            catch (Exception exception)
            {
                PopupProvider.Error("获取借阅书籍信息异常!", exception);
            }
        }
        private async Task FinePayment()
        {
            try
            {
                var borrowId = Guid.Parse(Gv_Borrows.GetFocusedRowCellValue("Id").ToString());
                var penalty  = Convert.ToDouble(Gv_Borrows.GetFocusedRowCellValue("Fine"));
                var result   = await _finePaymentApi.CreateFinePayment(new FinePayment
                {
                    BorrowId = borrowId,
                    Fine     = penalty,
                    IsPay    = true,
                    PayType  = "移动支付",
                    AdminId  = GlobalCache.Admin.Id
                });

                if (result.ResultCode != 1)
                {
                    PopupProvider.Warning(result.ResultMessage);
                    return;
                }

                PopupProvider.Success(result.ResultMessage);
            }
            catch (Exception e)
            {
                PopupProvider.Error("新增罚款登记单异常!!", e);
            }
        }
        private async void Ribe_Return_ButtonClick(object sender, ButtonPressedEventArgs e)
        {
            try
            {
                if (!Gv_Borrows.GetFocusedRowCellDisplayText("ReturnState").Equals("未归还"))
                {
                    PopupProvider.Warning("该书已归还!");
                    return;
                }

                var dialogResult = XtraMessageBox.Show("确认归还?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (dialogResult != DialogResult.Yes)
                {
                    return;
                }
                _handle = OverlayScreenForm.ShowProgressPanel(this);
                var id     = Gv_Borrows.GetFocusedRowCellDisplayText("Id");
                var result = await _borrowApi.ReturnBook(id);

                OverlayScreenForm.CloseProgressPanel(_handle);
                if (result.ResultCode != 1)
                {
                    PopupProvider.Warning(result.ResultMessage);
                }

                PopupProvider.Success(result.ResultMessage);

                await BindData();
            }
            catch (Exception exception)
            {
                OverlayScreenForm.CloseProgressPanel(_handle);
                PopupProvider.Error(exception.Message, exception);
            }
        }