- Private Sub Fg_StartEdit(sender As Object, e As RowColEventArgs) Handles Fg.StartEdit
- If e.Col = 2 Then
- Fg_Kmbm.SetBounds(Fg.Cols(e.Col).Left, Fg.Rows(e.Row + 1).Top, Fg.Cols(e.Col).Width, Fg_Kmbm.Height)
- Fg_Kmbm_Resh()
- Fg_Kmbm.Visible = True
- Else
- Fg_Kmbm.Visible = False
- End If
- End Sub
- Private Sub Fg_ChangeEdit(sender As Object, e As EventArgs) Handles Fg.ChangeEdit
- If Fg.Col = 2 Then
- Dim lsCls_Subject As New DB_Read.ClsBasic_Setting_Subject_Beginning
- Dim lsTb_Subject As DataTable = lsCls_Subject.Get_Subject(mySqlConn, " where (kmbm like '%" & Fg.GetData(Fg.Row, Fg.Col).ToString.Trim & "%' or zjm like '%" & Fg.GetData(Fg.Row, Fg.Col).ToString.Trim & "%') and ynxj = 0 ", pYear)
- Dim lsErr_Subject As String = lsCls_Subject.Err
- If lsErr_Subject.Trim.Length = 0 Then
- If lsTb_Subject.Rows.Count > 0 Then
- For i = 0 To lsTb_Subject.Rows.Count - 1
- Fg_Kmbm.AddItem("")
- Fg_Kmbm.SetData(Fg_Kmbm.Rows.Count - 1, 0, lsTb_Subject.Rows(i)("kmbm").ToString.Trim)
- Fg_Kmbm.SetData(Fg_Kmbm.Rows.Count - 1, 1, lsTb_Subject.Rows(i)("kmmc").ToString.Trim)
- Fg_Kmbm.SetData(Fg_Kmbm.Rows.Count - 1, 2, IIf(lsTb_Subject.Rows(i)("yefx").ToString = "j", "借", "贷").ToString)
- Next 'i
- End If
- Else
- MessageBox.Show("加载编码故障(" & lsErr_Subject & ")", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error)
- End If
- End If
- End Sub
复制代码
Fg和Fg_Kmbm 都是C1flexgrid控件,在Fg控件中输入一个编码字符时,Fg_Kmbm会列出所有包含这个字符的编码,名称等 |