public async Task RemoveThisRecord(bool NeedDelete)
        {
            if (NeedDelete == true)
            {
                var verifyRecordResult = await CurrentService.DeleteAsync(CurrentNeedDeleteRecord.Id);

                await TranscationResultHelper.CheckDatabaseResult(MessageBox, verifyRecordResult);

                dataGrid.RefreshGrid();
            }
            ConfirmMessageBox.Hidden();
        }
        public async Task OnCommandClicked(CommandClickEventArgs <MenuRoleAdapterModel> args)
        {
            MenuRoleAdapterModel item = args.RowData as MenuRoleAdapterModel;

            if (args.CommandColumn.ButtonOption.IconCss == ButtonIdHelper.ButtonIdEdit)
            {
                #region 點選 修改紀錄 按鈕
                CurrentRecord         = item.Clone();
                EditRecordDialogTitle = "修改紀錄";
                IsShowEditRecord      = true;
                isNewRecordMode       = false;
                #endregion
            }
            else if (args.CommandColumn.ButtonOption.IconCss == ButtonIdHelper.ButtonIdDelete)
            {
                #region 點選 刪除紀錄 按鈕
                CurrentNeedDeleteRecord = item;

                #region 檢查關聯資料是否存在
                var checkedResult = await CurrentService
                                    .BeforeDeleteCheckAsync(CurrentNeedDeleteRecord);

                await Task.Delay(100);

                if (checkedResult.Success == false)
                {
                    MessageBox.Show("400px", "200px", "警告",
                                    ErrorMessageMappingHelper.Instance.GetErrorMessage(checkedResult.MessageId),
                                    MessageBox.HiddenAsync);
                    await Task.Yield();

                    await thisView.NeedRefreshAsync();

                    return;
                }
                #endregion

                #region 刪除這筆紀錄
                await Task.Yield();

                var checkTask = ConfirmMessageBox.ShowAsync("400px", "200px", "警告",
                                                            "確認要刪除這筆紀錄嗎?", ConfirmMessageBox.HiddenAsync);
                await thisView.NeedRefreshAsync();

                var checkAgain = await checkTask;
                if (checkAgain == true)
                {
                    var verifyRecordResult = await CurrentService.DeleteAsync(CurrentNeedDeleteRecord.Id);

                    await TranscationResultHelper.CheckDatabaseResult(MessageBox, verifyRecordResult);

                    dataGrid.RefreshGrid();
                }
                #endregion
                #endregion
            }
            else if (args.CommandColumn.ButtonOption.IconCss == ButtonIdHelper.ButtonIdShowDetailOfMaster)
            {
                #region 點選 開啟多筆 CRUD 對話窗 按鈕
                IsShowMoreDetailsRecord          = true;
                ShowMoreDetailsRecordDialogTitle = "單明細管理功能名稱";
                MasterRecord masterRecord = new MasterRecord()
                {
                    Id = item.Id
                };
                Header = masterRecord;
                if (ShowMoreDetailsGrid != null)
                {
                    await Task.Delay(100); // 使用延遲,讓 Header 的資料綁定可以成功

                    ShowMoreDetailsGrid.RefreshGrid();
                }
                #endregion
            }
        }