vb

Time:09-23

 Private Sub DataGrid1_Click () 

End Sub

Private Sub Form_Load ()
Dim As Integer I
'load level category
Combospecialty. AddItem "all"
MyClass. Load_by_Upper (0)
I=0
The Do While Arr_ClassName (I) & lt;> "
"Combospecialty. AddItem Arr_ClassName (I)
I=I + 1
Loop
Combospecialty. ListIndex=0
'don't show the secondary category
Comboclass. Visible=False
Combofour. ListIndex=0

End Sub
Private Sub Refresh_culture ()
Dim TmpSource As String
TmpSource="SELECT S.S tudent_Id as student number, S.S tudent_Name as name, S.B adgeID as student id," _
+ "C1 Class_Name as professional name, C2. Class_Name as the class name, the convert (char, F.S tudent_Grade) as the school year, F.y earinput as annual," _
+ "f. et_Four as 4 grades, f. et_Six as six levels of performance, the cash-strapped ationPC_Two as the national computer level 2," _
+ "motor ationPC_Three as national computer level 3 grades, motor ationPC_Four as national computer level 4 grades, F.J sPC_Two as jiangsu computer secondary achievement," _
+ "F.J sPC_Three as jiangsu computer level 3 grades, F.B asicjudge_Type as basic quality assessment types, F.B asicjudge_Score as basic quality measurement points, F.g row_score points as the development of quality," _
+ "f. ulture_Memo as culture note" _
+ "FROM Students S, Classes C1, Classes C2, Student_four F" _
+ "WHERE S.C lass_Id=C2. Class_Id And S.s tudent_ID=f.s tudent_ID And C2. UpperId=C1. Class_Id And S.s tudent_ID=f.s tudent_ID"
If Combospecialty. ListIndex & lt;> 0 Then
If Comboclass. ListIndex=0 Then
TmpSource=TmpSource + "and C1. Class_name='" + Trim (Combospecialty. Text) +"' "
The Else
TmpSource=TmpSource + "and C1. Class_name='" + Trim (Combospecialty. Text) _
+ "' and C2. Class_name='" + Trim (Comboclass. Text) +"' "
End the If
End the If

TmpSource=TmpSource + "and cast (F.S tudent_Grade as char)='" + Trim (Combofour. Text) +"' "
TmpSource=TmpSource + "order by s.s tudent_ID asc"
Adodc1. RecordSource=TmpSource
Adodc1. Refresh
DataGrid1. Refresh

If Adodc1. You. EOF=True Then
MsgBox "no data available for export!"
Command1. Enabled=False
The Else
Command1. Enabled=True
End the If


End Sub

The vb code into c # code

CodePudding user response:

Don't be A language code is modified to B language code busywork,
Also don't use A language code to directly invoke B language code base, this complicated things so easy to get wrong,
Just make A, B language code of input and output is redirected to A text file, or modify A, B language code let it through text file input and output,
Can easily make A, B coordination between the two languages,
For example:
A will request data written to A file a.t xt, renamed after finish aa. TXT
B find aa. TXT, read its contents, call the corresponding function, and writes the results file b.t xt, after finish delete aa. TXT, changed its name to bb. TXT
Found A bb. TXT, read the content, after finish delete bb. TXT
Above can be replaced by any kind of A language or development environment, B can be replaced by any kind of with the development of A different language or development environment,
Unless A or B does not support to determine whether A file exists, file read and write and file name,
But who can name does not support to determine whether a file exists, file read and write and file name for the development of language or development environment?
Can put the temporary files on the RamDisk efficiency decrease wear disk,
Data structure is very complex, a text file format problems refer to a json or XML

The communication methods between the temporary text file sharing this process there are plenty of advantages, compared to other method only listed below I can think of now:
Loose coupling between process,
Can be on the same machine, process, also can cross machine, across the operating system, hardware platform, and even multinational,
, convenient debugging, and monitoring, only let the third party or artificial view the temporary text files,
Switch, convenient online service, need to delete or create the temporary text files,
, is convenient to realize distributed and load balancing,
Services to provide convenient, queue, queue is full and it is almost impossible to happen (unless the hard disk space full)
DE...

"Across different languages, machine, across the operating system, hardware platform, multinational, cross *. *" misery,
Back is "the use of Shared a plain text file information communication" of the shore!