on 07-01-2008 6:33 PM
Hi all,
How load a form created in screen printer in language c# ?
Exemple:
I use this function to load a form in SAP business one with language VB:
Private Sub LoadForm()
Dim oxmldoc As New Xml.XmlDocument
oxmldoc.Load("Form Name.srf")
SBO_Application.LoadBatchActions(oxmldoc.InnerXml)
oForm = SBO_Application.Forms.Item("FormID")
oForm.Visible = True
End Sub
But, in C# this code not is valid.
Im need a code valid in C#.
Somebody could help?
Welcome Fabio
i use this c# procedure to load a XML:
private static void LoadFromXML(string FileName)
{
System.Xml.XmlDocument oXmlDoc = null;
try
{
oXmlDoc = new System.Xml.XmlDocument();
// load the content of the XML File
string sPath = null;
sPath = System.IO.Directory.GetParent(Application.ExecutablePath).ToString();
oXmlDoc.Load(sPath + "\\" + FileName);
// load the form to the SBO application in one batch
string sXML = oXmlDoc.InnerXml.ToString();
globals.SBO_Application.LoadBatchActions(ref sXML);
}
catch (Exception er)
{
}
finally
{
oXmlDoc = null;
GC.Collect();
}
}
lg David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.