| | |
| | | i : Integer; |
| | | DocListForm : TDocListForm; |
| | | OldName,NewName,Ext : String; |
| | | NewFormID,NewFormName : String; |
| | | NewFormID,NewFormName,CustomDocNo : String; |
| | | begin |
| | | DocListForm := TDocListForm.Create(self); |
| | | try |
| | | InitialLanguage(PatchDlg); //載入多國語言 |
| | | InitialLanguage(DocListForm); //載入多國語言 |
| | | for i := 1 to FORM_INF_List.Count - 1 do |
| | | begin |
| | | NewFormID := GetSQLData(FORM_INF_List,'T1.FORM_ID',i); |
| | |
| | | end; |
| | | if DocListForm.ShowModal = mrOk then |
| | | begin |
| | | NewFormID := DocListForm.DocLV.Selected.Caption; |
| | | if NowFormCode <> AttName then |
| | | if not (DocListForm.DocLV.Selected=nil) then |
| | | NewFormID := DocListForm.DocLV.Selected.Caption; |
| | | if DocListForm.CheckBox1.Checked then |
| | | begin |
| | | If Messagedlg(Format(_Msg('是否將"%s"的所有影像歸類成"%s"'),[FormCode2FormName(NowCaseNo,NowFormCode),FormCode2FormName(NowCaseNo,NewFormID)]),MtConfirmation,[mbyes,mbcancel],0) = mrcancel Then |
| | | //歸類到自訂文件 |
| | | NewFormID:=DocListForm.Edit1.Text; |
| | | if Trim(DocListForm.Edit1.Text)='' then |
| | | begin |
| | | Showmessage('未輸入文件名稱'); |
| | | Exit; |
| | | end; |
| | | if FindCustomDocName(DisplayPath,NewFormID) then |
| | | begin |
| | | Showmessage(Format('文件名稱:"%s"己存在',[NewFormID])); |
| | | Exit; |
| | | end; |
| | | if NowFormCode <> AttName then |
| | | begin |
| | | If Messagedlg(Format(_Msg('是否將"%s"的所有影像歸類成"%s"'),[FormCode2FormName(NowCaseNo,NowFormCode),NewFormID]),MtConfirmation,[mbyes,mbcancel],0) = mrcancel Then |
| | | Exit; |
| | | end |
| | | Else |
| | | begin |
| | | If Messagedlg(Format(_Msg('是否將"%s"的所有影像歸類成"%s"'),[_Msg('附件')+MyTreeNode3.Text,FormCode2FormName(NowCaseNo,NewFormID)]),MtConfirmation,[mbyes,mbcancel],0) = mrcancel Then |
| | | Exit; |
| | | end; |
| | | CustomDocNo := GetNewCustomDocNo(DisplayPath,NewFormID); |
| | | //ShowMessage('CustomDocNo='+CustomDocNo); |
| | | ShowText := _Msg('歸類中,請稍侯'); |
| | | DataLoading(True,True); |
| | | FormIDReplace(NowCaseNo,NowDocDir,NowFormCode,CustomDocNo+'010101A'); |
| | | end |
| | | Else |
| | | else |
| | | begin |
| | | If Messagedlg(Format(_Msg('是否將"%s"的所有影像歸類成"%s"'),[_Msg('附件')+MyTreeNode3.Text,FormCode2FormName(NowCaseNo,NewFormID)]),MtConfirmation,[mbyes,mbcancel],0) = mrcancel Then |
| | | Exit; |
| | | //歸類到既有文件 |
| | | if NowFormCode <> AttName then |
| | | begin |
| | | If Messagedlg(Format(_Msg('是否將"%s"的所有影像歸類成"%s"'),[FormCode2FormName(NowCaseNo,NowFormCode),FormCode2FormName(NowCaseNo,NewFormID)]),MtConfirmation,[mbyes,mbcancel],0) = mrcancel Then |
| | | Exit; |
| | | end |
| | | Else |
| | | begin |
| | | If Messagedlg(Format(_Msg('是否將"%s"的所有影像歸類成"%s"'),[_Msg('附件')+MyTreeNode3.Text,FormCode2FormName(NowCaseNo,NewFormID)]),MtConfirmation,[mbyes,mbcancel],0) = mrcancel Then |
| | | Exit; |
| | | end; |
| | | ShowText := _Msg('歸類中,請稍侯'); |
| | | DataLoading(True,True); |
| | | |
| | | FormIDReplace(NowCaseNo,NowDocDir,NowFormCode,NewFormID); |
| | | |
| | | end; |
| | | ShowText := _Msg('歸類中,請稍侯'); |
| | | DataLoading(True,True); |
| | | //FormIDReplace(DisplayPath,NowFormCode,FormID); |
| | | //ShowFileReplace(DisplayPath,FormID); |
| | | FormIDReplace(NowCaseNo,NowDocDir,NowFormCode,NewFormID); |
| | | ClearErrini(NowCaseno,MyTreeNode1); //清掉檢核記錄 |
| | | DrawDocItem2(MytreeNode1,NowCaseno); |
| | | //DrawDocItem(MytreeNode1,FORM_INF_List,NowCaseno); |
| | | |
| | | DataLoading(False,False); |
| | | TreeView1.Selected := MyTreeNode1; |
| | | TreeView1Click(self); |
| | | end; |
| | | |
| | | finally |
| | | DocListForm.Free; |
| | | end; |
| | |
| | | CustomDocNo : String; |
| | | DocDir : String; |
| | | SavePath : String; |
| | | ST1:TStringList; |
| | | begin |
| | | if InputQuery('輸入其他文件名稱','文件名稱',CustomDocName) then |
| | | begin |
| | |
| | | Showmessage(Format('文件名稱:"%s"己存在',[CustomDocName])); |
| | | Exit; |
| | | end; |
| | | |
| | | ST1:=TStringList.Create; |
| | | CustomDocNo := GetNewCustomDocNo(DisplayPath,CustomDocName); |
| | | DocDir := CustomDocNo; |
| | | SavePath := ImageSavePath+NowCaseNo+'\'+DocDir+'\'; |