ow
This commit is contained in:
1 parent
30c22a3d0c
commit
0c79fb3519
11 files changed
+296
-40
No files matched your search
@@ -260,21 +260,21 @@ namespace CloudBuilder.AI.Gui
|
||||
guiOperateHelper.EnableControls(false, contentPanel);
|
||||
//查詢有記錄時,修改等控件有效
|
||||
if (aiBookEntity != null)
|
||||
guiOperateHelper.EnableControls(true, bottomPanel, uploadBut, processBut, gridViewPagination);
|
||||
guiOperateHelper.EnableControls(true, bottomPanel, processPanel,gridViewPagination);
|
||||
else
|
||||
guiOperateHelper.EnableControls(false, bottomPanel, uploadBut, processBut, gridViewPagination);
|
||||
guiOperateHelper.EnableControls(false, bottomPanel, processPanel, gridViewPagination);
|
||||
}
|
||||
else if (this.DisplayMode == GuiDisplayMode.Amend || this.DisplayMode == GuiDisplayMode.Create)
|
||||
{
|
||||
savePanel.Visible = true;
|
||||
operationPanel.Visible = false;
|
||||
|
||||
guiOperateHelper.EnableControls(false, topPanel, uploadBut, processBut, gridViewPagination);
|
||||
guiOperateHelper.EnableControls(false, topPanel, processPanel, gridViewPagination);
|
||||
guiOperateHelper.EnableControls(true, bottomPanel, contentPanel);
|
||||
|
||||
if (this.DisplayMode == GuiDisplayMode.Amend) guiOperateHelper.EnableControls(false, guidTxt);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void PackUIToEntity()
|
||||
@@ -347,6 +347,7 @@ namespace CloudBuilder.AI.Gui
|
||||
filter.Value = data.AiBook.Guid;
|
||||
filters.Add(filter);
|
||||
|
||||
searchCriteria.Filter = filters.ToArray();
|
||||
|
||||
return searchCriteria;
|
||||
}
|
||||
@@ -413,7 +414,7 @@ namespace CloudBuilder.AI.Gui
|
||||
|
||||
filePathTxt.Text = data.FileName;
|
||||
|
||||
SearchChapter();
|
||||
SearchChapter();
|
||||
}
|
||||
|
||||
private void Reset()
|
||||
@@ -743,7 +744,39 @@ namespace CloudBuilder.AI.Gui
|
||||
|
||||
AiChapterEntity chapter = dataGv.GetRowData<AiChapterEntity>(dataGv.SelectedCells[0].RowIndex);
|
||||
|
||||
AiSentenceViewEntity[] aiSentences= aiSentenceRequest.FindByChapterGuid(chapter.Guid);
|
||||
AiSentenceViewEntity[] aiSentences = aiSentenceRequest.FindByChapterGuid(chapter.Guid);
|
||||
|
||||
sentenceGv.SetDataSource(aiSentences);
|
||||
}
|
||||
catch (ValidatedException ex)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(ex.Message);
|
||||
}
|
||||
catch (ServiceErrorException ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void extractNamesBut_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (dataGv.RowCount <= 0 || dataGv.SelectedCells.Count <= 0)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(securityMessagePolicy.ComposeMessage(SecurityMessagePolicy.GUI_WS_RECORD_NOT_FOUND));
|
||||
return;
|
||||
}
|
||||
|
||||
AiChapterEntity chapter = dataGv.GetRowData<AiChapterEntity>(dataGv.SelectedCells[0].RowIndex);
|
||||
|
||||
aiBookRequest.ExtractNamesByChapterGuid(data.AiBook.Guid, chapter.Guid);
|
||||
|
||||
AiSentenceViewEntity[] aiSentences = aiSentenceRequest.FindByChapterGuid(chapter.Guid);
|
||||
|
||||
sentenceGv.SetDataSource(aiSentences);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user