global type f_get_part_info from function_object
end type
forward prototypes
global function string f_get_part_info (string as_part)
end prototypes
global function string f_get_part_info (string as_part);
if gf_connect()<1 then return 'ERROR-连接数据库错误'
datastore lds_tmp
integer li_ret
string ls_xml ,ls_xml2json,ls_tmp
lds_tmp=create datastore
lds_tmp.dataobject='d_part_find'
lds_tmp.settransobject(sqlca)
li_ret=lds_tmp.retrieve(as_part)
if li_ret>0 then
ls_xml=lds_tmp.Object.DataWindow.Data.XML
#IF Defined PBDOTNET Then
//XMl TO JSON
System.Xml.XmlDocument xmldoc
xmldoc=create System.Xml.XmlDocument
xmldoc.LoadXml(ls_xml)
ls_xml2json=Newtonsoft.Json.JsonConvert.SerializeObject(xmldoc)
//JSON TO XML
ls_tmp = Newtonsoft.Json.JsonConvert.DeserializeXNode(ls_xml2json).ToString();
#END IF
end if
gf_disconnect()
return ls_xml2json+"@@@@@@" +ls_tmp+"%%%%%%%"+ls_xml
end function