'//**定义连接SQL Server Database的通用函数**//
'//本函数创建一个到指定数据库的连接对象 SqlConnection
'//本函数有1个参数,IPublicApplication 为公共数据结构 PublicApplicationVal,
'//Begin define Function IParseDeptOrgid
Public Function IParseDeptOrgid(ByVal IDeptOrgid As String) As PublicOrganIDStructure
Dim OrganID As New PublicOrganIDStructure()
Dim Orgid As String
IDeptOrgid = Trim(IDeptOrgid)
Orgid = Microsoft.VisualBasic.Left(Trim(IDeptOrgid), 12)
OrganID.DeptTopID = Microsoft.VisualBasic.Left(Orgid, 6)
OrganID.DeptMidId = Microsoft.VisualBasic.Right(Orgid, 6)
OrganID.DeptLowId = Microsoft.VisualBasic.Right(IDeptOrgid, 6)
IParseDeptOrgid = OrganID
End Function
'//End define Function IParseDeptOrgid
End Class
End Namespace
'*******************************************************************************