| | |
| | | |
| | | int OnHtml() |
| | | { |
| | | string s1="<catalog>"+ |
| | | string s1=L"<catalog>"+ |
| | | " <book id='bk101'>"+ |
| | | " <author>Gambardella, Matthew</author>"+ |
| | | " <title>XML Developer's Guide</title>"+ |
| | |
| | | " <genre>Fantasy</genre>"+ |
| | | " <price>5.95</price>"+ |
| | | " <publish_date>2000-12-16</publish_date>"+ |
| | | " <description>A former architect battles corporate zombies, "+ |
| | | " <description>A former architect battles corporate zombies, L"+ |
| | | " an evil sorceress, and her own childhood to become queen "+ |
| | | " of the world.</description>"+ |
| | | " </book>"+ |
| | |
| | | x.LoadXml(s1); |
| | | //trace(x.GetXml()); |
| | | |
| | | //string s2="<?xml version='1.0'?>"+ |
| | | //string s2=L"<?xml version='1.0'?>"+ |
| | | string s2= |
| | | "<xsl:stylesheet version='1.0'"+ |
| | | " xmlns:xsl='http://www.w3.org/1999/XSL/Transform' >"+ |
| | |
| | | int OnRetrieve() |
| | | { |
| | | string username = publiccode::GetUser().name; |
| | | if(username != "admin" && m_Dir != username ) |
| | | if(username != L"admin" && m_Dir != username ) |
| | | { |
| | | bupdate = false; |
| | | }else |
| | |
| | | x.setNativePointer(xml::CreateInstance()); |
| | | xaserverarg arg = new xaserverarg; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | arg.AddArg("Entity",m_EntityName); |
| | | arg.AddArg("Dir",m_Dir); |
| | | arg.AddArg(L"Entity",m_EntityName); |
| | | arg.AddArg(L"Dir",m_Dir); |
| | | dw_list.Reset(); |
| | | if (url::get("/sale/data/SysPrintTemplate/listDialog",arg.GetString(),x) != 1) |
| | | if (url::get(L"/sale/data/SysPrintTemplate/listDialog",arg.GetString(),x) != 1) |
| | | { |
| | | trace(x.GetXmlDoc().text); |
| | | return -1; |
| | |
| | | |
| | | int OnNewTempl() |
| | | { |
| | | OpenWindow("dev:xpage[Maint.Template.Print.vx]"); |
| | | OpenWindow(L"dev:xpage[Maint.Template.Print.vx]"); |
| | | return 1; |
| | | } |
| | | |
| | |
| | | int row = dw_list.GetRow(); |
| | | if(row<0 || row>dw_list.GetRowCount()) |
| | | { |
| | | alert("请选择要维护的模板!"); |
| | | alert(L"请选择要维护的模板!"); |
| | | return 1; |
| | | } |
| | | else |
| | | { |
| | | msxml::IXMLDOMElement ele = dw_list.GetRowElement(row); |
| | | string sguid = ele.selectSingleNode("ID").text; |
| | | string sTemplName = ele.selectSingleNode("TemplName").text; |
| | | //string sFile = m_filePath + sguid+".xsl"; |
| | | string sFile = m_filePath + ele.selectSingleNode("urlPath").text; |
| | | arg_param.AddArg("xsl",sFile); |
| | | arg_param.AddArg("return","cancel"); |
| | | string sguid = ele.selectSingleNode(L"ID").text; |
| | | string sTemplName = ele.selectSingleNode(L"TemplName").text; |
| | | //string sFile = m_filePath + sguid+L".xsl"; |
| | | string sFile = m_filePath + ele.selectSingleNode(L"urlPath").text; |
| | | arg_param.AddArg(L"xsl",sFile); |
| | | arg_param.AddArg(L"return",L"cancel"); |
| | | |
| | | OpenWindow("dev:xpage[Maint.Template.Print.vx]",cast(arg_param.GetString() as int)); |
| | | OpenWindow(L"dev:xpage[Maint.Template.Print.vx]",cast(arg_param.GetString() as int)); |
| | | CloseWindow(); |
| | | |
| | | } |
| | |
| | | } |
| | | int OnAddTempl() |
| | | { |
| | | if (m_Dir=="") |
| | | if (m_Dir==L"") |
| | | { |
| | | alert("请选择模板目录!"); |
| | | alert(L"请选择模板目录!"); |
| | | return 0; |
| | | } |
| | | string sguid = publiccode::GetGuid(); |
| | | string sname= sguid +".xsl"; |
| | | string suri= "rpttemplate"+"\\"+m_EntityName; //rpttemplate\SO |
| | | //suri = "supplier00"; |
| | | string ret = xaserver::UploadFile(suri, sname, this.GetHWND(),"",false); |
| | | if (ret == "-1") |
| | | string sname= sguid +L".xsl"; |
| | | string suri= L"rpttemplate"+L"\\"+m_EntityName; //rpttemplate\SO |
| | | //suri = L"supplier00"; |
| | | string ret = xaserver::UploadFile(suri, sname, this.GetHWND(),L"",false); |
| | | if (ret == L"-1") |
| | | { |
| | | alert("上传的文件没选择!"); |
| | | alert(L"上传的文件没选择!"); |
| | | return 1; |
| | | } |
| | | else |
| | |
| | | x.setNativePointer(xml::CreateInstance()); |
| | | xaserverarg args = new xaserverarg; |
| | | args.setNativePointer(args.CreateInstance()); |
| | | args.AddArg("sID",sguid); |
| | | args.AddArg("sEntity",m_EntityName); |
| | | args.AddArg("sDir",m_Dir); |
| | | args.AddArg("urlPath", sname); |
| | | args.AddArg(L"sID",sguid); |
| | | args.AddArg(L"sEntity",m_EntityName); |
| | | args.AddArg(L"sDir",m_Dir); |
| | | args.AddArg(L"urlPath", sname); |
| | | //alert(m_Dir); |
| | | while(ret.find("\\",0)>=0) |
| | | ret = ret.mid(ret.find("\\",0) + 1,9999); |
| | | while(ret.find(L"\\",0)>=0) |
| | | ret = ret.mid(ret.find(L"\\",0) + 1,9999); |
| | | |
| | | args.AddArg("sTemplName",ret); |
| | | args.AddArg(L"sTemplName",ret); |
| | | //trace(args.GetString()); |
| | | if (url::get("/sale/data/SysPrintTemplate/Save",args.GetString(),x) != 1) |
| | | if (url::get(L"/sale/data/SysPrintTemplate/Save",args.GetString(),x) != 1) |
| | | { |
| | | trace("error:"+x.GetXml()); |
| | | alert("保存出错了!"); |
| | | trace(L"error:"+x.GetXml()); |
| | | alert(L"保存出错了!"); |
| | | return 1; |
| | | } |
| | | else |
| | | { |
| | | alert("上传模板成功!"); |
| | | alert(L"上传模板成功!"); |
| | | OnRetrieve(); |
| | | } |
| | | } |
| | |
| | | int row = dw_list.GetRow(); |
| | | if(row<0 || row>dw_list.GetRowCount()) |
| | | { |
| | | alert("请选择要删除的模板!"); |
| | | alert(L"请选择要删除的模板!"); |
| | | return 0; |
| | | } |
| | | else |
| | | { |
| | | if (win32::MessageBox(GetHWND(),"确定要删除选中的模板?","提示",1) == 2) |
| | | if (win32::MessageBox(GetHWND(),L"确定要删除选中的模板?",L"提示",1) == 2) |
| | | return 0; |
| | | msxml::IXMLDOMElement ele = dw_list.GetRowElement(row); |
| | | string sguid = ele.selectSingleNode("ID").text; |
| | | string sguid = ele.selectSingleNode(L"ID").text; |
| | | xml x=new xml; |
| | | x.setNativePointer(xml::CreateInstance()); |
| | | xaserverarg args = new xaserverarg; |
| | | args.setNativePointer(args.CreateInstance()); |
| | | args.AddArg("sID",sguid); |
| | | if (url::get("/sale/data/SysPrintTemplate/Delete",args.GetString(),x) != 1) |
| | | args.AddArg(L"sID",sguid); |
| | | if (url::get(L"/sale/data/SysPrintTemplate/Delete",args.GetString(),x) != 1) |
| | | { |
| | | trace("error:"+x.GetXml()); |
| | | alert("删除出错了!"); |
| | | trace(L"error:"+x.GetXml()); |
| | | alert(L"删除出错了!"); |
| | | return 0; |
| | | } |
| | | else |
| | | { |
| | | alert("删除成功!"); |
| | | alert(L"删除成功!"); |
| | | OnRetrieve(); |
| | | } |
| | | } |
| | |
| | | int OnOpenDocument() |
| | | { |
| | | if(dw_doclist.GetRowCount() < 1) return 1; |
| | | string documentid = dw_doclist.GetRowElement(dw_doclist.GetRow()).getAttribute("guid"); |
| | | string documentid = dw_doclist.GetRowElement(dw_doclist.GetRow()).getAttribute(L"guid"); |
| | | //string billid = dw_docList |
| | | arg_param.AddArg("DocumentID",documentid); |
| | | arg_param.AddArg("return","ok"); |
| | | arg_param.AddArg("action","open"); |
| | | arg_param.AddArg(L"DocumentID",documentid); |
| | | arg_param.AddArg(L"return",L"ok"); |
| | | arg_param.AddArg(L"action",L"open"); |
| | | CloseWindow(); |
| | | return 1; |
| | | } |
| | |
| | | int row = dw_list.GetRow(); |
| | | if(row<0 || row>dw_list.GetRowCount()) |
| | | { |
| | | alert("请选择要打印的模板!"); |
| | | alert(L"请选择要打印的模板!"); |
| | | return 1; |
| | | } |
| | | else |
| | | { |
| | | msxml::IXMLDOMElement ele = dw_list.GetRowElement(row); |
| | | trace("\r\n---------------"); |
| | | trace(L"\r\n---------------"); |
| | | trace(ele.xml); |
| | | |
| | | string sguid = ele.selectSingleNode("ID").text; |
| | | string pre = ""; |
| | | if(ele.selectSingleNode("TemplPre")) pre = ele.selectSingleNode("TemplPre").text; |
| | | string sTemplName = ele.selectSingleNode("TemplName").text; |
| | | //string sFile = m_filePath + sguid+".xsl"; |
| | | string sguid = ele.selectSingleNode(L"ID").text; |
| | | string pre = L""; |
| | | if(ele.selectSingleNode(L"TemplPre")) pre = ele.selectSingleNode(L"TemplPre").text; |
| | | string sTemplName = ele.selectSingleNode(L"TemplName").text; |
| | | //string sFile = m_filePath + sguid+L".xsl"; |
| | | trace(sTemplName); |
| | | string sFile = m_filePath + ele.selectSingleNode("urlPath").text; |
| | | arg_param.AddArg("xsl",sFile); |
| | | arg_param.AddArg("return","ok"); |
| | | arg_param.AddArg("template-name",sTemplName); |
| | | arg_param.AddArg("template-guid",sguid); |
| | | arg_param.AddArg("template-pre",pre); |
| | | arg_param.AddArg("action","new"); |
| | | string sFile = m_filePath + ele.selectSingleNode(L"urlPath").text; |
| | | arg_param.AddArg(L"xsl",sFile); |
| | | arg_param.AddArg(L"return",L"ok"); |
| | | arg_param.AddArg(L"template-name",sTemplName); |
| | | arg_param.AddArg(L"template-guid",sguid); |
| | | arg_param.AddArg(L"template-pre",pre); |
| | | arg_param.AddArg(L"action",L"new"); |
| | | trace(arg_param.GetString()); |
| | | CloseWindow(); |
| | | /*xaserver::CreateDirectory("C:/Temp"); |
| | | int openRet = xaserver::DownLoadFile(GetServerUrl(),m_filePath+file,sTemplName,"C:/Temp/"+sTemplName); |
| | | /*xaserver::CreateDirectory(L"C:/Temp"); |
| | | int openRet = xaserver::DownLoadFile(GetServerUrl(),m_filePath+file,sTemplName,L"C:/Temp/"+sTemplName); |
| | | if(openRet < 0) |
| | | { |
| | | alert("文件打开失败!"); |
| | | alert(L"文件打开失败!"); |
| | | return 0; |
| | | } |
| | | |
| | |
| | | int FILE_SHARE_WRITE = 0x00000002; |
| | | int OPEN_EXISTING = 3; |
| | | int FILE_ATTRIBUTE_ARCHIVE =0x00000020; |
| | | int hFile = xwin::CreateFile("C:/Temp/"+sTemplName,GENERIC_READ|GENERIC_WRITE,FILE_SHARE_READ|FILE_SHARE_WRITE,0,OPEN_EXISTING,0,0); |
| | | int hFile = xwin::CreateFile(L"C:/Temp/"+sTemplName,GENERIC_READ|GENERIC_WRITE,FILE_SHARE_READ|FILE_SHARE_WRITE,0,OPEN_EXISTING,0,0); |
| | | if (hFile >0) |
| | | { |
| | | //int GMEM_MOVEABLE=0x0002; |
| | |
| | | //int SizeReadWrite; |
| | | //xwin::ReadFile(hFile,pMemory,MEMSIZE - 1,SizeReadWrite,0); |
| | | int filesize = xwin::GetFileSize(hFile,0); |
| | | trace("filesize = %d",filesize); |
| | | string buffer = "".space(filesize+1); |
| | | trace(L"filesize = %d",filesize); |
| | | string buffer = L"".space(filesize+1); |
| | | int readsize = new int; |
| | | xwin::ReadFile(hFile,buffer,filesize,readsize,0); |
| | | trace(buffer); |
| | |
| | | //GlobalUnlock(pMemory); |
| | | //GlobalFree(hMemory); |
| | | } */ |
| | | /*openRet = xwin::ShellExecute(0,"open","C:/Temp/"+sTemplName,"","",5); |
| | | /*openRet = xwin::ShellExecute(0,L"open",L"C:/Temp/"+sTemplName,L"",L"",5); |
| | | if(openRet < 32) |
| | | { |
| | | alert("文件打开失败2!"); |
| | | alert(L"文件打开失败2!"); |
| | | return 0; |
| | | }*/ |
| | | } |
| | |
| | | |
| | | xaserverarg arg = new xaserverarg; |
| | | arg.setNativePointer(xaserverarg::CreateInstance()); |
| | | arg.AddArg("content",x.GetXml()); |
| | | arg.AddArg(L"content",x.GetXml()); |
| | | |
| | | if (url::get("/sale/data/SysPrintTemplate/updateinfo",arg.GetString(),x) != 1) |
| | | if (url::get(L"/sale/data/SysPrintTemplate/updateinfo",arg.GetString(),x) != 1) |
| | | { |
| | | trace("error:"+x.GetXml()); |
| | | alert("保存出错了!"); |
| | | trace(L"error:"+x.GetXml()); |
| | | alert(L"保存出错了!"); |
| | | return 1; |
| | | } |
| | | else |
| | | { |
| | | dw_list.ResetUpdateStatus(); |
| | | alert("保存成功!"); |
| | | alert(L"保存成功!"); |
| | | } |
| | | |
| | | return 1; |
| | |
| | | int PreOnCmdDispatch(string comdid) |
| | | { |
| | | //返回0——不在执行以下代码;返回其他——执行以下代码。 |
| | | if(comdid.left(8) == "xmPanel:"){ |
| | | if(comdid.left(8) == L"xmPanel:"){ |
| | | string no = comdid.mid(8, 99); |
| | | //int id = no.toInt(); |
| | | |
| | |
| | | x.LoadXml(strNode); |
| | | msxml::IXMLDOMDocument doc= x.GetXmlDoc(); |
| | | msxml::IXMLDOMElement e = doc.documentElement; |
| | | string slable =e.selectSingleNode("//xtoolbutton[@name='"+comdid+"']/@caption").text; |
| | | string slable =e.selectSingleNode(L"//xtoolbutton[@name='"+comdid+L"']/@caption").text; |
| | | m_Dir = slable; |
| | | OnRetrieve(); |
| | | |
| | | return 1; |
| | | } |
| | | if (comdid=="xmAddDir") return OnAddDir(); |
| | | if (comdid=="xmAddTempl" && bupdate) return OnAddTempl(); |
| | | if (comdid=="xmDelTempl" && bupdate) return OnDelTempl(); |
| | | if (comdid=="xmMaintTempl" && bupdate) return OnMaintTempl(); |
| | | if (comdid=="xmNewTempl" && bupdate) return OnNewTempl(); |
| | | if (comdid=="xmHtml") return OnHtml(); |
| | | if (comdid=="xmOk") return OnOk(); |
| | | if (comdid=="xmSave") return OnSave(); |
| | | if(comdid=="xmOpen") return OnOpenDocument(); |
| | | else if (comdid=="xmCancel") |
| | | if (comdid==L"xmAddDir") return OnAddDir(); |
| | | if (comdid==L"xmAddTempl" && bupdate) return OnAddTempl(); |
| | | if (comdid==L"xmDelTempl" && bupdate) return OnDelTempl(); |
| | | if (comdid==L"xmMaintTempl" && bupdate) return OnMaintTempl(); |
| | | if (comdid==L"xmNewTempl" && bupdate) return OnNewTempl(); |
| | | if (comdid==L"xmHtml") return OnHtml(); |
| | | if (comdid==L"xmOk") return OnOk(); |
| | | if (comdid==L"xmSave") return OnSave(); |
| | | if(comdid==L"xmOpen") return OnOpenDocument(); |
| | | else if (comdid==L"xmCancel") |
| | | { |
| | | arg_param.AddArg("return","cancel"); |
| | | arg_param.AddArg(L"return",L"cancel"); |
| | | CloseWindow(); |
| | | return 1; |
| | | } |
| | |
| | | |
| | | int PostOnAttachEvent() |
| | | { |
| | | //AttachEvent("dw_list","DWV_ROWFOCUSCHANGED",OnRowChanged); |
| | | //AttachEvent("dw_list","DWV_CLICKED",OnClicked); |
| | | //AttachEvent("dw_list","DWV_RCLICKED",OnRClicked); |
| | | //AttachEvent("dw_list","DWV_ITEMCHANGED",OnItemChanged); |
| | | //AttachEvent("dw_list","DWV_CHILDCONTENT",OnChildContent); |
| | | AttachEvent("dw_doclist","DWV_DOUBLECLICKED",OnDocListDoubleClicked); |
| | | AttachEvent("dw_list","DWV_DOUBLECLICKED",OnDoubleClicked); |
| | | //AttachEvent(L"dw_list",L"DWV_ROWFOCUSCHANGED",OnRowChanged); |
| | | //AttachEvent(L"dw_list",L"DWV_CLICKED",OnClicked); |
| | | //AttachEvent(L"dw_list",L"DWV_RCLICKED",OnRClicked); |
| | | //AttachEvent(L"dw_list",L"DWV_ITEMCHANGED",OnItemChanged); |
| | | //AttachEvent(L"dw_list",L"DWV_CHILDCONTENT",OnChildContent); |
| | | AttachEvent(L"dw_doclist",L"DWV_DOUBLECLICKED",OnDocListDoubleClicked); |
| | | AttachEvent(L"dw_list",L"DWV_DOUBLECLICKED",OnDoubleClicked); |
| | | return 1; |
| | | } |
| | | |
| | |
| | | PUser puser = new PUser; |
| | | puser = publiccode::GetUser(); |
| | | string susername = puser.name; |
| | | if (susername !="admin") |
| | | if (susername !=L"admin") |
| | | { |
| | | string xfNodeAgentArea = "DirButton"; |
| | | string xfNodeAgentArea = L"DirButton"; |
| | | xnode anode = GetAgentNode(xfNodeAgentArea); |
| | | msxml::IXMLDOMElement xframeElement = GetElement(); |
| | | string tools="<vbox name='DirButton' height='48' />"; |
| | | string tools=L"<vbox name='DirButton' height='48' />"; |
| | | SetAgentNodeContent(anode, tools); |
| | | } |
| | | return 1; |
| | |
| | | x.setNativePointer(xml::CreateInstance()); |
| | | xaserverarg arg = new xaserverarg; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | arg.AddArg("EntityName",m_EntityName,""); |
| | | arg.AddArg("EntityID",m_EntityID,""); |
| | | arg.AddArg("susername",susername,""); // |
| | | if (url::get("/sale/data/SysPrintTemplate/Dir",arg.GetString(),x) != 1) |
| | | arg.AddArg(L"EntityName",m_EntityName,L""); |
| | | arg.AddArg(L"EntityID",m_EntityID,L""); |
| | | arg.AddArg(L"susername",susername,L""); // |
| | | if (url::get(L"/sale/data/SysPrintTemplate/Dir",arg.GetString(),x) != 1) |
| | | { |
| | | trace(x.GetXmlDoc().text); |
| | | return -1; |
| | |
| | | { |
| | | string s = x.GetXml(); |
| | | } |
| | | msxml::IXMLDOMNodeList nlist = x.GetXmlDoc().selectNodes("//Entity"); |
| | | msxml::IXMLDOMNodeList nlist = x.GetXmlDoc().selectNodes(L"//Entity"); |
| | | int i; |
| | | int nlen = nlist.length; |
| | | string toolStr = "<vbox name='Dir'>"; |
| | | string toolStr = L"<vbox name='Dir'>"; |
| | | string deptName= publiccode::GetUser().deptname; |
| | | if(deptName=="跟单部" && m_EntityName=="GDN3"){ |
| | | if(deptName==L"跟单部" && m_EntityName==L"GDN3"){ |
| | | for(i=2; i<nlen; i++) |
| | | { |
| | | msxml::IXMLDOMElement e1 = nlist.item(i); |
| | | string sDir1 = e1.selectSingleNode("@Dir").text; |
| | | string str1 = "<xtoolbutton image='15' caption='"+sDir1+"' height='24' name='xmPanel:"+i.toString()+"' style='background-color:none #ceecce none #ffffff'/>"; |
| | | string sDir1 = e1.selectSingleNode(L"@Dir").text; |
| | | string str1 = L"<xtoolbutton image='15' caption='"+sDir1+L"' height='24' name='xmPanel:"+i.toString()+L"' style='background-color:none #ceecce none #ffffff'/>"; |
| | | |
| | | toolStr += str1; |
| | | if (i==2) |
| | | m_Dir = sDir1; |
| | | } |
| | | }else if(deptName.find("业务")>=0 && m_EntityName=="GDN3" ) |
| | | }else if(deptName.find(L"业务")>=0 && m_EntityName==L"GDN3" ) |
| | | { |
| | | for(i=1; i<2; i++) |
| | | { |
| | | msxml::IXMLDOMElement e2 = nlist.item(i); |
| | | string sDir2 = e2.selectSingleNode("@Dir").text; |
| | | string str2 = "<xtoolbutton image='15' caption='"+sDir2+"' height='24' name='xmPanel:"+i.toString()+"' style='background-color:none #ceecce none #ffffff'/>"; |
| | | string sDir2 = e2.selectSingleNode(L"@Dir").text; |
| | | string str2 = L"<xtoolbutton image='15' caption='"+sDir2+L"' height='24' name='xmPanel:"+i.toString()+L"' style='background-color:none #ceecce none #ffffff'/>"; |
| | | |
| | | toolStr += str2; |
| | | if (i==1) |
| | |
| | | for(i=4; i<nlen; i++) |
| | | { |
| | | msxml::IXMLDOMElement e3 = nlist.item(i); |
| | | string sDir3 = e3.selectSingleNode("@Dir").text; |
| | | string str3 = "<xtoolbutton image='15' caption='"+sDir3+"' height='24' name='xmPanel:"+i.toString()+"' style='background-color:none #ceecce none #ffffff'/>"; |
| | | string sDir3 = e3.selectSingleNode(L"@Dir").text; |
| | | string str3 = L"<xtoolbutton image='15' caption='"+sDir3+L"' height='24' name='xmPanel:"+i.toString()+L"' style='background-color:none #ceecce none #ffffff'/>"; |
| | | |
| | | toolStr += str3; |
| | | } |
| | |
| | | for(i=0; i<nlen; i++) |
| | | { |
| | | msxml::IXMLDOMElement e = nlist.item(i); |
| | | string sDir = e.selectSingleNode("@Dir").text; |
| | | string str = "<xtoolbutton image='15' caption='"+sDir+"' height='24' name='xmPanel:"+i.toString()+"' style='background-color:none #ceecce none #ffffff'/>"; |
| | | string sDir = e.selectSingleNode(L"@Dir").text; |
| | | string str = L"<xtoolbutton image='15' caption='"+sDir+L"' height='24' name='xmPanel:"+i.toString()+L"' style='background-color:none #ceecce none #ffffff'/>"; |
| | | |
| | | toolStr += str; |
| | | if (i==0) |
| | |
| | | } |
| | | } |
| | | |
| | | toolStr += "</vbox>"; |
| | | toolStr += L"</vbox>"; |
| | | strNode = toolStr; |
| | | //trace(toolStr); |
| | | xnode anode = GetAgentNode("Dir"); |
| | | xnode anode = GetAgentNode(L"Dir"); |
| | | xwin::SetAgentNodeContent(anode,toolStr) ; |
| | | |
| | | OnRetrieve(); |
| | |
| | | int OnInit() |
| | | { |
| | | SetAgent(); |
| | | dw_list = this.GetControl("dw_list"); |
| | | dw_list.openUrl("/sale/view/view.base/template/PrintView/listDialog"); |
| | | dw_list = this.GetControl(L"dw_list"); |
| | | dw_list.openUrl(L"/sale/view/view.base/template/PrintView/listDialog"); |
| | | dw_list.SetReadOnly(true); |
| | | dw_list.SetSelectionMode(4); |
| | | dw_list.SetColumnState("ID",false); |
| | | dw_list.SetColumnState(L"ID",false); |
| | | |
| | | dw_doclist = GetControl("dw_doclist"); |
| | | dw_doclist.openUrl("/sale/view/GDN/template/doclist"); |
| | | dw_doclist = GetControl(L"dw_doclist"); |
| | | dw_doclist.openUrl(L"/sale/view/GDN/template/doclist"); |
| | | |
| | | string sUrl = GetServerUrl(); |
| | | sUrl = sUrl.mid(0, sUrl.length() - 19); |
| | | m_filePath = "/business/rpttemplate"; |
| | | m_filePath = L"/business/rpttemplate"; |
| | | arg_param = new xaserverarg; |
| | | if (GetParam()) |
| | | { |
| | | int p = GetParam(); |
| | | arg_param.setNativePointer(p); |
| | | m_EntityName = arg_param.GetArgString("EntityName"); |
| | | m_EntityID = arg_param.GetArgString("EntityID"); |
| | | m_EntityNo = arg_param.GetArgString("EntityNo"); |
| | | m_EntityName = arg_param.GetArgString(L"EntityName"); |
| | | m_EntityID = arg_param.GetArgString(L"EntityID"); |
| | | m_EntityNo = arg_param.GetArgString(L"EntityNo"); |
| | | |
| | | xaserverarg arg = new xaserverarg; |
| | | arg.setNativePointer(xaserverarg::CreateInstance()); |
| | | arg.AddArg("EntityName", m_EntityName); |
| | | arg.AddArg("EntityID", m_EntityID); |
| | | arg.AddArg("EntityNo", m_EntityNo); |
| | | arg.AddArg(L"EntityName", m_EntityName); |
| | | arg.AddArg(L"EntityID", m_EntityID); |
| | | arg.AddArg(L"EntityNo", m_EntityNo); |
| | | xml x =new xml; |
| | | x.setNativePointer(xml::CreateInstance()); |
| | | if(url::get("/sale/data/DocumentList3/bill/doclist", arg.GetString(),x)!=1) |
| | | if(url::get(L"/sale/data/DocumentList3/bill/doclist", arg.GetString(),x)!=1) |
| | | { |
| | | string error = x.GetXmlDoc().text; |
| | | trace(error); |
| | |
| | | else |
| | | { |
| | | arg_param.setNativePointer(arg_param.CreateInstance()); |
| | | m_EntityName = "SO"; |
| | | m_EntityID ="00000000-0000-0000-0000-000000000000"; |
| | | m_EntityName = L"SO"; |
| | | m_EntityID =L"00000000-0000-0000-0000-000000000000"; |
| | | } |
| | | |
| | | m_Dir = ""; |
| | | m_filePath = m_filePath + "/" + m_EntityName+"/"; |
| | | m_Dir = L""; |
| | | m_filePath = m_filePath + L"/" + m_EntityName+L"/"; |
| | | //trace(m_filePath); |
| | | |
| | | CreateDir(); |
| | |
| | | |
| | | /*if (GetParam()) |
| | | { |
| | | string action = arg_param.GetArgString("action"); |
| | | if(action=="open" || (action=="" && dw_doclist.GetRowCount() > 0)) |
| | | SwitchLayer("sheet2","frame"); |
| | | string action = arg_param.GetArgString(L"action"); |
| | | if(action==L"open" || (action==L"" && dw_doclist.GetRowCount() > 0)) |
| | | SwitchLayer(L"sheet2",L"frame"); |
| | | } |
| | | */ |
| | | |
| | |
| | | |
| | | /*if (GetParam()) |
| | | { |
| | | string action = arg_param.GetArgString("action"); |
| | | if(action=="open" || (action=="" && dw_doclist.GetRowCount() > 0)) |
| | | SwitchLayer("sheet2","frame"); |
| | | string action = arg_param.GetArgString(L"action"); |
| | | if(action==L"open" || (action==L"" && dw_doclist.GetRowCount() > 0)) |
| | | SwitchLayer(L"sheet2",L"frame"); |
| | | } |
| | | */ |
| | | return 1; |