From dd1ed0f649448d9e9a82406e23c095d5518933a7 Mon Sep 17 00:00:00 2001 From: LiFan <2308045698@qq.com> Date: 星期二, 25 六月 2024 17:12:43 +0800 Subject: [PATCH] 客户维护 --- jrj/project/business/Supplier.maint.cpp | 13 jrj/project/business/Customer3.maint.cpp | 999 ++++++++++++++++++++++++++++++---------------------------- jrj/ext-jrj/ext-jrj.vcxproj | 2 3 files changed, 524 insertions(+), 490 deletions(-) diff --git a/jrj/ext-jrj/ext-jrj.vcxproj b/jrj/ext-jrj/ext-jrj.vcxproj index b95916d..700b7d8 100644 --- a/jrj/ext-jrj/ext-jrj.vcxproj +++ b/jrj/ext-jrj/ext-jrj.vcxproj @@ -236,7 +236,7 @@ </ClCompile> <ClCompile Include="..\project\business\SO3.list.cpp" /> <ClCompile Include="..\project\business\SO3.maint.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\project\business\Supplier.maint.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> diff --git a/jrj/project/business/Customer3.maint.cpp b/jrj/project/business/Customer3.maint.cpp index 295941e..3bf21bd 100644 --- a/jrj/project/business/Customer3.maint.cpp +++ b/jrj/project/business/Customer3.maint.cpp @@ -1,12 +1,15 @@ #include <wobject/xstring.hpp> #include <xcontrol/xtreeview.hpp> #include <xcontrol/xdwgrid.hpp> +#include <xcontrol/xlayersheet.hpp> #include "vbusiness/vframe/maint.vframe.vbusiness.hpp" #include "viewobject/view.base.hpp" -class maintCustomerv3 : public maint +using xml = KXMLDOMDocument; +class __declspec(dllexport) maintCustomerv3 : public maint { +public: xlayersheet xsheet; xlayersheet m_layer; xdwtable dw_detail; @@ -23,172 +26,183 @@ int iLayer;//椤甸潰Index int APP=1; - string CustomerGoodsHWND; - string userno; - string ApplyStatus; + HWND CustomerGoodsHWND; + + xstring userno; + xstring ApplyStatus; /*struct PUser { - string id; - string no; - string name; + xstring id; + xstring no; + xstring name; };*/ +public: + maintCustomerv3(void* implPtr, HWND hWnd) :maint(implPtr, hWnd) {} +public: + static maintCustomerv3* CreateInstance(void* implPtr, void* hWnd) + { + maintCustomerv3* pWin = new maintCustomerv3(implPtr, (HWND)hWnd); + return pWin; + } - string GetGuid() + xstring GetGuid() { return publiccode::GetGuid(); } - int ViewUpdate(int pr,string updateItem,xaserverarg arg) + int ViewUpdate(int pr,xstring updateItem,xaserverarg arg) { - if(updateItem=="update") + if(updateItem==L"update") { dw_detail.ResetUpdateStatus(); } return 1; } - - string GetEntityData(int pr) + + xstring GetEntityData(LPARAM pr) { - xml x = new xml; - x.setNativePointer(xml::CreateInstance()); - dw_detail.DwUpdateAllTo(x.GetXmlDoc()); + xml x; - msxml::IXMLDOMElement e=x.GetXmlDoc().documentElement; + dw_detail.DwUpdateAllTo(x); - xml x1 = new xml; - x1.setNativePointer(xml::CreateInstance()); - dw_visit.DwUpdateAllTo(x1.GetXmlDoc()); - msxml::IXMLDOMElement e1=x1.GetXmlDoc().documentElement; - msxml::IXMLDOMNodeList oNodeList = e1.selectNodes("//Customer/*"); + KXMLDOMElement e=x.documentElement(); + + xml x1 ; + + dw_visit.DwUpdateAllTo(x1); + KXMLDOMElement e1=x1.documentElement(); + KXMLDOMNodeList oNodeList = e1.selectNodes(L"//Customer/*"); int i=0; - for (i=0; i<oNodeList.length; i++) + for (i=0; i<oNodeList.length(); i++) { - msxml::IXMLDOMElement Item = oNodeList.item(i); + KXMLDOMElement Item = oNodeList.item(i); e.appendChild(Item); } xml x2= new xml; - x2.setNativePointer(xml::CreateInstance()); - dw_Meetings.DwUpdateAllTo(x2.GetXmlDoc()); - msxml::IXMLDOMElement e2=x2.GetXmlDoc().documentElement; - msxml::IXMLDOMNodeList oNodeList2 = e2.selectNodes("//Customer/*"); + + dw_Meetings.DwUpdateAllTo(x2); + KXMLDOMElement e2=x2.documentElement(); + KXMLDOMNodeList oNodeList2 = e2.selectNodes(L"//Customer/*"); int i2=0; - for (i2=0; i2<oNodeList2.length; i2++) + for (i2=0; i2<oNodeList2.length(); i2++) { - msxml::IXMLDOMElement Item2 = oNodeList2.item(i2); + KXMLDOMElement Item2 = oNodeList2.item(i2); e.appendChild(Item2); } xml x3= new xml; - x3.setNativePointer(xml::CreateInstance()); - dw_MeetingsEx.DwUpdateAllTo(x3.GetXmlDoc()); - msxml::IXMLDOMElement e3=x3.GetXmlDoc().documentElement; - msxml::IXMLDOMNodeList oNodeList3 = e3.selectNodes("//Customer/*"); + + dw_MeetingsEx.DwUpdateAllTo(x3); + KXMLDOMElement e3=x3.documentElement(); + KXMLDOMNodeList oNodeList3 = e3.selectNodes(L"//Customer/*"); int i3=0; - for (i3=0; i3<oNodeList3.length; i3++) + for (i3=0; i3<oNodeList3.length(); i3++) { - msxml::IXMLDOMElement Item3 = oNodeList3.item(i3); + KXMLDOMElement Item3 = oNodeList3.item(i3); e.appendChild(Item3); } - trace(e.xml); - return e.xml; + trace(e.xml()); + return e.xml(); } int OnInit() { userno = xaserver::GetUserNo(); //PUser User = publiccode::GetUserInfo(); - dw_detail.SetItemString(1,"SalesPersonID",xaserver::GetUserId()); - dw_detail.SetItemDisplayString(1,"SalesPersonID",publiccode::GetUser().name); - dw_detail.SetItemString(1,"CreatorID",xaserver::GetUserId()); - dw_detail.SetItemDisplayString(1,"CreatorID",publiccode::GetUser().name); - dw_detail.SetItemString(1,"CreateDate",publiccode::GetCurrentDate()); - dw_detail.SetItemString(1,"ModifyDate",publiccode::GetCurrentDate()); - dw_detail.SetItemString(1,"Status","1"); - dw_detail.SetItemString(1,"PAStatus","1"); //鍦板潃鐘舵�� - dw_detail.SetItemString(1,"PrimaryFlag","Y"); //涓诲湴鍧� - dw_detail.SetItemString(1,"Type","1"); //瀹㈡埛涓� 1 - dw_detail.SetItemString(1,"IdentifyAddressFlag","Y"); //娌″繀瑕侊紝鏆傛椂鐣欑潃 + dw_detail.SetItemString(1,L"SalesPersonID",xaserver::GetUserId()); + dw_detail.SetItemDisplayString(1,L"SalesPersonID",publiccode::GetUser().name); + dw_detail.SetItemString(1,L"CreatorID",xaserver::GetUserId()); + dw_detail.SetItemDisplayString(1,L"CreatorID",publiccode::GetUser().name); + dw_detail.SetItemString(1,L"CreateDate",publiccode::GetCurrentDate()); + dw_detail.SetItemString(1,L"ModifyDate",publiccode::GetCurrentDate()); + dw_detail.SetItemString(1,L"Status",L"1"); + dw_detail.SetItemString(1,L"PAStatus",L"1"); //鍦板潃鐘舵�� + dw_detail.SetItemString(1,L"PrimaryFlag",L"Y"); //涓诲湴鍧� + dw_detail.SetItemString(1,L"Type",L"1"); //瀹㈡埛涓� 1 + dw_detail.SetItemString(1,L"IdentifyAddressFlag",L"Y"); //娌″繀瑕侊紝鏆傛椂鐣欑潃 - string sdate = publiccode::GetCurrentDate(); - dw_detail.SetItemString(1,"ApplyDate",sdate); - dw_detail.SetItemString(1,"ApplyStatus","鏂板缓"); - dw_detail.SetItemString(1,"Level",""); + xstring sdate = publiccode::GetCurrentDate(); + dw_detail.SetItemString(1,L"ApplyDate",sdate); + dw_detail.SetItemString(1,L"ApplyStatus",L"鏂板缓"); + dw_detail.SetItemString(1,L"Level",L""); - //dw_detail.SetItemDisplayString(1,"瀹㈡埛璧勬枡","瀹㈡埛璧勬枡闄勪欢"); - dw_detail.SetItemString(1,"瀹㈡埛璧勬枡","瀹㈡埛璧勬枡闄勪欢"); - string guid = publiccode::GetGuid(); + //dw_detail.SetItemDisplayString(1,L"瀹㈡埛璧勬枡",L"瀹㈡埛璧勬枡闄勪欢"); + dw_detail.SetItemString(1,L"瀹㈡埛璧勬枡",L"瀹㈡埛璧勬枡闄勪欢"); + xstring guid = publiccode::GetGuid(); dw_detail.SetGuid(1,guid); dw_detail.Redraw(); return 1; } - string GetPartyID(string sName,string sType) + xstring GetPartyID(xstring sName,xstring sType) { xml x1=new xml; - x1.setNativePointer(xml::CreateInstance()); - xaserverarg arg=new xaserverarg; + + xaserverarg arg; arg.setNativePointer(arg.CreateInstance()); - arg.AddArg("sname", sName); - arg.AddArg("type",sType); - if(url::get("/sale/data/"+GetEntityName(1)+"/pref/searchname",arg.GetString(),x1)!=1) + arg.AddArg(L"sname", sName); + arg.AddArg(L"type",sType); + if(xurl::get(L"/sale/data/"+GetEntityName(1)+L"/pref/searchname",arg.GetString(),x1)!=1) { - string error = x1.GetXmlDoc().text; - //alert("/sale/data/"+GetEntityName(1)+"/pref/searchname"); - return ""; + xstring error = x1.text(); + //alert(L"/sale/data/"+GetEntityName(1)+L"/pref/searchname"); + return L""; } - string sID=""; - if(x1.GetXmlDoc().selectSingleNode("root/PartyID")) - sID = x1.GetXmlDoc().selectSingleNode("root/PartyID").text; - return sID+""; + xstring sID=L""; + if(x1.selectSingleNode(L"root/PartyID")) + sID = x1.selectSingleNode(L"root/PartyID").text(); + return sID+xstring(L""); } - int OnItemChanged(ref TNotifyEvent evt,int p) + int OnItemChanged(TEvent* evt, int p) { - ref DWNMHDR hdr = evt.pnmh; - string colname = hdr.colname; - string coldata = hdr.data; - + DWNMHDR* hdr = (DWNMHDR*)evt->notify.pnmh; + xstring colname = hdr->colname; + xstring coldata = hdr->data; + int row = hdr->row; + + //鏍规嵁鍥藉埆鏄剧ず鍦板尯浠g爜 - if (colname == "CountryCode") + if (colname == L"CountryCode") { - xaserverarg arg = new xaserverarg; + xaserverarg arg ; arg.setNativePointer(arg.CreateInstance()); - arg.AddArg("countryCode",coldata); - xml x = new xml; - x.setNativePointer(x.CreateInstance()); - if (getUrl("/sale/data/"+GetEntityName(1)+"/pref/areacode",arg.GetString(),x)==1) + arg.AddArg(L"countryCode",coldata); + xml x; + + if (getUrl(L"/sale/data/"+GetEntityName(1)+L"/pref/areacode",arg.GetString(),x)==1) { - string sareacode = ""; - string sareaname = ""; - if(x.GetXmlDoc().selectSingleNode("//AreaCode")) + xstring sareacode = L""; + xstring sareaname = L""; + if(x.selectSingleNode(L"//AreaCode")) { - sareacode = x.GetXmlDoc().selectSingleNode("//AreaCode").text; - sareaname = x.GetXmlDoc().selectSingleNode("//AreaName").text; + sareacode = x.selectSingleNode(L"//AreaCode").text(); + sareaname = x.selectSingleNode(L"//AreaName").text(); } - dw_detail.SetItemString(1,"AreaCode",sareacode); - dw_detail.SetItemDisplayString(1,"AreaCode",sareaname); + dw_detail.SetItemString(1,L"AreaCode",sareacode); + dw_detail.SetItemDisplayString(1,L"AreaCode",sareaname); dw_detail.Redraw(); } } //鍙兘閫変竴涓富鑱旂郴浜� - if (colname == "PrimaryFlag" && coldata == "Y") + if (colname == L"PrimaryFlag" && coldata == L"Y") { xdwtable dw_pc; - dw_pc = dw_detail.FindDwTable("item1"); + dw_pc = dw_detail.FindDwTable(L"item1"); if (dw_pc) { int i; for (i=1;i <= dw_pc.GetRowCount();i++) { - if (i != hdr.row) + if (i != row) { - dw_pc.SetItemString(i,"PrimaryFlag","N"); - dw_pc.SetItemDisplayString(i,"PrimaryFlag",""); + dw_pc.SetItemString(i,L"PrimaryFlag",L"N"); + dw_pc.SetItemDisplayString(i,L"PrimaryFlag",L""); } } @@ -196,98 +210,98 @@ } //瀹㈡埛鍚嶇浉鍚屻�� - if (colname == "Name") + if (colname == L"Name") { //alert(coldata); - /* string sguid = GetPartyID(coldata,colname); - if (sguid != "") + /* xstring sguid = GetPartyID(coldata,colname); + if (sguid != L"") { - alert("瀹㈡埛鍚嶇О涓庣郴缁熷凡鏈夊鎴烽噸澶嶏紝璇蜂簬绠$悊鍛樿仈绯昏В鍐筹紒"); + alert(L"瀹㈡埛鍚嶇О涓庣郴缁熷凡鏈夊鎴烽噸澶嶏紝璇蜂簬绠$悊鍛樿仈绯昏В鍐筹紒"); }*/ - //alert("ccc"); + //alert(L"ccc"); } //瀹㈡埛绠�绉� - if (colname == "ShortName") + if (colname == L"ShortName") { - string sguid1 = GetPartyID(coldata,colname); + xstring sguid1 = GetPartyID(coldata,colname); //trace(sguid1); - if (sguid1 != "") + if (sguid1 != L"") { - alert("瀹㈡埛绠�绉伴噸澶嶏紝璇锋敼鐢ㄥ叾浠栫畝绉帮紒"); + alert(L"瀹㈡埛绠�绉伴噸澶嶏紝璇锋敼鐢ㄥ叾浠栫畝绉帮紒"); } } //鏍规嵁瀹㈡埛鏉ユ簮濉啓瀹㈡埛澶囨敞 - /*if (colname == "Source") + /*if (colname == L"Source") { - if(coldata=="025") - alert("鏉ユ簮澶囨敞瀵瑰簲濉啓瀹㈡埛濡備綍鐭ラ亾鎴戜滑鍏徃"); - if(coldata=="017" || coldata=="018") - alert("鏉ユ簮澶囨敞瀵瑰簲濉啓鍝釜瀹㈡埛浠嬬粛鐨�"); - if(coldata=="019") - alert("鏉ユ簮澶囨敞瀵瑰簲濉啓鍝釜娴峰鍔炰簨澶勬垨鑰呰仈缁滅偣浠嬬粛"); - if(coldata=="020") - alert("鏉ユ簮澶囨敞瀵瑰簲濉啓鍝釜闂ㄥ簵浠嬬粛"); - if(coldata=="021") - alert("鏉ユ簮澶囨敞瀵瑰簲濉啓璋佷粙缁�"); - if(coldata=="026") - alert("鏉ユ簮澶囨敞瀵瑰簲濉啓璋佽�冨療甯傚満浜夊彇鍒扮殑瀹㈡埛"); - if(coldata=="028") - alert("鏉ユ簮澶囨敞瀵瑰簲濉啓鍥藉灞曚細鍚嶇О"); - if(coldata=="034") - alert("鏉ユ簮澶囨敞瀵瑰簲濉啓璋佺殑浠g悊涓氬姟"); - if(coldata=="001" || coldata=="002" ) - alert("鏉ユ簮澶囨敞瀵瑰簲濉啓瀹㈡埛濡備綍鐭ラ亾鎴戜滑鍏徃"); - if(coldata=="0052" || coldata=="0053" || coldata=="0054" || coldata=="0055" || coldata=="0051") - dw_detail.SetItemString(1,"SourceRemark","闃块噷宸村反"); - if(coldata=="0161" || coldata=="0162" ) - dw_detail.SetItemString(1,"SourceRemark","鐜悆璧勬簮"); - if(coldata=="0061" || coldata=="0062" ) - dw_detail.SetItemString(1,"SourceRemark","涓浗鍒堕�犵綉"); - if(coldata=="022" || coldata=="023" || coldata=="037" || coldata=="038" || coldata=="039" || coldata=="040" || coldata=="007" || coldata=="024" ) - dw_detail.SetItemString(1,"SourceRemark","MH缃戠珯"); + if(coldata==L"025") + alert(L"鏉ユ簮澶囨敞瀵瑰簲濉啓瀹㈡埛濡備綍鐭ラ亾鎴戜滑鍏徃"); + if(coldata==L"017" || coldata==L"018") + alert(L"鏉ユ簮澶囨敞瀵瑰簲濉啓鍝釜瀹㈡埛浠嬬粛鐨�"); + if(coldata==L"019") + alert(L"鏉ユ簮澶囨敞瀵瑰簲濉啓鍝釜娴峰鍔炰簨澶勬垨鑰呰仈缁滅偣浠嬬粛"); + if(coldata==L"020") + alert(L"鏉ユ簮澶囨敞瀵瑰簲濉啓鍝釜闂ㄥ簵浠嬬粛"); + if(coldata==L"021") + alert(L"鏉ユ簮澶囨敞瀵瑰簲濉啓璋佷粙缁�"); + if(coldata==L"026") + alert(L"鏉ユ簮澶囨敞瀵瑰簲濉啓璋佽�冨療甯傚満浜夊彇鍒扮殑瀹㈡埛"); + if(coldata==L"028") + alert(L"鏉ユ簮澶囨敞瀵瑰簲濉啓鍥藉灞曚細鍚嶇О"); + if(coldata==L"034") + alert(L"鏉ユ簮澶囨敞瀵瑰簲濉啓璋佺殑浠g悊涓氬姟"); + if(coldata==L"001" || coldata==L"002" ) + alert(L"鏉ユ簮澶囨敞瀵瑰簲濉啓瀹㈡埛濡備綍鐭ラ亾鎴戜滑鍏徃"); + if(coldata==L"0052" || coldata==L"0053" || coldata==L"0054" || coldata==L"0055" || coldata==L"0051") + dw_detail.SetItemString(1,L"SourceRemark",L"闃块噷宸村反"); + if(coldata==L"0161" || coldata==L"0162" ) + dw_detail.SetItemString(1,L"SourceRemark",L"鐜悆璧勬簮"); + if(coldata==L"0061" || coldata==L"0062" ) + dw_detail.SetItemString(1,L"SourceRemark",L"涓浗鍒堕�犵綉"); + if(coldata==L"022" || coldata==L"023" || coldata==L"037" || coldata==L"038" || coldata==L"039" || coldata==L"040" || coldata==L"007" || coldata==L"024" ) + dw_detail.SetItemString(1,L"SourceRemark",L"MH缃戠珯"); }*/ //鑱旂郴浜篢itle閫夋嫨銆� - if (colname == "Title") + if (colname == L"Title") { xdwtable dw_PartyContact; - dw_PartyContact = dw_detail.FindDwTable("PartyContact"); - if(coldata=="MR") - dw_PartyContact.SetItemString(dw_PartyContact.GetRow(),"Gender","鐢�"); - else if(coldata=="MS" || coldata=="MADAM" || coldata=="MRS" ) - dw_PartyContact.SetItemString(dw_PartyContact.GetRow(),"Gender","濂�"); + dw_PartyContact = dw_detail.FindDwTable(L"PartyContact"); + if(coldata==L"MR") + dw_PartyContact.SetItemString(dw_PartyContact.GetRow(),L"Gender",L"鐢�"); + else if(coldata==L"MS" || coldata==L"MADAM" || coldata==L"MRS" ) + dw_PartyContact.SetItemString(dw_PartyContact.GetRow(),L"Gender",L"濂�"); else - dw_PartyContact.SetItemString(dw_PartyContact.GetRow(),"Gender",""); + dw_PartyContact.SetItemString(dw_PartyContact.GetRow(),L"Gender",L""); } - if (colname=="SalesPersonID" && coldata != "")//璁剧疆浜哄憳褰掑睘 + if (colname==L"SalesPersonID" && coldata != L"")//璁剧疆浜哄憳褰掑睘 { - trace("asdasd"); - string ls_deptname,ls_teamname,ls_groupname,ls_unitname; + trace(L"asdasd"); + xstring ls_deptname,ls_teamname,ls_groupname,ls_unitname; ls_deptname = publiccode::GetUser(coldata).deptname; ls_teamname = publiccode::GetUser(coldata).teamname; ls_groupname = publiccode::GetUser(coldata).groupname; ls_unitname = publiccode::GetUser(coldata).unitname; trace(ls_unitname); - dw_detail.SetItemString(1,"OrgName",ls_deptname+ls_teamname+ls_groupname+ls_unitname ); + dw_detail.SetItemString(1,L"OrgName",ls_deptname+xstring(ls_teamname)+ xstring(ls_groupname)+ xstring(ls_unitname) ); } //鏍规嵁鐢熸棩鑷姩璁剧疆骞撮緞銆� - /*if (colname == "Birthday") + /*if (colname == L"Birthday") { xdwtable dw_PartyContact1; - dw_PartyContact1 =dw_detail.FindDwTable("PC_OtherInfo"); + dw_PartyContact1 =dw_detail.FindDwTable(L"PC_OtherInfo"); xml xx = new xml; xx.setNativePointer(xml ::CreateInstance()); xaserverarg argnew = new xaserverarg; argnew.setNativePointer(argnew.CreateInstance()); - string agesql; - agesql = "select Dbo.GetAge( '{$Birthday}',getdate()) for xml PATH('root'),ELEMENTS XSINIL"; - argnew.AddArg("sql",agesql); - argnew.AddArg("Birthday",coldata); + xstring agesql; + agesql = L"select Dbo.GetAge( '{$Birthday}',getdate()) for xml PATH('root'),ELEMENTS XSINIL"; + argnew.AddArg(L"sql",agesql); + argnew.AddArg(L"Birthday",coldata); if (getSql(argnew.GetString(),xx) == 1) { - msxml::IXMLDOMElement AgeEle=xx.GetXmlDoc().documentElement; - dw_PartyContact1.SetItemString(1,"Age",AgeEle.text); + KXMLDOMElement AgeEle=xx.documentElement; + dw_PartyContact1.SetItemString(1,L"Age",AgeEle.text()); } }*/ return 1; @@ -298,17 +312,17 @@ xdwtable dw_obj; xdwtable dw_contact; dw_contact = dw_detail.GetCurTable(); - string sDwname = dw_contact.GetDwName(); - if(sDwname.find("item") >=0 ) sDwname = dw_contact.GetParent().GetDwName(); - if(sDwname=="PartyContact") + xstring sDwname = dw_contact.GetDwName(); + if(sDwname.find(L"item") >=0 ) sDwname = dw_contact.GetParent().GetDwName(); + if(sDwname==L"PartyContact") { int iRowPc = dw_contact.InsertRow(0); } - else if(sDwname=="PartyAddress") + else if(sDwname==L"PartyAddress") { int iRowPad = dw_contact.InsertRow(0); } - else if(sDwname=="PartyBankAccount") + else if(sDwname==L"PartyBankAccount") { int iRowPba = dw_contact.InsertRow(0); } @@ -317,27 +331,27 @@ //alert(nindex.toString()); if(nindex==5) { - dw_obj=GetControl("dw_jzfx"); + dw_obj=GetControl(L"dw_jzfx"); xdwtable dw = dw_obj.GetCurTable(); int row = dw.InsertRow(1, 0); - dw.SetItemString(row,"SeqNo",row.toString()); + dw.SetItemString(row,L"SeqNo",xstring(row)); } if(nindex==4) { - dw_obj=GetControl("dw_visit"); + dw_obj=GetControl(L"dw_visit"); xdwtable dw1 = dw_obj.GetCurTable(); int row1 = dw1.InsertRow(0); } if(nindex==3) { - dw_obj=GetControl("dw_MeetingsEx"); + dw_obj=GetControl(L"dw_MeetingsEx"); xdwtable dw3 = dw_obj.GetCurTable(); int row3 = dw3.InsertRow(0); } if(nindex==2) { - dw_obj=GetControl("dw_Meetings"); + dw_obj=GetControl(L"dw_Meetings"); xdwtable dw2 = dw_obj.GetCurTable(); int row2 = dw2.InsertRow(0); } @@ -349,17 +363,17 @@ xdwtable dw_obj; xdwtable dw_contact; dw_contact = dw_detail.GetCurTable(); - string sDwname = dw_contact.GetDwName(); - if(sDwname.find("item") >=0 ) sDwname = dw_contact.GetParent().GetDwName(); - if(sDwname=="PartyContact") + xstring sDwname = dw_contact.GetDwName(); + if(sDwname.find(L"item") >=0 ) sDwname = dw_contact.GetParent().GetDwName(); + if(sDwname==L"PartyContact") { int iRowPc = dw_contact.InsertRow(dw_contact.GetRow()); } - else if(sDwname=="PartyAddress") + else if(sDwname==L"PartyAddress") { int iRowPad = dw_contact.InsertRow(dw_contact.GetRow()); } - else if(sDwname=="PartyBankAccount") + else if(sDwname==L"PartyBankAccount") { int iRowPba = dw_contact.InsertRow(dw_contact.GetRow()); } @@ -367,26 +381,26 @@ int nindex = h+1; if(nindex==5) { - dw_obj=GetControl("dw_jzfx"); - xdwtable dw = dw_obj.FindDwTable("CustomerJzfx"); + dw_obj=GetControl(L"dw_jzfx"); + xdwtable dw = dw_obj.FindDwTable(L"CustomerJzfx"); int row = dw.InsertRow(1,dw.GetRow()); //dw.SetGuid(row,publiccode::GetGuid()); } if(nindex==4) { - dw_obj=GetControl("dw_visit"); + dw_obj=GetControl(L"dw_visit"); xdwtable dw1 =dw_obj.GetCurTable(); int row1 = dw1.InsertRow(dw1.GetRow()); } if(nindex==3) { - dw_obj=GetControl("dw_MeetingsEx"); + dw_obj=GetControl(L"dw_MeetingsEx"); xdwtable dw3 =dw_obj.GetCurTable(); int row3 = dw3.InsertRow(dw3.GetRow()); } if(nindex==2) { - dw_obj=GetControl("dw_Meetings"); + dw_obj=GetControl(L"dw_Meetings"); xdwtable dw2 =dw_obj.GetCurTable(); int row2 = dw2.InsertRow(dw2.GetRow()); } @@ -398,9 +412,9 @@ xdwtable dw_obj; xdwtable dw_contact; dw_contact = dw_detail.GetCurTable(); - string sDwname = dw_contact.GetDwName(); - if(sDwname.find("item") >=0 ) sDwname = dw_contact.GetParent().GetDwName(); - if(sDwname=="PartyContact" ||sDwname=="PartyAddress" ||sDwname=="PartyBankAccount" ) + xstring sDwname = dw_contact.GetDwName(); + if(sDwname.find(L"item") >=0 ) sDwname = dw_contact.GetParent().GetDwName(); + if(sDwname==L"PartyContact" ||sDwname==L"PartyAddress" ||sDwname==L"PartyBankAccount" ) { int row = dw_contact.GetRow(); dw_contact.DeleteRow(row); @@ -409,7 +423,7 @@ int nindex = h+1; if(nindex==5) { - dw_obj=GetControl("dw_jzfx"); + dw_obj=GetControl(L"dw_jzfx"); xdwtable dw = dw_obj.GetCurTable(); int row1 = dw.GetRow(); if(dw.GetRowCount() >1) @@ -417,21 +431,21 @@ } if(nindex==4) { - dw_obj=GetControl("dw_visit"); + dw_obj=GetControl(L"dw_visit"); xdwtable dw1 = dw_obj.GetCurTable(); int row2 = dw1.GetRow(); dw1.DeleteRow(row2); } if(nindex==3) { - dw_obj=GetControl("dw_MeetingsEx"); + dw_obj=GetControl(L"dw_MeetingsEx"); xdwtable dw4 = dw_obj.GetCurTable(); int row4 = dw4.GetRow(); dw4.DeleteRow(row4); } if(nindex==2) { - dw_obj=GetControl("dw_Meetings"); + dw_obj=GetControl(L"dw_Meetings"); xdwtable dw3 = dw_obj.GetCurTable(); int row3 = dw3.GetRow(); dw3.DeleteRow(row3); @@ -441,204 +455,204 @@ int OnDetailRow() { - trace("detail"); + trace(L"detail"); return 0; } int OnPreSave() { - xml xxx = new xml; - xxx.setNativePointer(xxx.CreateInstance()); - dw_detail.DwUpdateAllTo(xxx.GetXmlDoc()); - trace(xxx.GetXml()); + xml xxx ; + + dw_detail.DwUpdateAllTo(xxx); + trace(xxx.xml()); //return 0; //瀹㈡埛鍚嶇О - string sName; - sName = dw_detail.GetItemString(1,"Name"); - if (sName == "") + xstring sName; + sName = dw_detail.GetItemString(1,L"Name"); + if (sName == L"") { - alert("瀹㈡埛鍚嶇О涓嶈兘涓虹┖锛�"); + alert(L"瀹㈡埛鍚嶇О涓嶈兘涓虹┖锛�"); return 0; } - string sShortName = dw_detail.GetItemString(1,"ShortName"); - if (sShortName == "") + xstring sShortName = dw_detail.GetItemString(1,L"ShortName"); + if (sShortName == L"") { - alert("瀹㈡埛绠�绉颁笉鑳戒负绌猴紒"); + alert(L"瀹㈡埛绠�绉颁笉鑳戒负绌猴紒"); return 0; } - string Level = dw_detail.GetItemString(1,"Level"); - /*if (Level == "") + xstring Level = dw_detail.GetItemString(1,L"Level"); + /*if (Level == L"") { - alert("瀹㈡埛绛夌骇涓嶈兘涓虹┖锛�"); + alert(L"瀹㈡埛绛夌骇涓嶈兘涓虹┖锛�"); return 0; }*/ /* - if(dw_detail.GetItemString(1,"Address")=="") + if(dw_detail.GetItemString(1,L"Address")==L"") { - alert("瀹㈡埛鍦板潃涓嶈兘涓虹┖锛�"); + alert(L"瀹㈡埛鍦板潃涓嶈兘涓虹┖锛�"); return 0; } - if(dw_detail.GetItemString(1,"Source")=="") + if(dw_detail.GetItemString(1,L"Source")==L"") { - alert("瀹㈡埛鏉ユ簮涓嶈兘涓虹┖锛�"); + alert(L"瀹㈡埛鏉ユ簮涓嶈兘涓虹┖锛�"); return 0; } - if(dw_detail.GetItemString(1,"CountryCode")=="") + if(dw_detail.GetItemString(1,L"CountryCode")==L"") { - alert("瀹㈡埛鍥藉埆涓嶈兘涓虹┖锛�"); + alert(L"瀹㈡埛鍥藉埆涓嶈兘涓虹┖锛�"); return 0; } - if(dw_detail.GetItemString(1,"TEL")=="") + if(dw_detail.GetItemString(1,L"TEL")==L"") { - alert("鍏徃鐢佃瘽涓嶈兘涓虹┖锛�"); + alert(L"鍏徃鐢佃瘽涓嶈兘涓虹┖锛�"); return 0; }*/ //瀹㈡埛绠�绉颁笉鑳介噸澶� /* - string sPartyID = GetPartyID(sShortName,"ShortName"); - if (sPartyID != "") + xstring sPartyID = GetPartyID(sShortName,L"ShortName"); + if (sPartyID != L"") { - alert("姝ゅ鎴风畝绉板凡缁忓瓨鍦紒"); + alert(L"姝ゅ鎴风畝绉板凡缁忓瓨鍦紒"); } */ //瀹㈡埛浠g爜 - string sPartyNo; - sPartyNo = dw_detail.GetItemString(1,"PartyNo"); - if (sPartyNo == "" ) + xstring sPartyNo; + sPartyNo = dw_detail.GetItemString(1,L"PartyNo"); + if (sPartyNo == L"" ) { - //alert("瀹㈡埛浠g爜涓嶈兘涓虹┖锛�"); + //alert(L"瀹㈡埛浠g爜涓嶈兘涓虹┖锛�"); //return 0; - string sNo = publiccode::GetIdentityNo("Party1"); - if (sNo == "") - sNo == "1000"; - dw_detail.SetItemString(1,"PartyNo",sNo); + xstring sNo = publiccode::GetIdentityNo(L"Party1"); + if (sNo == L"") + sNo == L"1000"; + dw_detail.SetItemString(1,L"PartyNo",sNo); } //鎴愮珛鏃堕棿YearEstablished //闆囧憳鏁伴噺Employees - //string sYearEstablished = dw_detail.GetItemString(1,"YearEstablished"); - //string sEmployees = dw_detail.GetItemString(1,"Employees"); + //xstring sYearEstablished = dw_detail.GetItemString(1,L"YearEstablished"); + //xstring sEmployees = dw_detail.GetItemString(1,L"Employees"); //sYearEstablished.toInt(); //鑱旂郴浜哄鍚峃ame-PCName锛岃缃姸鎬� xdwtable dw_PartyContact; - dw_PartyContact = dw_detail.FindDwTable("PartyContact"); + dw_PartyContact = dw_detail.FindDwTable(L"PartyContact"); xdwtable PC_OtherInfo; - PC_OtherInfo = dw_detail.FindDwTable("PC_OtherInfo"); + PC_OtherInfo = dw_detail.FindDwTable(L"PC_OtherInfo"); int countflag=0; if (dw_PartyContact) { int i; for (i=1;i <= dw_PartyContact.GetRowCount();i++) { - string sPCName = dw_PartyContact.GetItemString(i,"Name"); - if (sPCName == "" ) + xstring sPCName = dw_PartyContact.GetItemString(i,L"Name"); + if (sPCName == L"" ) { - string sPCTitle = dw_PartyContact.GetItemString(i,"Title"); - if (sPCTitle == "") sPCTitle = ""; - string sPCJobTitle = dw_PartyContact.GetItemString(i,"JobTitle"); - if (sPCJobTitle == "") sPCJobTitle = ""; - string sPCGender = dw_PartyContact.GetItemString(i,"Gender"); - if (sPCGender == "") sPCGender = ""; - string sPCMobile = dw_PartyContact.GetItemString(i,"Mobile"); - if (sPCMobile == "") sPCMobile = ""; - string sPCTEL = dw_PartyContact.GetItemString(i,"TEL"); - if (sPCTEL == "") sPCTEL = ""; - string sPCEmail = dw_PartyContact.GetItemString(i,"Email"); - if (sPCEmail == "") sPCEmail = ""; - string sAll = sPCTitle + sPCJobTitle + sPCGender + sPCMobile + sPCTEL + sPCEmail; - /*if (sAll != "") + xstring sPCTitle = dw_PartyContact.GetItemString(i,L"Title"); + if (sPCTitle == L"") sPCTitle = L""; + xstring sPCJobTitle = dw_PartyContact.GetItemString(i,L"JobTitle"); + if (sPCJobTitle == L"") sPCJobTitle = L""; + xstring sPCGender = dw_PartyContact.GetItemString(i,L"Gender"); + if (sPCGender == L"") sPCGender = L""; + xstring sPCMobile = dw_PartyContact.GetItemString(i,L"Mobile"); + if (sPCMobile == L"") sPCMobile = L""; + xstring sPCTEL = dw_PartyContact.GetItemString(i,L"TEL"); + if (sPCTEL == L"") sPCTEL = L""; + xstring sPCEmail = dw_PartyContact.GetItemString(i,L"Email"); + if (sPCEmail == L"") sPCEmail = L""; + xstring sAll = sPCTitle + sPCJobTitle + sPCGender + sPCMobile + sPCTEL + sPCEmail; + /*if (sAll != L"") { - alert("鑱旂郴浜哄鍚嶄笉鑳戒负绌�"); + alert(L"鑱旂郴浜哄鍚嶄笉鑳戒负绌�"); return 0; }*/ } else { - string aStatus; - aStatus = dw_PartyContact.GetItemString(i,"Status",0); - if (aStatus=="") + xstring aStatus; + aStatus = dw_PartyContact.GetItemString(i,L"Status"); + if (aStatus==L"") { - dw_PartyContact.SetItemString(i,"Status","1"); + dw_PartyContact.SetItemString(i,L"Status",L"1"); } } - if(dw_PartyContact.GetItemString(i,"ContactID")=="") + if(dw_PartyContact.GetItemString(i,L"ContactID")==L"") { - dw_PartyContact.SetItemString(i,"ContactID",GetGuid()); + dw_PartyContact.SetItemString(i,L"ContactID",GetGuid()); } - string sFlag = dw_PartyContact.GetItemString(i,"PrimaryFlag"); - if(sFlag=="Y") + xstring sFlag = dw_PartyContact.GetItemString(i,L"PrimaryFlag"); + if(sFlag==L"Y") { countflag ++; - dw_PartyContact.SetItemString(i,"PrimaryFlag","Y"); - PC_OtherInfo.SetItemString(1,"ContactID",dw_PartyContact.GetItemString(i,"ContactID")); + dw_PartyContact.SetItemString(i,L"PrimaryFlag",L"Y"); + PC_OtherInfo.SetItemString(1,L"ContactID",dw_PartyContact.GetItemString(i,L"ContactID")); } } - if(countflag==0 && dw_PartyContact.GetItemString(1,"Name") !="") + if(countflag==0 && dw_PartyContact.GetItemString(1,L"Name") !=L"") { - dw_PartyContact.SetItemString(1,"PrimaryFlag","Y"); - PC_OtherInfo.SetItemString(1,"ContactID",dw_PartyContact.GetItemString(1,"ContactID")); + dw_PartyContact.SetItemString(1,L"PrimaryFlag",L"Y"); + PC_OtherInfo.SetItemString(1,L"ContactID",dw_PartyContact.GetItemString(1,L"ContactID")); } } //閾惰甯愬彿BankName-BankName锛汢ankAccountNo-PBABankAccountNo 锛� 璁剧疆鐘舵�� xdwtable dw_PartyBankAccount; - dw_PartyBankAccount =dw_detail.FindDwTable("PartyBankAccount"); + dw_PartyBankAccount =dw_detail.FindDwTable(L"PartyBankAccount"); if (dw_PartyBankAccount) { int j; for (j=1;j <= dw_PartyBankAccount.GetRowCount();j++) { - string sPBABankName = dw_PartyBankAccount.GetItemString(j,"BankName"); - string sPBABankAccountNo = dw_PartyBankAccount.GetItemString(j,"BankAccountNo"); - if (sPBABankName == "") sPBABankName = ""; - if (sPBABankAccountNo == "") sPBABankAccountNo = ""; - string sPBAAll = sPBABankName + sPBABankAccountNo; - if (sPBAAll != "") + xstring sPBABankName = dw_PartyBankAccount.GetItemString(j,L"BankName"); + xstring sPBABankAccountNo = dw_PartyBankAccount.GetItemString(j,L"BankAccountNo"); + if (sPBABankName == L"") sPBABankName = L""; + if (sPBABankAccountNo == L"") sPBABankAccountNo = L""; + xstring sPBAAll = sPBABankName + sPBABankAccountNo; + if (sPBAAll != L"") { - /*if (sPBABankName == "") + /*if (sPBABankName == L"") { - alert("閾惰鍚嶇О涓嶈兘涓虹┖"); + alert(L"閾惰鍚嶇О涓嶈兘涓虹┖"); return 0; } - if (sPBABankAccountNo == "") + if (sPBABankAccountNo == L"") { - alert("閾惰璐︽埛涓嶈兘涓虹┖"); + alert(L"閾惰璐︽埛涓嶈兘涓虹┖"); return 0; }*/ - dw_PartyBankAccount.SetItemString(j,"Status","1"); + dw_PartyBankAccount.SetItemString(j,L"Status",L"1"); } } } //鍦板潃锛岃缃姸鎬� xdwtable dw_PartyAddress; - dw_PartyAddress =dw_detail.FindDwTable("PartyAddress"); + dw_PartyAddress =dw_detail.FindDwTable(L"PartyAddress"); if (dw_PartyAddress) { int k; for (k=1;k <= dw_PartyAddress.GetRowCount();k++) { - string sPADAddressName = dw_PartyAddress.GetItemString(k,"AddressName"); - string sPADAddress = dw_PartyAddress.GetItemString(k,"Address"); - if (sPADAddressName == "") sPADAddressName = ""; - if (sPADAddress == "") sPADAddress = ""; - string sPADAll = sPADAddressName + sPADAddress; - if (sPADAll != "") + xstring sPADAddressName = dw_PartyAddress.GetItemString(k,L"AddressName"); + xstring sPADAddress = dw_PartyAddress.GetItemString(k,L"Address"); + if (sPADAddressName == L"") sPADAddressName = L""; + if (sPADAddress == L"") sPADAddress = L""; + xstring sPADAll = sPADAddressName + sPADAddress; + if (sPADAll != L"") { - dw_PartyAddress.SetItemString(k,"Status","1"); - dw_PartyAddress.SetItemString(k,"IdentifyAddressFlag","N"); + dw_PartyAddress.SetItemString(k,L"Status",L"1"); + dw_PartyAddress.SetItemString(k,L"IdentifyAddressFlag",L"N"); } } } @@ -649,109 +663,110 @@ { int rec =OnPreSave(); if (rec != 1) return 0; - ProcessFlowAction("action:bill.update",1); + ProcessFlowAction(L"action:bill.update",1); return 1; } int CustomerModify()//璺冲埌瀹㈡埛淇敼鐣岄潰 { - //trace("asdsad"); - xaserverarg arg = new xaserverarg; + //trace(L"asdsad"); + xaserverarg& arg = *new xaserverarg; arg.setNativePointer(arg.CreateInstance()); - arg.AddArg("EntityID", maint::m_EntityID); - openUrl("/sale/view/"+GetEntityName(1)+"/worknode/customermodify/open",arg); + arg.AddArg(L"EntityID", maint::m_EntityID); + openUrl(L"/sale/view/"+GetEntityName(1)+L"/worknode/customermodify/open", &arg); //CloseWindow(); return 1; } - int OnComdidSplit(string str){ - if(str.find("|", 0)<0) + int OnComdidSplit(xstring str){ + if(str.find(L"|", 0)<0) return -1; - CustomerGoodsHWND = str.mid(str.find("|",0) + 1, str.length()); + CustomerGoodsHWND = (HWND)str.mid(str.find(L"|",0) + 1, str.length()).toInt64(); } int OnShare() { - xaserverarg arg = new xaserverarg; + xaserverarg& arg = *new xaserverarg; arg.setNativePointer(arg.CreateInstance()); int row = dw_detail.GetRow(); if(row < 1) return 0; - string PartyID = dw_detail.GetItemString(row,"PartyID"); - arg.AddArg("EntityID",PartyID); - arg.AddArg("EntityName", "瀹㈡埛鍏变韩"); - OpenWindow("dev:xpage[UserGroupShare.vx]",cast(arg as int)); + xstring PartyID = dw_detail.GetItemString(row,L"PartyID"); + arg.AddArg(L"EntityID",PartyID); + arg.AddArg(L"EntityName", L"瀹㈡埛鍏变韩"); + OpenWindow(L"dev:xpage[UserGroupShare.vx]", (LPARAM) & arg); return 1; } int OnShareMessage() { - xaserverarg arg = new xaserverarg; + xaserverarg& arg = *new xaserverarg; arg.setNativePointer(arg.CreateInstance()); int row = dw_detail.GetRow(); if(row < 1) return 0; - string PartyID = dw_detail.GetItemString(row,"PartyID"); - arg.AddArg("PartyID",PartyID); - OpenWindow("dev:xpage[XmShare.Custumer.v3.vx]",cast(arg as int)); + xstring PartyID = dw_detail.GetItemString(row,L"PartyID"); + arg.AddArg(L"PartyID",PartyID); + OpenWindow(L"dev:xpage[XmShare.Custumer.v3.vx]", (LPARAM)&arg); + return 1; } - int PreOnCmdDispatch(string comdid) + int PreOnCmdDispatch(xstring comdid) { - if (comdid == "cb_save") + if (comdid == L"cb_save") { - win32::SendMessage(CustomerGoodsHWND.toInt(),0x401, "cb_save", 0); + SendMessageW(CustomerGoodsHWND,0x401, (WPARAM)L"cb_save", 0); } - else if (comdid == "cb_copy") + else if (comdid == L"cb_copy") { - win32::SendMessage(CustomerGoodsHWND.toInt(),0x401, "cb_copy", 0); + SendMessageW(CustomerGoodsHWND,0x401, (WPARAM)L"cb_copy", 0); } - else if (comdid == "cb_delete") + else if (comdid == L"cb_delete") { - win32::SendMessage(CustomerGoodsHWND.toInt(),0x401, "cb_delete", 0); + SendMessageW(CustomerGoodsHWND,0x401, (WPARAM)L"cb_delete", 0); } - else if (comdid == "cb_reflash") + else if (comdid == L"cb_reflash") { - win32::SendMessage(CustomerGoodsHWND.toInt(),0x401, "cb_reflash", 0); + SendMessageW(CustomerGoodsHWND,0x401, (WPARAM)L"cb_reflash", 0); } - else if(comdid == "cb_add") + else if(comdid == L"cb_add") { - win32::SendMessage(CustomerGoodsHWND.toInt(),0x401, "cb_add", 0); + SendMessageW(CustomerGoodsHWND,0x401, (WPARAM)L"cb_add", 0); } - else if(comdid == "cb_import") + else if(comdid == L"cb_import") { - win32::SendMessage(CustomerGoodsHWND.toInt(),0x401, "cb_import",0); + SendMessageW(CustomerGoodsHWND,0x401, (WPARAM)L"cb_import",0); } - else if (comdid == "action:bill.row.add") return OnAddRow(); - else if (comdid == "action:bill.row.insert") return OnInsertRow(); - else if (comdid == "action:bill.row.delete") return OnDeleteRow(); - else if (comdid == "action:bill.row.detail") return OnDetailRow(); - else if (comdid == "action:bill.SourceRemark") return OnSourceRemark(); + else if (comdid == L"action:bill.row.add") return OnAddRow(); + else if (comdid == L"action:bill.row.insert") return OnInsertRow(); + else if (comdid == L"action:bill.row.delete") return OnDeleteRow(); + else if (comdid == L"action:bill.row.detail") return OnDetailRow(); + else if (comdid == L"action:bill.SourceRemark") return OnSourceRemark(); - else if (comdid == "action:bill.update") + else if (comdid == L"action:bill.update") { return OnPreSave(); } - else if (comdid == "action:customermodify") return CustomerModify(); - else if(comdid.find("|",0)){ + else if (comdid == L"action:customermodify") return CustomerModify(); + else if(comdid.find(L"|",0)){ OnComdidSplit(comdid); } - if(comdid=="action:XmShare") + if(comdid==L"action:XmShare") { OnShare(); return 0; } - if(comdid=="action:XmShareMessage") + if(comdid==L"action:XmShareMessage") { OnShareMessage(); return 0; } - // else if (comdid.find("action:",0) >= 0) return OnAction(comdid); + // else if (comdid.find(L"action:",0) >= 0) return OnAction(comdid); return -1; } - int PostOnCmdDispatch(string comdid) + int PostOnCmdDispatch(xstring comdid) { - if (comdid == "action:bill.update") + if (comdid == L"action:bill.update") { dw_detail.ResetUpdateStatus(); dw_visit.ResetUpdateStatus(); @@ -762,11 +777,11 @@ return 1; } //閫夋嫨tab椤甸潰 - int OnSelectedSheet(ref TNotifyEvent evt,int p) + int OnSelectedSheet(TEvent* evt,int p) { iLayer = m_layer.GetSheetIndex(); if (iLayer == 0) - SetAgent("maint",maint::m_EntityID); + SetAgent(L"maint",maint::m_EntityID); else if (iLayer == 1) { int cc=APP; @@ -775,19 +790,20 @@ if(cc==2) { xsheet.DeleteSheet(1); - string xp = "<xframe src='dev:xpage[CustomerGoodsVd.vx]' />"; - xaserverarg arg = new xaserverarg; + xstring xp = L"<xframe src='dev:xpage[CustomerGoodsVd.vx]' />"; + xaserverarg& arg = * new xaserverarg; arg.setNativePointer(arg.CreateInstance()); - arg.AddArg("CustomerID", this.m_EntityID); - arg.AddArg("FROM", "Customer"); - arg.AddArg("CustomerName", dw_detail.GetItemString(1,"Name")); - arg.AddArg("config", "瀹㈡埛浜у搧.vface/config/CustomerGoodsVdVd/view"); - arg.AddArg("CustomerHWND",this.GetHWND().toString()); - int p1 =arg.ptr_native_; - int nIndex = xsheet.InsertSheet(-1, "瀹㈡埛ID璐у彿搴�", xp, p1); + arg.AddArg(L"CustomerID",m_EntityID); + arg.AddArg(L"FROM", L"Customer"); + arg.AddArg(L"CustomerName", dw_detail.GetItemString(1,L"Name")); + arg.AddArg(L"config", L"瀹㈡埛浜у搧.vface/config/CustomerGoodsVdVd/view"); + //arg.AddArg(L"CustomerHWND",GetHWND().toString()); + arg.SetParam(L"CustomerHWND", (LPARAM)GetHWND()); + + int nIndex = xsheet.InsertSheet(-1, L"瀹㈡埛ID璐у彿搴�", xp, (void *) &arg); xsheet.SelectSheet(nIndex); } - //win32::SendMessage(CustomerGoodsHWND.toInt(),0x401, "SetFocus", nil); + //win32::SendMessage(CustomerGoodsHWND.toInt(),0x401, L"SetFocus", nil); } return 1; @@ -795,30 +811,30 @@ int OnSourceRemark() { - string name = "瀹㈡埛绠$悊"; - xml x = ViewObject::RetrieveData("/sale/data/TradeFinance3/GetSetUpRemarks","Type",name); - msxml::IXMLDOMNodeList items = x.GetXmlDoc().selectNodes("data/Item"); - msxml::IXMLDOMNode t = items.item(0); - string Content=""; - if(t.selectSingleNode("Content")) + xstring name = L"瀹㈡埛绠$悊"; + xml x = ViewObject::RetrieveData(L"/sale/data/TradeFinance3/GetSetUpRemarks",L"Type",name); + KXMLDOMNodeList items = x.selectNodes(L"data/Item"); + KXMLDOMNode t = items.item(0); + xstring Content=L""; + if(t.selectSingleNode(L"Content")) { - Content=t.selectSingleNode("Content").text; + Content=t.selectSingleNode(L"Content").text(); } - xaserverarg arg1 = new xaserverarg; + xaserverarg& arg1 = * new xaserverarg; arg1.setNativePointer(arg1.CreateInstance()); - arg1.AddArg("value",Content); - OpenWindow("dev:xpage[memo.edit.new.vx]",arg1.getNativePointer()); + arg1.AddArg(L"value",Content); + OpenWindow(L"dev:xpage[memo.edit.new.vx]",(LPARAM) & arg1); return 1; } - int OnItemClick(ref TNotifyEvent evt,int p) + int OnItemClick(TEvent* evt,int p) { - xdwtable dw = dw_detail.FindDwTable("item1",0); - xdwtable dw1 = dw_detail.FindDwTable("item2",0); - xdwtable dw2 = dw_detail.FindDwTable("item3",0); - int start=dw_detail.GetCellRowFromRowColumn(1,dw_detail.GetColumnIndex("Website")); + xdwtable dw = dw_detail.FindDwTable(L"item1",0); + xdwtable dw1 = dw_detail.FindDwTable(L"item2",0); + xdwtable dw2 = dw_detail.FindDwTable(L"item3",0); + int start=dw_detail.GetCellRowFromRowColumn(1,dw_detail.GetColumnIndex(L"Website")); int m,n,k; m=dw.GetRowCount(); n=dw1.GetRowCount(); @@ -835,59 +851,60 @@ { k=dw2.GetRowCount() +1; } - ref DWNMHDR hdr = cast(evt.pnmh as ref DWNMHDR); - string value = hdr.data; + DWNMHDR* hdr = (DWNMHDR*)evt->notify.pnmh; + xstring value = hdr->data; + + //alert(value); - xaserverarg arg=new xaserverarg; - arg.setNativePointer(arg.CreateInstance()); - if(value == "涓昏鑱旂郴浜哄叾瀹冧俊鎭�") + xaserverarg& arg=* new xaserverarg; + + if(value == L"涓昏鑱旂郴浜哄叾瀹冧俊鎭�") { dw_detail.ExpandCellRow(start +m +5,start +m+7); } - else if(value == "鍏跺畠鍦板潃") + else if(value == L"鍏跺畠鍦板潃") { dw_detail.ExpandCellRow(start +m+9,start +m+9+n); //dw_base.ExpandMarginRow(-22,-20); } - else if(value == "閾惰淇℃伅") + else if(value == L"閾惰淇℃伅") { dw_detail.ExpandCellRow(start +m+11+n,start +m+11+n+k); //dw_base.ExpandMarginRow(-22,-20); } - else if(value == "涓氬姟姒傝堪") + else if(value == L"涓氬姟姒傝堪") { dw_detail.ExpandCellRow(start +m+13+n+k,start +m+13+n+k+2); //dw_base.ExpandMarginRow(-22,-20); } - else if(value == "瀹㈡埛鎺堜俊") + else if(value == L"瀹㈡埛鎺堜俊") { dw_detail.ExpandCellRow(start +m+15+n+k +2,start +m+15+n+k +2+1); //dw_base.ExpandMarginRow(-22,-20); } - if(value == "瀹㈡埛璧勬枡闄勪欢") + if(value == L"瀹㈡埛璧勬枡闄勪欢") { - if(userno == "admin" || userno == "00601" || userno == "00701") + if(userno == L"admin" || userno == L"00601" || userno == L"00701") { //alert(dw_detail.GetGuid(1)); - arg.AddArg("entityid",dw_detail.GetGuid(1)); - int p3=cast(arg as int) ; - OpenWindow("dev:xpage[maint.Document.Customer.v3.vx]", p3); + arg.AddArg(L"entityid",dw_detail.GetGuid(1)); + + OpenWindow(L"dev:xpage[maint.Document.Customer.v3.vx]", (LPARAM) & arg); return 1; } } - if(value == "瀹㈡埛鍩烘湰淇℃伅") + if(value == L"瀹㈡埛鍩烘湰淇℃伅") { - xaserverarg arg1 = new xaserverarg; - arg1.setNativePointer(arg1.CreateInstance()); - string str = dw_detail.GetItemString(1,"BasicInformation"); - arg1.AddArg("value",str); - OpenWindow("dev:xpage[memo.edit.new.vx]",arg1.getNativePointer()); - if(arg1.GetArgString("comdid")=="xmOK") + xaserverarg& arg1 = *new xaserverarg; + xstring str = dw_detail.GetItemString(1,L"BasicInformation"); + arg1.AddArg(L"value",str); + OpenWindow(L"dev:xpage[memo.edit.new.vx]", (LPARAM)&arg1); + if(arg1.GetArgString(L"comdid")==L"xmOK") { - str = arg1.GetArgString("value"); + str = arg1.GetArgString(L"value"); dw_detail.AcceptText(); - dw_detail.SetItemString(1,"BasicInformation",str); + dw_detail.SetItemString(1,L"BasicInformation",str); } return 1; @@ -895,92 +912,96 @@ return 1; } - int OnItemClickEx(ref TNotifyEvent evt,int p) + int OnItemClickEx(TEvent* evt, int pr) { - xdwtable dw = dw_visit.FindDwTable("item",0); + xdwtable dw = dw_visit.FindDwTable(L"item",0); - ref DWNMHDR hdr = cast(evt.pnmh as ref DWNMHDR); - string value = hdr.data; - int row = hdr.row; + DWNMHDR* hdr = (DWNMHDR*)evt->notify.pnmh; + xstring colname = hdr->colname; + xstring value = hdr->data; + int row = hdr->row; //alert(value); - xaserverarg arg=new xaserverarg; + xaserverarg& arg=*new xaserverarg; arg.setNativePointer(arg.CreateInstance()); - if(value == "涓婁紶") + if(value == L"涓婁紶") { - if(dw.GetGuid(dw.GetRow())=="") + if(dw.GetGuid(dw.GetRow())==L"") { - alert("淇濆瓨鍚庡湪涓婁紶锛�"); + alert(L"淇濆瓨鍚庡湪涓婁紶锛�"); return 1; } - arg.AddArg("entityid",dw.GetGuid(dw.GetRow())); - int p4=cast(arg as int) ; - OpenWindow("dev:xpage[maint.Document.Customer.v3.vx]", p4); + arg.AddArg(L"entityid",dw.GetGuid(dw.GetRow())); + + OpenWindow(L"dev:xpage[maint.Document.Customer.v3.vx]", (LPARAM)&arg); return 1; } return 1; } - int OnItemClickExS(ref TNotifyEvent evt,int p) + int OnItemClickExS(TEvent* evt,int p) { - xdwtable dw = dw_Meetings.FindDwTable("item",0); + xdwtable dw = dw_Meetings.FindDwTable(L"item",0); - ref DWNMHDR hdr = cast(evt.pnmh as ref DWNMHDR); - string value = hdr.data; - int row = hdr.row; + DWNMHDR* hdr = (DWNMHDR*)evt->notify.pnmh; + xstring colname = hdr->colname; + xstring value = hdr->data; + int row = hdr->row; //alert(value); - xaserverarg arg=new xaserverarg; - arg.setNativePointer(arg.CreateInstance()); + xaserverarg& arg=*new xaserverarg; + - if(value == "闄勪欢涓婁紶") + if(value == L"闄勪欢涓婁紶") { - if(dw.GetGuid(dw.GetRow())=="") + if(dw.GetGuid(dw.GetRow())==L"") { - alert("淇濆瓨鍚庡湪涓婁紶锛�"); + alert(L"淇濆瓨鍚庡湪涓婁紶锛�"); return 1; } - arg.AddArg("entityid",dw.GetGuid(dw.GetRow())); - int p4=cast(arg as int) ; - OpenWindow("dev:xpage[maint.Document.Customer.v3.vx]", p4); + arg.AddArg(L"entityid",dw.GetGuid(dw.GetRow())); + + OpenWindow(L"dev:xpage[maint.Document.Customer.v3.vx]", (LPARAM)&arg); return 1; } - if(value == "浜哄憳") + if(value == L"浜哄憳") { - xaserverarg arg2 = new xaserverarg; - arg2.setNativePointer(arg2.CreateInstance()); - xaserverarg parg2 = GetParam(); - OpenWindow("dev:xpage[UserGroupPersonSelect.vx]",cast(arg2 as int)); - - if(arg2.GetArgString("comdid")=="xmOk") - { - string data = arg2.GetArgString("data"); - xml x2 = new xml; - x2.setNativePointer(xml::CreateInstance()); - x2.LoadXml(data); - msxml::IXMLDOMNodeList nodes = x2.GetXmlDoc().selectNodes("/root/item"); - trace(x2.GetXml()); + xaserverarg& arg2 =* new xaserverarg; - int len = nodes.length; - string Names = ""; + xaserverarg& parg2 = *(xaserverarg*)GetParam(); + + OpenWindow(L"dev:xpage[UserGroupPersonSelect.vx]", (LPARAM)&arg2); + + if(arg2.GetArgString(L"comdid")==L"xmOk") + { + xstring data = arg2.GetArgString(L"data"); + xml x2; + + x2.loadXML(data); + KXMLDOMNodeList nodes = x2.selectNodes(L"/root/item"); + trace(x2.xml()); + + int len = nodes.length(); + + xstring Names = L""; for(int i=0;i<len; i++) { - msxml::IXMLDOMElement t= nodes.item(i); + KXMLDOMElement t= nodes.item(i); - if(t.getAttribute("Name")) + if(t.getAttribute(L"Name")) { - string Name = t.getAttribute("Name"); - if(Names=="") + xstring Name = t.getAttribute(L"Name"); + if(Names==L"") Names = Name; - else if(Names.find(Name) < 0) Names+=","+Name; + else if(Names.find(Name) < 0) Names+=L",L"+Name; } } - dw.SetItemString(dw.GetRow(),"CMPersonnel",Names); + dw.SetItemString(dw.GetRow(),L"CMPersonnel",Names); } return 1; @@ -989,64 +1010,65 @@ return 1; } - int OnItemClickExSS(ref TNotifyEvent evt,int p) + int OnItemClickExSS(TEvent* evt,int p) { - xdwtable dw = dw_MeetingsEx.FindDwTable("item",0); + xdwtable dw = dw_MeetingsEx.FindDwTable(L"item",0); - ref DWNMHDR hdr = cast(evt.pnmh as ref DWNMHDR); - string value = hdr.data; - int row = hdr.row; + DWNMHDR* hdr = (DWNMHDR*)evt->notify.pnmh; + xstring colname = hdr->colname; + xstring value = hdr->data; + int row = hdr->row; //alert(value); - xaserverarg arg=new xaserverarg; - arg.setNativePointer(arg.CreateInstance()); + xaserverarg& arg=*new xaserverarg; + - if(value == "闄勪欢涓婁紶") + if(value == L"闄勪欢涓婁紶") { - if(dw.GetGuid(dw.GetRow())=="") + if(dw.GetGuid(dw.GetRow())==L"") { - alert("淇濆瓨鍚庡湪涓婁紶锛�"); + alert(L"淇濆瓨鍚庡湪涓婁紶锛�"); return 1; } - arg.AddArg("entityid",dw.GetGuid(dw.GetRow())); - int p4=cast(arg as int) ; - OpenWindow("dev:xpage[maint.Document.Customer.v3.vx]", p4); + arg.AddArg(L"entityid",dw.GetGuid(dw.GetRow())); + + OpenWindow(L"dev:xpage[maint.Document.Customer.v3.vx]",(LPARAM)&arg); return 1; } - if(value == "浜哄憳") + if(value == L"浜哄憳") { - xaserverarg arg2 = new xaserverarg; - arg2.setNativePointer(arg2.CreateInstance()); - xaserverarg parg2 = GetParam(); - OpenWindow("dev:xpage[UserGroupPersonSelectEx.vx]",cast(arg2 as int)); + xaserverarg& arg2 = *new xaserverarg; - if(arg2.GetArgString("comdid")=="xmOk") + xaserverarg parg2 = *(xaserverarg*)GetParam(); + OpenWindow(L"dev:xpage[UserGroupPersonSelectEx.vx]", (LPARAM)&arg2); + + if(arg2.GetArgString(L"comdid")==L"xmOk") { - string data = arg2.GetArgString("data"); - xml x2 = new xml; - x2.setNativePointer(xml::CreateInstance()); - x2.LoadXml(data); - msxml::IXMLDOMNodeList nodes = x2.GetXmlDoc().selectNodes("/root/item"); - trace(x2.GetXml()); + xstring data = arg2.GetArgString(L"data"); + xml x2; - int len = nodes.length; + x2.loadXML(data); + KXMLDOMNodeList nodes = x2.selectNodes(L"/root/item"); + trace(x2.xml()); + + int len = nodes.length(); - string Names = ""; + xstring Names = L""; for(int i=0;i<len; i++) { - msxml::IXMLDOMElement t= nodes.item(i); + KXMLDOMElement t= nodes.item(i); - if(t.getAttribute("Name")) + if(t.getAttribute(L"Name")) { - string Name = t.getAttribute("Name"); - if(Names=="") + xstring Name = t.getAttribute(L"Name"); + if(Names==L"") Names = Name; - else if(Names.find(Name) < 0) Names+=","+Name; + else if(Names.find(Name) < 0) Names+=L",L"+Name; } } - dw.SetItemString(dw.GetRow(),"CMPersonnel",Names); + dw.SetItemString(dw.GetRow(),L"CMPersonnel",Names); } return 1; } @@ -1056,12 +1078,12 @@ int PostOnAttachEvent() { - AttachEvent("dw_detail","DWV_ITEMCHANGED",OnItemChanged); - //AttachEvent("tab_1","LYSN_SELECTEDSHEET",OnSelectedSheet); - AttachEvent("dw_detail","DWV_CLICKED",OnItemClick); - AttachEvent("dw_visit","DWV_CLICKED",OnItemClickEx); - AttachEvent("dw_Meetings","DWV_CLICKED",OnItemClickExS); - AttachEvent("dw_MeetingsEx","DWV_CLICKED",OnItemClickExSS); + AttachEvent(L"dw_detail",L"DWV_ITEMCHANGED", (FEvent)&maintCustomerv3::OnItemChanged); + //AttachEvent(L"tab_1",L"LYSN_SELECTEDSHEET",(FEvent)&maintCustomerv3::OnSelectedSheet); + AttachEvent(L"dw_detail",L"DWV_CLICKED", (FEvent)&maintCustomerv3::OnItemClick); + AttachEvent(L"dw_visit",L"DWV_CLICKED", (FEvent)&maintCustomerv3::OnItemClickEx); + AttachEvent(L"dw_Meetings",L"DWV_CLICKED", (FEvent)&maintCustomerv3::OnItemClickExS); + AttachEvent(L"dw_MeetingsEx",L"DWV_CLICKED", (FEvent)&maintCustomerv3::OnItemClickExSS); return 1; } @@ -1076,51 +1098,51 @@ maint::onloaded(); - m_layer = GetControl("tab_1"); - dw_detail = GetControl("dw_detail"); + m_layer = GetControl(L"tab_1"); + dw_detail = GetControl(L"dw_detail"); dw_detail.SetColHeaderHeight(16); - dw_power = GetControl("dw_power"); - dw_require =GetControl("dw_require"); - dw_jzfx = GetControl("dw_jzfx"); - dw_visit = GetControl("dw_visit"); - dw_Meetings = GetControl("dw_Meetings"); - dw_MeetingsEx = GetControl("dw_MeetingsEx"); + dw_power = GetControl(L"dw_power"); + dw_require =GetControl(L"dw_require"); + dw_jzfx = GetControl(L"dw_jzfx"); + dw_visit = GetControl(L"dw_visit"); + dw_Meetings = GetControl(L"dw_Meetings"); + dw_MeetingsEx = GetControl(L"dw_MeetingsEx"); //娣诲姞瀹㈡埛浜у搧闄勯〉 - xsheet = GetControl("tab_1"); - //string xp = "<xframe src='dev:xpage[CustomerGoodsVd.vx]' />"; + xsheet = GetControl(L"tab_1"); + //xstring xp = L"<xframe src='dev:xpage[CustomerGoodsVd.vx]' />"; /*xaserverarg arg = new xaserverarg; arg.setNativePointer(arg.CreateInstance()); - arg.AddArg("CustomerID", this.m_EntityID); - arg.AddArg("CustomerName", dw_detail.GetItemString(1,"Name")); - arg.AddArg("config", "瀹㈡埛浜у搧.vface/config/CustomerGoodsNewVd/view"); - arg.AddArg("CustomerHWND",this.GetHWND().toString()); + arg.AddArg(L"CustomerID", this.m_EntityID); + arg.AddArg(L"CustomerName", dw_detail.GetItemString(1,L"Name")); + arg.AddArg(L"config", L"瀹㈡埛浜у搧.vface/config/CustomerGoodsNewVd/view"); + arg.AddArg(L"CustomerHWND",this.GetHWND().toString()); //trace(this.m_EntityID); int p =arg.__nativept;*/ - //int nIndex = xsheet.InsertSheet(-1, "瀹㈡埛ID璐у彿搴�", xp, 0); + //int nIndex = xsheet.InsertSheet(-1, L"瀹㈡埛ID璐у彿搴�", xp, 0); //xsheet.SelectSheet(nIndex); //xsheet.SelectSheet(0); //榛樿鏀剁缉 /*xdwtable dw = new xdwtable; - dw.setNativePointer(dw_detail.FindDwTable("PartyAddress",0)); + dw.setNativePointer(dw_detail.FindDwTable(L"PartyAddress",0)); xdwtable dw1 = new xdwtable; - dw1.setNativePointer(dw_detail.FindDwTable("PartyBankAccount",0)); + dw1.setNativePointer(dw_detail.FindDwTable(L"PartyBankAccount",0)); xdwtable dw2 = new xdwtable; - dw2.setNativePointer(dw_detail.FindDwTable("PartyContact",0)); - int start=dw_detail.GetCellRowFromRowColumn(1,dw_detail.GetColumnIndex("Website")); + dw2.setNativePointer(dw_detail.FindDwTable(L"PartyContact",0)); + int start=dw_detail.GetCellRowFromRowColumn(1,dw_detail.GetColumnIndex(L"Website")); dw_detail.ExpandCellRow(start + dw2.GetRowCount() +3,start +dw2.GetRowCount()+5); - int start1=dw_detail.GetCellRowFromRowColumn(1,dw_detail.GetColumnIndex("Website")); + int start1=dw_detail.GetCellRowFromRowColumn(1,dw_detail.GetColumnIndex(L"Website")); dw_detail.ExpandCellRow(start1 + dw2.GetRowCount() +7,start1 + dw2.GetRowCount() +7 +dw.GetRowCount()); - int start2=dw_detail.GetCellRowFromRowColumn(1,dw_detail.GetColumnIndex("Website")); + int start2=dw_detail.GetCellRowFromRowColumn(1,dw_detail.GetColumnIndex(L"Website")); dw_detail.ExpandCellRow(start2 + dw2.GetRowCount() +9 +dw.GetRowCount(),start2 + dw2.GetRowCount() +9 +dw.GetRowCount() +dw1.GetRowCount()); - int start3=dw_detail.GetCellRowFromRowColumn(1,dw_detail.GetColumnIndex("YearEstablished")); + int start3=dw_detail.GetCellRowFromRowColumn(1,dw_detail.GetColumnIndex(L"YearEstablished")); dw_detail.ExpandCellRow(start3,start3 +2); - int start4=dw_detail.GetCellRowFromRowColumn(1,dw_detail.GetColumnIndex("CompanyCredit")); + int start4=dw_detail.GetCellRowFromRowColumn(1,dw_detail.GetColumnIndex(L"CompanyCredit")); dw_detail.ExpandCellRow(start4,start4 +1); */ //榛樿鏀剁缉 - xdwtable dw = dw_detail.FindDwTable("item1",0); - xdwtable dw1 = dw_detail.FindDwTable("item2",0); - xdwtable dw2 = dw_detail.FindDwTable("item3",0); + xdwtable dw = dw_detail.FindDwTable(L"item1",0); + xdwtable dw1 = dw_detail.FindDwTable(L"item2",0); + xdwtable dw2 = dw_detail.FindDwTable(L"item3",0); int m,n,k; m=dw.GetRowCount(); n=dw1.GetRowCount(); @@ -1139,7 +1161,7 @@ } //trace(dw2.GetRowCount()); - int start=dw_detail.GetCellRowFromRowColumn(1,dw_detail.GetColumnIndex("Website")); + int start=dw_detail.GetCellRowFromRowColumn(1,dw_detail.GetColumnIndex(L"Website")); dw_detail.ExpandCellRow(start +m +5,start +m+7); //trace(start +k +3); dw_detail.ExpandCellRow(start +m+9,start +m+9+n); @@ -1156,11 +1178,11 @@ OnInit(); }else { - //string userno = publiccode::getUserNo(); + //xstring userno = publiccode::getUserNo(); userno = xaserver::GetUserNo(); - if(userno !="00601" && userno !="admin" && userno !="00701") + if(userno !=L"00601" && userno !=L"admin" && userno !=L"00701") { - dw_detail.SetColumnProp("SalesPersonID","cellprotect","1"); + dw_detail.SetColumnProp(L"SalesPersonID",L"cellprotect",L"1"); } } @@ -1169,34 +1191,35 @@ if (GetParam()) { int iArgs = GetParam(); - xaserverarg args = new xaserverarg; - args.setNativePointer(iArgs); + xaserverarg& args = *new xaserverarg; + //alert(args.GetString()); - string CustomerGood = args.GetArgString("CustomerGood"); - ApplyStatus= args.GetArgString("CustomerGood"); - if(CustomerGood=="Y") + xstring CustomerGood = args.GetArgString(L"CustomerGood"); + ApplyStatus= args.GetArgString(L"CustomerGood"); + if(CustomerGood==L"Y") { xsheet.DeleteSheet(0); - string xp = "<xframe src='dev:xpage[CustomerGoodsVd.vx]' />"; - xaserverarg arg = new xaserverarg; + xstring xp = L"<xframe src='dev:xpage[CustomerGoodsVd.vx]' />"; + xaserverarg& arg = *new xaserverarg; arg.setNativePointer(arg.CreateInstance()); - arg.AddArg("CustomerID", this.m_EntityID); - arg.AddArg("FROM", "Customer"); - arg.AddArg("CustomerName", dw_detail.GetItemString(1,"Name")); - arg.AddArg("config", "瀹㈡埛浜у搧.vface/config/CustomerGoodsVdVd/view"); - arg.AddArg("CustomerHWND",this.GetHWND().toString()); - int p1 =arg.ptr_native_; - int nIndex = xsheet.InsertSheet(-1, "瀹㈡埛ID璐у彿搴�", xp, p1); + arg.AddArg(L"CustomerID", m_EntityID); + arg.AddArg(L"FROM", L"Customer"); + arg.AddArg(L"CustomerName", dw_detail.GetItemString(1,L"Name")); + arg.AddArg(L"config", L"瀹㈡埛浜у搧.vface/config/CustomerGoodsVdVd/view"); + //arg.AddArg(L"CustomerHWND",GetHWND().toString()); + arg.SetParam(L"CustomerHWND", (LPARAM)GetHWND()); + + int nIndex = xsheet.InsertSheet(-1, L"瀹㈡埛ID璐у彿搴�", xp, (void*)&arg); xsheet.SelectSheet(nIndex); //xsheet.SetSheetState(0, 0); } - ApplyStatus=dw_detail.GetItemString(1,"ApplyStatus"); + ApplyStatus=dw_detail.GetItemString(1,L"ApplyStatus"); - if(userno !="00601" && userno !="admin" && userno !="00701") + if(userno !=L"00601" && userno !=L"admin" && userno !=L"00701") { - if(ApplyStatus =="璐㈠姟宸插鏍�") + if(ApplyStatus ==L"璐㈠姟宸插鏍�") { dw_detail.SetReadOnly(true); } diff --git a/jrj/project/business/Supplier.maint.cpp b/jrj/project/business/Supplier.maint.cpp index e28eaf6..8223aba 100644 --- a/jrj/project/business/Supplier.maint.cpp +++ b/jrj/project/business/Supplier.maint.cpp @@ -1,5 +1,16 @@ -class maintSupplierv3 : public maint +#include <wobject/xstring.hpp> +#include <xcontrol/xtreeview.hpp> +#include <xcontrol/xdwgrid.hpp> +#include <xcontrol/xlayersheet.hpp> + + +#include "vbusiness/vframe/maint.vframe.vbusiness.hpp" +#include "viewobject/view.base.hpp" + +using xml = KXMLDOMDocument; +class __declspec(dllexport) maintSupplierv3 : public maint { +public: xdwtable dw_base; xdwtable dw_kpinfo; xdwtable dw_visitp; -- Gitblit v1.9.3