// DXTU8Service.ServiceSoap service,string connstr public frmPrint(string connstr,DXTU8Service.ServiceSoap service) { InitializeComponent(); this.skinEngine1.SkinFile = "MP10.ssk"; groupBox3.Text = "预览:半成品/成品标签"; this.service = service; this.connstr = connstr; //测试 //pm = new PrintModel(); //pm.CBarCode = "6945146911202"; //pm.ProcInvCode = "02020701"; //pm.SaleInvCode = "HCCSTD1"; }
/// <summary> /// 构造函数 /// </summary> /// <param name="connstr">连接字符串</param> /// <param name="service">web服务</param> /// <param name="frmP">主窗体对象</param> public FrmSupplement(string connstr,DXTU8Service.ServiceSoap service,frmPrint frmP) { InitializeComponent(); this.service = service; this.connstr = connstr; this.frmP = frmP; XmlNode xn; int rt = service.GetClassTree(out xn,connstr); //U8Common.GetClassTree(out xn); if (rt == 0) { tvClass.Nodes.Clear(); foreach (XmlNode sub1Xml in xn.SelectNodes("First")) { TreeNode tn1 = new TreeNode(); tn1.Name = sub1Xml.Attributes["cInvCCode"].Value; tn1.Text = sub1Xml.Attributes["cInvCName"].Value + "(" + tn1.Name + ")"; foreach (XmlNode sub2Xml in sub1Xml.SelectNodes("Second")) { TreeNode tn2 = new TreeNode(); tn2.Name = sub2Xml.Attributes["cInvCCode"].Value; tn2.Text = sub2Xml.Attributes["cInvCName"].Value + "(" + tn2.Name + ")"; //foreach (XmlNode sub3Xml in sub2Xml.SelectNodes("Third")) //{ // TreeNode tn3 = new TreeNode(); // tn3.Name = sub3Xml.Attributes["cInvCCode"].Value; // tn3.Text = sub3Xml.Attributes["cInvCName"].Value + "(" + tn3.Name + ")"; // tn2.Nodes.Add(tn3); //} tn1.Nodes.Add(tn2); } tvClass.Nodes.Add(tn1); } //TreeNode root = new TreeNode("root"); //Recursive(root, xn, 0); //tvClass.Nodes.Add(root); } else { tvClass.Nodes.Clear(); } }