| | |
| | | class Enquiry3list : public listwin |
| | | #include <wobject/xstring.hpp> |
| | | #include <xcontrol/xtreeview.hpp> |
| | | #include <xcontrol/xdwgrid.hpp> |
| | | |
| | | #include "vbusiness/vframe/listwin.vframe.vbusiness.hpp" |
| | | #include "viewobject/view.base.hpp" |
| | | |
| | | using xml = KXMLDOMDocument; |
| | | class __declspec(dllexport) Enquiry3list : public listwin |
| | | { |
| | | string m_sType; //树选中的类型 |
| | | string m_sTypeTxt; //树选中的数据 |
| | | string urlTree; |
| | | string myDataUrl; |
| | | string myDataUrl1; |
| | | |
| | | public: |
| | | Enquiry3list(void* implPtr, HWND hWnd) :listwin(implPtr, hWnd) {} |
| | | public: |
| | | static Enquiry3list* CreateInstance(void* implPtr, void* hWnd) |
| | | { |
| | | Enquiry3list* pWin = new Enquiry3list(implPtr, (HWND)hWnd); |
| | | return pWin; |
| | | } |
| | | |
| | | public: |
| | | xstring m_sType; //树选中的类型 |
| | | xstring m_sTypeTxt; //树选中的数据 |
| | | xstring urlTree; |
| | | xstring myDataUrl; |
| | | xstring myDataUrl1; |
| | | xcombobox ddlb_1; |
| | | |
| | | xtreeview tv_folder; |
| | |
| | | int changeddlb; |
| | | int state1; |
| | | int state2; |
| | | string sheetname; |
| | | xstring sheetname; |
| | | xnode m_agentNode; |
| | | |
| | | int SetAgentEx() |
| | | { |
| | | string xfNodeAgentArea = "agentarea"; |
| | | xstring xfNodeAgentArea = L"agentarea"; |
| | | xnode anode = GetAgentNode(xfNodeAgentArea); |
| | | /*if(m_agentNode) |
| | | { |
| | |
| | | } |
| | | else |
| | | {*/ |
| | | msxml::IXMLDOMElement xframeElement = GetElement(); |
| | | msxml::IXMLDOMElement agent = xframeElement.selectSingleNode("agent/"+xfNodeAgentArea+"[@id='"+sheetname+"']/*"); |
| | | KXMLDOMElement xframeElement = GetElement(); |
| | | KXMLDOMElement agent = xframeElement.selectSingleNode(L"agent/"+xfNodeAgentArea+L"[@id='"+sheetname+L"']/*"); |
| | | if(agent) |
| | | { |
| | | string s = agent.xml; |
| | | xstring s = agent.xml(); |
| | | m_agentNode = SetAgentNodeContent (anode,s); |
| | | } |
| | | //} |
| | | return 1; |
| | | } |
| | | |
| | | int SetAgent1(string scene, string EntityID) |
| | | int SetAgent1(xstring scene, xstring EntityID) |
| | | { |
| | | string xfNodeAgentArea = "agentarea"; |
| | | xstring xfNodeAgentArea = L"agentarea"; |
| | | xnode anode = GetAgentNode(xfNodeAgentArea); |
| | | msxml::IXMLDOMElement xframeElement = GetElement(); |
| | | msxml::IXMLDOMNode agent = xframeElement.selectSingleNode("agent/"+xfNodeAgentArea+"[1]/*"); |
| | | KXMLDOMElement xframeElement = GetElement(); |
| | | KXMLDOMNode agent = xframeElement.selectSingleNode(L"agent/"+xfNodeAgentArea+L"[1]/*"); |
| | | |
| | | xml x = new xml; |
| | | x.setNativePointer(xml::CreateInstance()); |
| | | xaserverarg arg = new xaserverarg; |
| | | xml x ; |
| | | |
| | | xaserverarg& arg = *new xaserverarg; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | arg.AddArg("scene",scene,"xs:string"); |
| | | arg.AddArg("EntityID",EntityID,"xs:string"); |
| | | arg.AddArg("EntityName",GetEntityName(1),"xs:string"); |
| | | arg.AddArg(L"scene",scene,L"xs:xstring"); |
| | | arg.AddArg(L"EntityID",EntityID,L"xs:xstring"); |
| | | arg.AddArg(L"EntityName",GetEntityName(1),L"xs:xstring"); |
| | | |
| | | url::get("/workflow/query/datarole/"+GetEntityName(1),arg.GetString(),x); |
| | | xurl::get(L"/workflow/query/datarole/"+GetEntityName(1),arg.GetString(),x); |
| | | |
| | | SetObjectInfo(x.GetXmlDoc().documentElement); |
| | | SetObjectInfo(x.documentElement()); |
| | | |
| | | string sNodes; |
| | | sNodes = "datarole/actions/action[contains(@scene,'"+ scene + "')]"; |
| | | msxml::IXMLDOMNodeList nlist = x.GetXmlDoc().SelectNodes(sNodes); |
| | | xstring sNodes; |
| | | sNodes = L"datarole/actions/action[contains(@scene,'"+ scene + L"')]"; |
| | | KXMLDOMNodeList nlist = x.selectNodes(sNodes); |
| | | int index; |
| | | int nlen = nlist.length; |
| | | msxml::IXMLDOMElement ele; |
| | | int nlen = nlist.length(); |
| | | KXMLDOMElement ele; |
| | | |
| | | string tools="<vbox class=''>"; |
| | | if(scene=="list") tools +="<xspace height='12'/>"; |
| | | xstring tools=L"<vbox class=''>"; |
| | | if(scene==L"list") tools +=L"<xspace height='12'/>"; |
| | | |
| | | for(index=0;index<nlen;index++) |
| | | { |
| | | ele = nlist.item(index); |
| | | string name = ele.selectSingleNode("@id").text;//.getAttribute("id"); |
| | | string label = ele.selectSingleNode("@caption").text;//ele.getAttribute("caption"); |
| | | string image; |
| | | string src = ""; |
| | | if(ele.selectSingleNode("@image")) |
| | | image = ele.selectSingleNode("@image").text; |
| | | xstring name = ele.selectSingleNode(L"@id").text();//.getAttribute(L"id"); |
| | | xstring label = ele.selectSingleNode(L"@caption").text();//ele.getAttribute(L"caption"); |
| | | xstring image; |
| | | xstring src = L""; |
| | | if(ele.selectSingleNode(L"@image")) |
| | | image = ele.selectSingleNode(L"@image").text(); |
| | | else |
| | | image = "0 22"; |
| | | image = L"0 22"; |
| | | |
| | | if(ele.selectSingleNode("@src")) |
| | | src = ele.selectSingleNode("@src").text; |
| | | if(ele.selectSingleNode(L"@src")) |
| | | src = ele.selectSingleNode(L"@src").text(); |
| | | |
| | | string tool; |
| | | xstring tool; |
| | | |
| | | if (src != "") |
| | | tool = "<xtoolbutton src='"+src+"' caption='"+label+"' name='action:"+name+"' height='23' style='background-color:none #ceecce none #ffffff'/>"; |
| | | if (src != L"") |
| | | tool = L"<xtoolbutton src='"+src+L"' caption='"+label+L"' name='action:"+name+L"' height='23' style='background-color:none #ceecce none #ffffff'/>"; |
| | | else |
| | | tool = "<xtoolbutton image='"+image+"' caption='"+label+"' name='action:"+name+"' height='23' style='background-color:none #ceecce none #ffffff'/>"; |
| | | tool = L"<xtoolbutton image='"+image+L"' caption='"+label+L"' name='action:"+name+L"' height='23' style='background-color:none #ceecce none #ffffff'/>"; |
| | | tools += tool; |
| | | } |
| | | /*if(agent) |
| | | { |
| | | nlist = agent.SelectNodes(".//xtoolbutton"); |
| | | nlen = nlist.length; |
| | | nlist = agent.selectNodes(L".//xtoolbutton"); |
| | | nlen = nlist.length(); |
| | | for(index=0;index<nlen;index++) |
| | | { |
| | | ele = nlist.item(index); |
| | | string tmp = ele.xml; |
| | | xstring tmp = ele.xml; |
| | | tools += tmp; |
| | | } |
| | | }*/ |
| | | tools +="</vbox>"; |
| | | tools +=L"</vbox>"; |
| | | //trace(tools); |
| | | SetAgentNodeContent(anode, tools); |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | int SetAgent(string scene, string EntityID) |
| | | int SetAgent(xstring scene, xstring EntityID) |
| | | { |
| | | if(sheetname !="tab_pricebill" && sheetname !="tab_pricebillex" && sheetname !="tab_pricebillshare" && sheetname !="tab_list2") |
| | | if(sheetname !=L"tab_pricebill" && sheetname !=L"tab_pricebillex" && sheetname !=L"tab_pricebillshare" && sheetname !=L"tab_list2") |
| | | SetAgent1(scene,EntityID); |
| | | else |
| | | SetAgentEx(); |
| | |
| | | |
| | | //process tree |
| | | //查找当前树项的顶级目录 |
| | | int LookupTopFolder(xtreeview tv_folder, int hItem) |
| | | HTREEITEM LookupTopFolder(HTREEITEM hItem) |
| | | { |
| | | int hRoot = tv_folder.GetRootItem(); |
| | | while(tv_folder.GetParentItem(hItem)) hItem = tv_folder.GetParentItem(hItem); |
| | | HTREEITEM hRoot = tv_folder.GetRootItem(); |
| | | while (tv_folder.GetParentItem(hItem)) hItem = tv_folder.GetParentItem(hItem); |
| | | return hItem; |
| | | } |
| | | |
| | | int ExpandCatChildFolder(xtreeview tv_folder, int hItem, msxml::IXMLDOMElement ele ,int image) |
| | | |
| | | int ExpandCatChildFolder(xtreeview tv_folder, HTREEITEM hItem, KXMLDOMElement ele ,int image) |
| | | { |
| | | msxml::IXMLDOMNodeList nlist = ele.SelectNodes("item"); |
| | | int len = nlist.length; |
| | | KXMLDOMNodeList nlist = ele.selectNodes(L"item"); |
| | | int len = nlist.length(); |
| | | if(len > 0) tv_folder.SetItemChild(hItem,1); |
| | | for (int i= 0; i < len; i++) |
| | | { |
| | | msxml::IXMLDOMElement e = nlist.item(i); |
| | | string name = e.getAttribute("name"); |
| | | int h = tv_folder.InsertChildItem(hItem,name, trust(e as int),image); |
| | | KXMLDOMElement e = nlist.item(i); |
| | | xstring name = e.getAttribute(L"name"); |
| | | HTREEITEM h = tv_folder.InsertChildItem(hItem, name, (LPARAM)&e, image); |
| | | ExpandCatChildFolder(tv_folder,h,e,35); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | int ExpandFolderItem(xtreeview tv_folder, int hItem,string no) |
| | | int ExpandFolderItem(xtreeview tv_folder, HTREEITEM hItem,xstring no) |
| | | { |
| | | xml x = ViewObject::RetrieveData(urlTree,"no",no); |
| | | //if(x) alert(x.GetXml()); |
| | | KXMLDOMDocument x = ViewObject::RetrieveData(urlTree,L"no",no); |
| | | //if(x) alert(x.xml()); |
| | | if(!x) return 0; |
| | | msxml::IXMLDOMNodeList nlist = x.GetXmlDoc().SelectNodes("/data/item"); |
| | | int len = nlist.length; |
| | | KXMLDOMNodeList nlist = x.selectNodes(L"/data/item"); |
| | | int len = nlist.length(); |
| | | for (int i = 0; i < len; i++) |
| | | { |
| | | msxml::IXMLDOMElement e = nlist.item(i); |
| | | string name = e.getAttribute("name"); |
| | | int h = tv_folder.InsertChildItem(hItem,name, trust(e as int),35); |
| | | KXMLDOMElement e = nlist.item(i); |
| | | xstring name = e.getAttribute(L"name"); |
| | | HTREEITEM h = tv_folder.InsertChildItem(hItem, name, (LPARAM)&e,35); |
| | | ExpandCatChildFolder(tv_folder,h,e,35); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | //树展开 |
| | | int OnTreeExpanding(ref TNotifyEvent evt,int p) |
| | | int OnTreeExpanding(TEvent* evt, int p) |
| | | { |
| | | ref NMTREEVIEW nmtv = evt.pnmh; |
| | | int hItem = nmtv.itemNew.hItem; |
| | | int hTopItem = LookupTopFolder(tv_folder,hItem); |
| | | string name = tv_folder.GetItemLabel(hTopItem); |
| | | int child = tv_folder.GetChildItem(hItem); |
| | | NMTREEVIEW& nmtv = *(NMTREEVIEW*)evt->notify.pnmh; |
| | | HTREEITEM hItem = nmtv.itemNew.hItem; |
| | | HTREEITEM hTopItem = LookupTopFolder(hItem); |
| | | xstring name = tv_folder.GetItemLabel(hTopItem); |
| | | HTREEITEM child = tv_folder.GetChildItem(hItem); |
| | | |
| | | msxml::IXMLDOMElement e = tv_folder.GetItemData(hItem); |
| | | if(!child)ExpandFolderItem(tv_folder,hItem, e.getAttribute("no")); |
| | | KXMLDOMElement& e = *(KXMLDOMElement*)tv_folder.GetItemData(hItem); |
| | | if (!child)ExpandFolderItem(tv_folder,hItem,e.getAttribute(L"no")); |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | int OnPriceBillTreeExpanding(ref TNotifyEvent evt,int p) |
| | | int OnPriceBillTreeExpanding(TEvent* evt, int p) |
| | | { |
| | | ref NMTREEVIEW nmtv = evt.pnmh; |
| | | int hItem = nmtv.itemNew.hItem; |
| | | int hTopItem = LookupTopFolder(tv_folder_pricebill,hItem); |
| | | string name = tv_folder_pricebill.GetItemLabel(hTopItem); |
| | | int child = tv_folder_pricebill.GetChildItem(hItem); |
| | | |
| | | msxml::IXMLDOMElement e = tv_folder_pricebill.GetItemData(hItem); |
| | | if(!child)ExpandFolderItem(tv_folder_pricebill,hItem, e.getAttribute("no")); |
| | | NMTREEVIEW& nmtv = *(NMTREEVIEW*)evt->notify.pnmh; |
| | | HTREEITEM hItem = nmtv.itemNew.hItem; |
| | | HTREEITEM hTopItem = LookupTopFolder(hItem); |
| | | xstring name = tv_folder_pricebill.GetItemLabel(hTopItem); |
| | | HTREEITEM child = tv_folder_pricebill.GetChildItem(hItem); |
| | | |
| | | KXMLDOMElement& e = *(KXMLDOMElement*)tv_folder_pricebill.GetItemData(hItem); |
| | | if (!child)ExpandFolderItem(tv_folder_pricebill,hItem,e.getAttribute(L"no")); |
| | | |
| | | return 1; |
| | | |
| | | } |
| | | |
| | | int ExpandChildFolder(xtreeview tv_folder, int hItem, msxml::IXMLDOMElement pElement) |
| | | int ExpandChildFolder(xtreeview tv_folder, HTREEITEM hItem, KXMLDOMElement pElement) |
| | | { |
| | | msxml::IXMLDOMNodeList nlist = pElement.SelectNodes("Item"); |
| | | int len = nlist.length; |
| | | KXMLDOMNodeList nlist = pElement.selectNodes(L"Item"); |
| | | int len = nlist.length(); |
| | | for (int i = 0; i < len; i++) |
| | | { |
| | | msxml::IXMLDOMElement e = nlist.item(i); |
| | | string name = e.getAttribute("name"); |
| | | string sImage = e.getAttribute("image"); |
| | | string child = e.getAttribute("child"); |
| | | KXMLDOMElement e = nlist.item(i); |
| | | xstring name = e.getAttribute(L"name"); |
| | | xstring sImage = e.getAttribute(L"image"); |
| | | xstring child = e.getAttribute(L"child"); |
| | | int image = 15; |
| | | if(sImage) image = sImage.toInt(); |
| | | int h= tv_folder.InsertChildItem(tv_folder.GetId(),hItem,name, trust(e as int),image); |
| | | if(child !="no" ) tv_folder.SetItemChild(h,1); |
| | | |
| | | HTREEITEM h = tv_folder.InsertChildItem(hItem, name, (LPARAM)&e, image); |
| | | if(child !=L"no" ) tv_folder.SetItemChild(h,1); |
| | | ExpandChildFolder(tv_folder,h,e); |
| | | } |
| | | return 1; |
| | |
| | | |
| | | int InitialFolder() |
| | | { |
| | | msxml::IXMLDOMElement xframeElement = GetElement(); |
| | | msxml::IXMLDOMElement e = xframeElement.selectSingleNode("//xtree[@name='tv_folder']/initial"); |
| | | KXMLDOMElement xframeElement = GetElement(); |
| | | KXMLDOMElement e = xframeElement.selectSingleNode(L"//xtree[@name='tv_folder']/initial"); |
| | | if(e)ExpandChildFolder(tv_folder, 0,e); |
| | | return 1; |
| | | } |
| | | int InitialFolderPriceBill() |
| | | { |
| | | msxml::IXMLDOMElement xframeElement = GetElement(); |
| | | msxml::IXMLDOMElement e = xframeElement.selectSingleNode("//xtree[@name='tv_folder_pricebill']/initial"); |
| | | KXMLDOMElement xframeElement = GetElement(); |
| | | KXMLDOMElement e = xframeElement.selectSingleNode(L"//xtree[@name='tv_folder_pricebill']/initial"); |
| | | if(e)ExpandChildFolder(tv_folder_pricebill,0,e); |
| | | return 1; |
| | | } |
| | | |
| | | int OnTreeSelChanged(ref TNotifyEvent evt,int p) |
| | | int OnTreeSelChanged(TEvent* evt, int p) |
| | | { |
| | | //OnPriceBillRetrieve(); |
| | | //OnProductPriceBillRetrieve(); |
| | | return OnPreRetrieve(); |
| | | } |
| | | |
| | | int OnPriceBillTreeSelChanged(ref TNotifyEvent evt,int p) |
| | | int OnPriceBillTreeSelChanged(TEvent* evt, int p) |
| | | { |
| | | OnPriceBillRetrieve(); |
| | | OnProductPriceBillRetrieve(); |
| | |
| | | { |
| | | dw_pricelistshare.AcceptText(); |
| | | |
| | | xml x = new xml; |
| | | x.setNativePointer(xml::CreateInstance()); |
| | | xaserverarg arg = new xaserverarg; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | dw_pricelistshare.DwUpdateAllToEx(x.GetXmlDoc()); |
| | | xml x ; |
| | | |
| | | arg.AddArg("content", x.GetXml() ); |
| | | if(url::get("/sale/data/UserGroup/update/entity", arg.GetString(),x)!=1) |
| | | xaserverarg arg; |
| | | |
| | | dw_pricelistshare.DwUpdateAllToEx(x); |
| | | |
| | | arg.AddArg(L"content", x.xml() ); |
| | | if(xurl::get(L"/sale/data/UserGroup/update/entity", arg.GetString(),x)!=1) |
| | | { |
| | | string error = x.GetXmlDoc().text; |
| | | alert("err:"+error); |
| | | xstring error = x.text(); |
| | | alert(L"err:"+error); |
| | | return 1; |
| | | }else |
| | | { |
| | | string str = x.GetXmlDoc().documentElement.getAttribute("text"); |
| | | if(str == "true") |
| | | xstring str = x.documentElement().getAttribute(L"text"); |
| | | if(str == L"true") |
| | | { |
| | | alert("保存成功!"); |
| | | alert(L"保存成功!"); |
| | | dw_pricelistshare.ResetUpdateStatus(); |
| | | }else |
| | | { |
| | | alert("保存失败!"); |
| | | alert(L"保存失败!"); |
| | | } |
| | | } |
| | | if(x) x.Free(); |
| | | |
| | | return 1; |
| | | } |
| | | int Send(string PersonID, string CName,string NO,string EntityID) |
| | | int Send(xstring PersonID, xstring CName,xstring NO,xstring EntityID) |
| | | { |
| | | xml x = ViewObject::RetrieveData("/sale/data/business/message/getUserNO","PersonID",PersonID); |
| | | msxml::IXMLDOMNodeList nlist = x.GetXmlDoc().SelectNodes("//data/Item"); |
| | | msxml::IXMLDOMElement xitem = nlist.item(0); |
| | | KXMLDOMDocument x = ViewObject::RetrieveData(L"/sale/data/business/message/getUserNO",L"PersonID",PersonID); |
| | | KXMLDOMNodeList nlist = x.selectNodes(L"//data/Item"); |
| | | KXMLDOMElement xitem = nlist.item(0); |
| | | |
| | | string Reciever = xitem.selectSingleNode("userno").text; |
| | | string Subject = "价格单已共享["+CName+"]"; |
| | | string Category = "价格单共享"; |
| | | string Content = ""; |
| | | x = ViewObject::AddMessage(Category,Reciever, NO, EntityID, Subject, Content); |
| | | xstring Reciever = xitem.selectSingleNode(L"userno").text(); |
| | | xstring Subject = L"价格单已共享["+CName+L"]"; |
| | | xstring Category = L"价格单共享"; |
| | | xstring Content = L""; |
| | | KXMLDOMDocument x = ViewObject::AddMessage(Category, Reciever, NO, EntityID, Subject, Content); |
| | | return 1; |
| | | } |
| | | int SendNotice(xml content) |
| | | { |
| | | |
| | | msxml::IXMLDOMNodeList nlist = content.GetXmlDoc().SelectNodes("//root/item[@update.new='1']"); |
| | | int leng = nlist.length; |
| | | KXMLDOMNodeList nlist = content.selectNodes(L"//root/item[@update.new='1']"); |
| | | int leng = nlist.length(); |
| | | for(int i = 0; i < leng; i++) |
| | | { |
| | | msxml::IXMLDOMElement xitem = nlist.item(i); |
| | | string PersonID = xitem.selectSingleNode("PersonID").text; |
| | | string UserGroupID = xitem.selectSingleNode("UserGroupID").text; |
| | | string CName = xitem.selectSingleNode("CName").text; |
| | | string NO = xitem.selectSingleNode("NO").text; |
| | | string EntityID = xitem.selectSingleNode("EntityID").text; |
| | | if(PersonID != "") |
| | | KXMLDOMElement xitem = nlist.item(i); |
| | | xstring PersonID = xitem.selectSingleNode(L"PersonID").text(); |
| | | xstring UserGroupID = xitem.selectSingleNode(L"UserGroupID").text(); |
| | | xstring CName = xitem.selectSingleNode(L"CName").text(); |
| | | xstring NO = xitem.selectSingleNode(L"NO").text(); |
| | | xstring EntityID = xitem.selectSingleNode(L"EntityID").text(); |
| | | if(PersonID != L"") |
| | | { |
| | | Send(PersonID,CName,NO,EntityID); |
| | | } |
| | | if(UserGroupID != "") |
| | | if(UserGroupID != L"") |
| | | { |
| | | xml x = ViewObject::RetrieveData("/sale/data/business/message/getPersonIDByGroup","UserGroupID",UserGroupID); |
| | | msxml::IXMLDOMNodeList nlist1 = x.GetXmlDoc().SelectNodes("//data/Item"); |
| | | for(int j = 0 ; j < nlist1.length ; j++) |
| | | xml x = ViewObject::RetrieveData(L"/sale/data/business/message/getPersonIDByGroup",L"UserGroupID",UserGroupID); |
| | | KXMLDOMNodeList nlist1 = x.selectNodes(L"//data/Item"); |
| | | for(int j = 0 ; j < nlist1.length() ; j++) |
| | | { |
| | | msxml::IXMLDOMElement xitem1 = nlist1.item(j); |
| | | PersonID = xitem1.selectSingleNode("PersonID").text; |
| | | KXMLDOMElement xitem1 = nlist1.item(j); |
| | | PersonID = xitem1.selectSingleNode(L"PersonID").text(); |
| | | Send(PersonID,CName,NO,EntityID); |
| | | } |
| | | |
| | |
| | | |
| | | int OnSave() |
| | | { |
| | | xstring error = L""; |
| | | xstring str = L""; |
| | | |
| | | dw_pricelist.AcceptText(); |
| | | dw_pricelistex.AcceptText(); |
| | | dw_pricelistshare.AcceptText(); |
| | | |
| | | xml x = new xml; |
| | | x.setNativePointer(xml::CreateInstance()); |
| | | xaserverarg arg = new xaserverarg; |
| | | xml x ; |
| | | |
| | | xaserverarg arg ; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | |
| | | dw_pricelistex.DwUpdateAllToEx(x.GetXmlDoc()); |
| | | if(x.GetXml()!="") |
| | | dw_pricelistex.DwUpdateAllToEx(x); |
| | | if(x.xml()!=L"") |
| | | { |
| | | string error = ""; |
| | | string str = ""; |
| | | arg.AddArg("content", x.GetXml()); |
| | | if(url::get("/sale/data/Enquiry/update/pricelistex", arg.GetString(),x)!=1) |
| | | |
| | | arg.AddArg(L"content", x.xml()); |
| | | if(xurl::get(L"/sale/data/Enquiry/update/pricelistex", arg.GetString(),x)!=1) |
| | | { |
| | | error = x.GetXmlDoc().text; |
| | | error = x.text(); |
| | | alert(error); |
| | | return 1; |
| | | } |
| | | else |
| | | { |
| | | str = x.GetXmlDoc().documentElement.getAttribute("text"); |
| | | if(str == "true") |
| | | str = x.documentElement().getAttribute(L"text"); |
| | | if(str == L"true") |
| | | { |
| | | dw_pricelistex.ResetUpdateStatus(); |
| | | }else |
| | | { |
| | | alert("成品价格单保存失败!"); |
| | | alert(L"成品价格单保存失败!"); |
| | | return 1; |
| | | } |
| | | } |
| | | |
| | | xml x0 = new xml; |
| | | x0.setNativePointer(xml::CreateInstance()); |
| | | dw_pricelist.DwUpdateAllToEx(x0.GetXmlDoc()); |
| | | if(x0.GetXml() !="") |
| | | xml x0 ; |
| | | |
| | | dw_pricelist.DwUpdateAllToEx(x0); |
| | | if(x0.xml() !=L"") |
| | | { |
| | | xml x1 = xml::Make(); |
| | | dw_priceitem.DwUpdateAllToEx(x1.GetXmlDoc()); |
| | | if(x0.GetXmlDoc().documentElement) |
| | | dw_priceitem.DwUpdateAllToEx(x1); |
| | | if(x0.documentElement()) |
| | | { |
| | | if(x1.GetXmlDoc().documentElement) |
| | | x0.GetXmlDoc().documentElement.appendChild(x1.GetXmlDoc().documentElement); |
| | | if(x1.documentElement()) |
| | | x0.documentElement().appendChild(x1.documentElement()); |
| | | } |
| | | x1.Free(); |
| | | arg.AddArg("content", x0.GetXml() ); |
| | | arg.AddArg(L"content", x0.xml() ); |
| | | x0.Free(); |
| | | if(url::get("/sale/data/Enquiry/update/pricelist", arg.GetString(),x)!=1) |
| | | if(xurl::get(L"/sale/data/Enquiry/update/pricelist", arg.GetString(),x)!=1) |
| | | { |
| | | error = x.GetXmlDoc().text; |
| | | error = x.text(); |
| | | alert(error); |
| | | return 1; |
| | | } |
| | | else |
| | | { |
| | | str = x.GetXmlDoc().documentElement.getAttribute("text"); |
| | | if(str == "true") |
| | | str = x.documentElement().getAttribute(L"text"); |
| | | if(str == L"true") |
| | | { |
| | | dw_pricelist.ResetUpdateStatus(); |
| | | dw_priceitem.ResetUpdateStatus(); |
| | | }else |
| | | { |
| | | alert("组件价格单保存失败!"); |
| | | alert(L"组件价格单保存失败!"); |
| | | return 1; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | xml x2 = new xml; |
| | | x2.setNativePointer(xml::CreateInstance()); |
| | | dw_pricelistshare.DwUpdateAllToEx(x2.GetXmlDoc()); |
| | | arg.AddArg("content", x2.GetXml()); |
| | | if(url::get("/sale/data/UserGroup/update/entity", arg.GetString(),x)!=1) |
| | | xml x2; |
| | | |
| | | dw_pricelistshare.DwUpdateAllToEx(x2); |
| | | arg.AddArg(L"content", x2.xml()); |
| | | if(xurl::get(L"/sale/data/UserGroup/update/entity", arg.GetString(),x)!=1) |
| | | { |
| | | error = x.GetXmlDoc().text; |
| | | alert("err:"+error); |
| | | error = x.text(); |
| | | alert(L"err:"+error); |
| | | return 1; |
| | | }else |
| | | { |
| | | str = x.GetXmlDoc().documentElement.getAttribute("text"); |
| | | if(str == "true") |
| | | str = x.documentElement().getAttribute(L"text"); |
| | | if(str == L"true") |
| | | { |
| | | dw_pricelistshare.ResetUpdateStatus(); |
| | | alert("保存成功!"); |
| | | alert(L"保存成功!"); |
| | | OnProductPriceShareRetrieve();//刷新数据 |
| | | SendNotice(x2);//发送通知 |
| | | x2.Free(); |
| | | }else |
| | | { |
| | | alert("共享数据保存失败!"); |
| | | alert(L"共享数据保存失败!"); |
| | | } |
| | | } |
| | | x.Free(); |
| | |
| | | return 1; |
| | | } |
| | | |
| | | int ViewUpdate(int pr,string updateItem,xaserverarg arg) |
| | | int ViewUpdate(int pr,xstring updateItem,xaserverarg arg) |
| | | { |
| | | if( updateItem=="del") |
| | | if( updateItem==L"del") |
| | | { |
| | | int DelRow = dw_list.GetRow(); |
| | | dw_list.DeleteRow(DelRow); |
| | | } |
| | | else if( updateItem=="setstate") |
| | | else if( updateItem==L"setstate") |
| | | { |
| | | int row = this.dw_list.GetRow(); |
| | | int row = dw_list.GetRow(); |
| | | if (row < 1) return 1; |
| | | msxml::IXMLDOMElement ele = this.dw_list.GetRowElement(row); |
| | | string id = GetEntityIDName(1); |
| | | string entity = ele.selectSingleNode(id).text; |
| | | KXMLDOMElement ele = dw_list.GetRowElement(row); |
| | | xstring id = GetEntityIDName(1); |
| | | xstring entity = ele.selectSingleNode(id).text(); |
| | | //trace(entity); |
| | | SetAgent("list", entity); |
| | | if(arg.GetArgString("state") != "") |
| | | //this.dw_list.SetItemString(row, "ApprovalStatus", arg.GetArgString("state")); |
| | | dw_list.SetItemString(row, "ApplyStatus", arg.GetArgString("state")); |
| | | if(arg.GetArgString("billstatus") != "") |
| | | SetAgent(L"list", entity); |
| | | if(arg.GetArgString(L"state") != L"") |
| | | //dw_list.SetItemString(row, L"ApprovalStatus", arg.GetArgString(L"state")); |
| | | dw_list.SetItemString(row, L"ApplyStatus", arg.GetArgString(L"state")); |
| | | if(arg.GetArgString(L"billstatus") != L"") |
| | | { |
| | | string billstatus = arg.GetArgString("billstatus"); |
| | | string statusName = GetBillStatusName(billstatus); |
| | | dw_list.SetItemString(row, "ApprovalStatus", billstatus); |
| | | dw_list.SetItemDisplayString(row, "ApprovalStatus", statusName); |
| | | xstring billstatus = arg.GetArgString(L"billstatus"); |
| | | xstring statusName = GetBillStatusName(billstatus); |
| | | dw_list.SetItemString(row, L"ApprovalStatus", billstatus); |
| | | dw_list.SetItemDisplayString(row, L"ApprovalStatus", statusName); |
| | | } |
| | | |
| | | this.dw_list.Redraw(); |
| | | dw_list.Redraw(); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | bool IsEmptyQueryStr(string queryStr) |
| | | bool IsEmptyQueryStr(xstring queryStr) |
| | | { |
| | | if(queryStr=="") return true; |
| | | if(queryStr=="<items join='and'/>") return true; |
| | | if(queryStr=="<items join=\"and\"/>") return true; |
| | | if(queryStr==L"") return true; |
| | | if(queryStr==L"<items join='and'/>") return true; |
| | | if(queryStr==L"<items join=\"and\"/>") return true; |
| | | return false; |
| | | } |
| | | |
| | |
| | | if(hItem <=0) return 1; |
| | | |
| | | int hCursor = xutil::SetCursorWait(); |
| | | msxml::IXMLDOMElement e1 = cast(tv_folder.GetItemData(hItem) as msxml::IXMLDOMElement); |
| | | string no = e1.getAttribute("no"); |
| | | KXMLDOMElement e1 = cast(tv_folder.GetItemData(hItem) as KXMLDOMElement); |
| | | xstring no = e1.getAttribute(L"no"); |
| | | xml x = 0; |
| | | if(!(no =="Category:All" && IsEmptyQueryStr(m_QueryTxt))) |
| | | x = ViewObject::RetrieveData(myDataUrl,"no",no,"QueryTxt", m_QueryTxt); |
| | | if(!(no ==L"Category:All" && IsEmptyQueryStr(m_QueryTxt))) |
| | | x = ViewObject::RetrieveData(myDataUrl,L"no",no,L"QueryTxt", m_QueryTxt); |
| | | if(x) |
| | | { |
| | | dw_list.Retrieve(x); |
| | |
| | | dw_goods.Redraw(); |
| | | } |
| | | |
| | | if(!(no =="Category:All" && IsEmptyQueryStr(m_QueryTxt))) |
| | | x = ViewObject::RetrieveData("/sale/data/Enquiry/folder/list2","no",no,"QueryTxt", m_QueryTxt); |
| | | if(!(no ==L"Category:All" && IsEmptyQueryStr(m_QueryTxt))) |
| | | x = ViewObject::RetrieveData(L"/sale/data/Enquiry/folder/list2",L"no",no,L"QueryTxt", m_QueryTxt); |
| | | if(x) |
| | | { |
| | | dw_list2.Retrieve(x); |
| | |
| | | dw_goods1.ResetEx(); |
| | | dw_goods1.Redraw(); |
| | | } |
| | | x = ViewObject::RetrieveData(myDataUrl1,"no",no,"QueryTxt", m_QueryTxt); |
| | | x = ViewObject::RetrieveData(myDataUrl1,L"no",no,L"QueryTxt", m_QueryTxt); |
| | | if(x) |
| | | { |
| | | dw_list1.Retrieve(x); |
| | |
| | | int row = dw_list.GetNextSelectRow(1); |
| | | if(row>0) |
| | | { |
| | | msxml::IXMLDOMElement e =dw_list.GetRowElement(row); |
| | | KXMLDOMElement e =dw_list.GetRowElement(row); |
| | | xaserverarg arg=new xaserverarg; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | string sCustomerID = e.selectSingleNode("CustomerID").text; |
| | | arg.AddArg("CustomerID",sCustomerID,""); |
| | | string sCustomerName = e.selectSingleNode("CustomerName").text; |
| | | arg.AddArg("CustomerName",sCustomerName,""); |
| | | arg.AddArg("EntityName",GetEntityName(1),""); |
| | | arg.AddArg("EntityID",GetEntityID(1),""); |
| | | xstring sCustomerID = e.selectSingleNode(L"CustomerID").text(); |
| | | arg.AddArg(L"CustomerID",sCustomerID,L""); |
| | | xstring sCustomerName = e.selectSingleNode(L"CustomerName").text(); |
| | | arg.AddArg(L"CustomerName",sCustomerName,L""); |
| | | arg.AddArg(L"EntityName",GetEntityName(1),L""); |
| | | arg.AddArg(L"EntityID",GetEntityID(1),L""); |
| | | int p = arg.ptr_native_; |
| | | openUrl("/sale/view/Enquiry3/xpage/histroydata", p); |
| | | openUrl(L"/sale/view/Enquiry3/xpage/histroydata", p); |
| | | } |
| | | return 1; |
| | | } |
| | |
| | | { |
| | | xaserverarg arg=new xaserverarg; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | arg.AddArg("EntityName","Enquiry",""); |
| | | arg.AddArg("EntityID",GetEntityID(1),""); |
| | | arg.AddArg("EntityNo",GetEntityNo(1),""); |
| | | arg.AddArg(L"EntityName",L"Enquiry",L""); |
| | | arg.AddArg(L"EntityID",GetEntityID(1),L""); |
| | | arg.AddArg(L"EntityNo",GetEntityNo(1),L""); |
| | | int p = arg.ptr_native_; |
| | | openUrl("/sale/view/view.base/xpage/Template/PrintViewEx", p); |
| | | openUrl(L"/sale/view/view.base/xpage/Template/PrintViewEx", p); |
| | | return 0; |
| | | } |
| | | |
| | |
| | | dw_priceitem.Reset(); |
| | | |
| | | xaserverarg arg = xaserverarg::Make(); |
| | | arg.AddArg("action","AddPriceList"); |
| | | arg.AddArg(L"action",L"AddPriceList"); |
| | | |
| | | OpenWindow("dev:xpage[ProductSchemaSelect.vx]",cast(arg as int)); |
| | | if(arg.GetArgString("process") == "ok") |
| | | OpenWindow(L"dev:xpage[ProductSchemaSelect.vx]",cast(arg as int)); |
| | | if(arg.GetArgString(L"process") == L"ok") |
| | | { |
| | | |
| | | xml x = new xml; |
| | | x.setNativePointer(xml::CreateInstance()); |
| | | if (getUrl("/sale/data/Enquiry/PriceListEx/SKU",arg.GetString(),x)!=1) return 1; |
| | | msxml::IXMLDOMNodeList nodes = x.GetXmlDoc().selectNodes("data/Item"); |
| | | int len = nodes.length; |
| | | if (getUrl(L"/sale/data/Enquiry/PriceListEx/SKU",arg.GetString(),x)!=1) return 1; |
| | | KXMLDOMNodeList nodes = x.selectNodes(L"data/Item"); |
| | | int len = nodes.length(); |
| | | for(int i=0; i<len;i++) |
| | | { |
| | | dw_pricelist.InsertRow(0); |
| | | int row = dw_pricelist.GetRowCount(); |
| | | dw_pricelist.SetRow(row); |
| | | msxml::IXMLDOMNode ele = nodes.item(i); |
| | | if(ele.selectSingleNode("SKUID")) dw_pricelist.SetItemString(row,"SKUID",ele.selectSingleNode("SKUID").text); |
| | | if(ele.selectSingleNode("SKUID/@_displaystring")) dw_pricelist.SetItemDisplayString(row,"SKUID",ele.selectSingleNode("SKUID/@_displaystring").text); |
| | | if(ele.selectSingleNode("GoodsNo")) dw_pricelist.SetItemString(row,"GoodsNo",ele.selectSingleNode("GoodsNo").text); |
| | | if(ele.selectSingleNode("CName")) dw_pricelist.SetItemString(row,"CName",ele.selectSingleNode("CName").text); |
| | | if(ele.selectSingleNode("BOMSchema")) dw_pricelist.SetItemString(row,"BOMSchema",ele.selectSingleNode("BOMSchema").text); |
| | | if(ele.selectSingleNode("Version")) dw_pricelist.SetItemString(row,"Version",ele.selectSingleNode("Version").text); |
| | | if(ele.selectSingleNode("SchemaNote")) dw_pricelist.SetItemString(row,"SchemaNote",ele.selectSingleNode("SchemaNote").text); |
| | | if(ele.selectSingleNode("Current")) dw_pricelist.SetItemString(row,"Current",ele.selectSingleNode("Current").text); |
| | | if(ele.selectSingleNode("PriceInfo")) dw_pricelist.SetItemString(row,"PriceInfo",ele.selectSingleNode("PriceInfo").text); |
| | | KXMLDOMNode ele = nodes.item(i); |
| | | if(ele.selectSingleNode(L"SKUID")) dw_pricelist.SetItemString(row,L"SKUID",ele.selectSingleNode(L"SKUID").text()); |
| | | if(ele.selectSingleNode(L"SKUID/@_displaystring")) dw_pricelist.SetItemDisplayString(row,L"SKUID",ele.selectSingleNode(L"SKUID/@_displaystring").text()); |
| | | if(ele.selectSingleNode(L"GoodsNo")) dw_pricelist.SetItemString(row,L"GoodsNo",ele.selectSingleNode(L"GoodsNo").text()); |
| | | if(ele.selectSingleNode(L"CName")) dw_pricelist.SetItemString(row,L"CName",ele.selectSingleNode(L"CName").text()); |
| | | if(ele.selectSingleNode(L"BOMSchema")) dw_pricelist.SetItemString(row,L"BOMSchema",ele.selectSingleNode(L"BOMSchema").text()); |
| | | if(ele.selectSingleNode(L"Version")) dw_pricelist.SetItemString(row,L"Version",ele.selectSingleNode(L"Version").text()); |
| | | if(ele.selectSingleNode(L"SchemaNote")) dw_pricelist.SetItemString(row,L"SchemaNote",ele.selectSingleNode(L"SchemaNote").text()); |
| | | if(ele.selectSingleNode(L"Current")) dw_pricelist.SetItemString(row,L"Current",ele.selectSingleNode(L"Current").text()); |
| | | if(ele.selectSingleNode(L"PriceInfo")) dw_pricelist.SetItemString(row,L"PriceInfo",ele.selectSingleNode(L"PriceInfo").text()); |
| | | |
| | | string id = dw_pricelist.GetGuid(row); |
| | | if(id=="") |
| | | xstring id = dw_pricelist.GetGuid(row); |
| | | if(id==L"") |
| | | { |
| | | id = publiccode::GetGuid(); |
| | | dw_pricelist.SetGuid(row,id); |
| | | } |
| | | msxml::IXMLDOMNodeList items = ele.selectNodes("data/Item"); |
| | | KXMLDOMNodeList items = ele.selectNodes(L"data/Item"); |
| | | AddItems(id,items); |
| | | items.Release(); |
| | | ele.Release(); |
| | |
| | | xaserverarg arg = xaserverarg::Make(); |
| | | xml x = new xml; |
| | | x.setNativePointer(xml::CreateInstance()); |
| | | arg.AddArg("SKUID",dw_pricelist.GetItemString(row,"SKUID")); |
| | | arg.AddArg("SchemaNo",dw_pricelist.GetItemString(row,"BOMSchema")); |
| | | if (getUrl("/sale/data/Enquiry/PriceListEx/SKU",arg.GetString(),x)!=1) return 1; |
| | | msxml::IXMLDOMNodeList nodes = x.GetXmlDoc().selectNodes("data/Item"); |
| | | int len = nodes.length; |
| | | arg.AddArg(L"SKUID",dw_pricelist.GetItemString(row,L"SKUID")); |
| | | arg.AddArg(L"SchemaNo",dw_pricelist.GetItemString(row,L"BOMSchema")); |
| | | if (getUrl(L"/sale/data/Enquiry/PriceListEx/SKU",arg.GetString(),x)!=1) return 1; |
| | | KXMLDOMNodeList nodes = x.selectNodes(L"data/Item"); |
| | | int len = nodes.length(); |
| | | for(int i=0; i<len;i++) |
| | | { |
| | | dw_pricelist.InsertRow(0); |
| | | row = dw_pricelist.GetRowCount(); |
| | | dw_pricelist.SetRow(row); |
| | | msxml::IXMLDOMNode ele = nodes.item(i); |
| | | if(ele.selectSingleNode("SKUID")) dw_pricelist.SetItemString(row,"SKUID",ele.selectSingleNode("SKUID").text); |
| | | if(ele.selectSingleNode("SKUID/@_displaystring")) dw_pricelist.SetItemDisplayString(row,"SKUID",ele.selectSingleNode("SKUID/@_displaystring").text); |
| | | if(ele.selectSingleNode("GoodsNo")) dw_pricelist.SetItemString(row,"GoodsNo",ele.selectSingleNode("GoodsNo").text); |
| | | if(ele.selectSingleNode("CName")) dw_pricelist.SetItemString(row,"CName",ele.selectSingleNode("CName").text); |
| | | if(ele.selectSingleNode("BOMSchema")) dw_pricelist.SetItemString(row,"BOMSchema",ele.selectSingleNode("BOMSchema").text); |
| | | if(ele.selectSingleNode("Version")) dw_pricelist.SetItemString(row,"Version",ele.selectSingleNode("Version").text); |
| | | if(ele.selectSingleNode("SchemaNote")) dw_pricelist.SetItemString(row,"SchemaNote",ele.selectSingleNode("SchemaNote").text); |
| | | if(ele.selectSingleNode("Current")) dw_pricelist.SetItemString(row,"Current",ele.selectSingleNode("Current").text); |
| | | if(ele.selectSingleNode("PriceInfo")) dw_pricelist.SetItemString(row,"PriceInfo",ele.selectSingleNode("PriceInfo").text); |
| | | string id = dw_pricelist.GetGuid(row); |
| | | if(id=="") |
| | | KXMLDOMNode ele = nodes.item(i); |
| | | if(ele.selectSingleNode(L"SKUID")) dw_pricelist.SetItemString(row,L"SKUID",ele.selectSingleNode(L"SKUID").text()); |
| | | if(ele.selectSingleNode(L"SKUID/@_displaystring")) dw_pricelist.SetItemDisplayString(row,L"SKUID",ele.selectSingleNode(L"SKUID/@_displaystring").text()); |
| | | if(ele.selectSingleNode(L"GoodsNo")) dw_pricelist.SetItemString(row,L"GoodsNo",ele.selectSingleNode(L"GoodsNo").text()); |
| | | if(ele.selectSingleNode(L"CName")) dw_pricelist.SetItemString(row,L"CName",ele.selectSingleNode(L"CName").text()); |
| | | if(ele.selectSingleNode(L"BOMSchema")) dw_pricelist.SetItemString(row,L"BOMSchema",ele.selectSingleNode(L"BOMSchema").text()); |
| | | if(ele.selectSingleNode(L"Version")) dw_pricelist.SetItemString(row,L"Version",ele.selectSingleNode(L"Version").text()); |
| | | if(ele.selectSingleNode(L"SchemaNote")) dw_pricelist.SetItemString(row,L"SchemaNote",ele.selectSingleNode(L"SchemaNote").text()); |
| | | if(ele.selectSingleNode(L"Current")) dw_pricelist.SetItemString(row,L"Current",ele.selectSingleNode(L"Current").text()); |
| | | if(ele.selectSingleNode(L"PriceInfo")) dw_pricelist.SetItemString(row,L"PriceInfo",ele.selectSingleNode(L"PriceInfo").text()); |
| | | xstring id = dw_pricelist.GetGuid(row); |
| | | if(id==L"") |
| | | { |
| | | id = publiccode::GetGuid(); |
| | | dw_pricelist.SetGuid(row,id); |
| | | } |
| | | msxml::IXMLDOMNodeList items = ele.selectNodes("data/Item"); |
| | | KXMLDOMNodeList items = ele.selectNodes(L"data/Item"); |
| | | AddItems(id,items); |
| | | items.Release(); |
| | | ele.Release(); |
| | |
| | | return 1; |
| | | } |
| | | |
| | | int AddItems(string id, msxml::IXMLDOMNodeList nodes) |
| | | int AddItems(xstring id, KXMLDOMNodeList nodes) |
| | | { |
| | | //dw_pricelist.Filter("EnquiryPriceListID",""); |
| | | //dw_pricelist.Filter(L"EnquiryPriceListID",L""); |
| | | |
| | | int len = nodes.length; |
| | | int len = nodes.length(); |
| | | for(int i=0;i<len;i++) |
| | | { |
| | | dw_priceitem.InsertRow(0); |
| | | int row = dw_priceitem.GetRowCount(); |
| | | dw_priceitem.SetItemString(row,"EnquiryPriceListID",id); |
| | | msxml::IXMLDOMNode ele = nodes.item(i); |
| | | if(ele.selectSingleNode("SchemaNote")) dw_priceitem.SetItemString(row,"SchemaNote",ele.selectSingleNode("SchemaNote").text); |
| | | if(ele.selectSingleNode("BOMType")) dw_priceitem.SetItemString(row,"BOMType",ele.selectSingleNode("BOMType").text); |
| | | if(ele.selectSingleNode("BOMPartNo")) dw_priceitem.SetItemString(row,"BOMPartNo",ele.selectSingleNode("BOMPartNo").text); |
| | | if(ele.selectSingleNode("SupplierID")) dw_priceitem.SetItemString(row,"SupplierID",ele.selectSingleNode("SupplierID").text); |
| | | if(ele.selectSingleNode("SupplierID/@_displaystring")) dw_priceitem.SetItemDisplayString(row,"SupplierID",ele.selectSingleNode("SupplierID/@_displaystring").text); |
| | | if(ele.selectSingleNode("BuyPrice")) dw_priceitem.SetItemString(row,"BuyPrice",ele.selectSingleNode("BuyPrice").text); |
| | | if(ele.selectSingleNode("ItemMiniQty")) dw_priceitem.SetItemString(row,"ItemMiniQty",ele.selectSingleNode("ItemMiniQty").text); |
| | | if(ele.selectSingleNode("EnquiryNo")) dw_priceitem.SetItemString(row,"EnquiryNo",ele.selectSingleNode("EnquiryNo").text); |
| | | if(ele.selectSingleNode("EnquiryDate")) dw_priceitem.SetItemString(row,"EnquiryDate",ele.selectSingleNode("EnquiryDate").text); |
| | | if(ele.selectSingleNode("ValidDay")) dw_priceitem.SetItemString(row,"ValidDay",ele.selectSingleNode("ValidDay").text); |
| | | if(ele.selectSingleNode("ItemNote")) dw_priceitem.SetItemString(row,"ItemNote",ele.selectSingleNode("ItemNote").text); |
| | | if(ele.selectSingleNode("EnquiryLineID")) dw_priceitem.SetItemString(row,"EnquiryLineID",ele.selectSingleNode("EnquiryLineID").text); |
| | | if(ele.selectSingleNode("PriceInfo")) dw_priceitem.SetItemString(row,"PriceInfo",ele.selectSingleNode("PriceInfo").text); |
| | | dw_priceitem.SetItemString(row,L"EnquiryPriceListID",id); |
| | | KXMLDOMNode ele = nodes.item(i); |
| | | if(ele.selectSingleNode(L"SchemaNote")) dw_priceitem.SetItemString(row,L"SchemaNote",ele.selectSingleNode(L"SchemaNote").text()); |
| | | if(ele.selectSingleNode(L"BOMType")) dw_priceitem.SetItemString(row,L"BOMType",ele.selectSingleNode(L"BOMType").text()); |
| | | if(ele.selectSingleNode(L"BOMPartNo")) dw_priceitem.SetItemString(row,L"BOMPartNo",ele.selectSingleNode(L"BOMPartNo").text()); |
| | | if(ele.selectSingleNode(L"SupplierID")) dw_priceitem.SetItemString(row,L"SupplierID",ele.selectSingleNode(L"SupplierID").text()); |
| | | if(ele.selectSingleNode(L"SupplierID/@_displaystring")) dw_priceitem.SetItemDisplayString(row,L"SupplierID",ele.selectSingleNode(L"SupplierID/@_displaystring").text()); |
| | | if(ele.selectSingleNode(L"BuyPrice")) dw_priceitem.SetItemString(row,L"BuyPrice",ele.selectSingleNode(L"BuyPrice").text()); |
| | | if(ele.selectSingleNode(L"ItemMiniQty")) dw_priceitem.SetItemString(row,L"ItemMiniQty",ele.selectSingleNode(L"ItemMiniQty").text()); |
| | | if(ele.selectSingleNode(L"EnquiryNo")) dw_priceitem.SetItemString(row,L"EnquiryNo",ele.selectSingleNode(L"EnquiryNo").text()); |
| | | if(ele.selectSingleNode(L"EnquiryDate")) dw_priceitem.SetItemString(row,L"EnquiryDate",ele.selectSingleNode(L"EnquiryDate").text()); |
| | | if(ele.selectSingleNode(L"ValidDay")) dw_priceitem.SetItemString(row,L"ValidDay",ele.selectSingleNode(L"ValidDay").text()); |
| | | if(ele.selectSingleNode(L"ItemNote")) dw_priceitem.SetItemString(row,L"ItemNote",ele.selectSingleNode(L"ItemNote").text()); |
| | | if(ele.selectSingleNode(L"EnquiryLineID")) dw_priceitem.SetItemString(row,L"EnquiryLineID",ele.selectSingleNode(L"EnquiryLineID").text()); |
| | | if(ele.selectSingleNode(L"PriceInfo")) dw_priceitem.SetItemString(row,L"PriceInfo",ele.selectSingleNode(L"PriceInfo").text()); |
| | | } |
| | | return 1; |
| | | } |
| | |
| | | int row = dw_pricelist.GetRow(); |
| | | xaserverarg arg= new xaserverarg; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | arg.AddArg("SKUID",dw_pricelist.GetItemString(row,"SKUID")); |
| | | arg.AddArg("SchemaNo",dw_pricelist.GetItemString(row,"BOMSchema")); |
| | | OpenWindow("dev:xpage[PriceList.PurcharItemSelect.vx]",cast(arg as int)); |
| | | string id = dw_pricelist.GetGuid(dw_pricelist.GetRow()); |
| | | if(id=="") |
| | | arg.AddArg(L"SKUID",dw_pricelist.GetItemString(row,L"SKUID")); |
| | | arg.AddArg(L"SchemaNo",dw_pricelist.GetItemString(row,L"BOMSchema")); |
| | | OpenWindow(L"dev:xpage[PriceList.PurcharItemSelect.vx]",cast(arg as int)); |
| | | xstring id = dw_pricelist.GetGuid(dw_pricelist.GetRow()); |
| | | if(id==L"") |
| | | { |
| | | id = publiccode::GetGuid(); |
| | | dw_pricelist.SetGuid(dw_pricelist.GetRow(),id); |
| | | } |
| | | if(arg.GetArgString("process")=="ok") |
| | | if(arg.GetArgString(L"process")==L"ok") |
| | | { |
| | | string content = arg.GetArgString("result"); |
| | | xstring content = arg.GetArgString(L"result"); |
| | | xml x = xml::Make(); |
| | | x.LoadXml(content); |
| | | msxml::IXMLDOMNodeList nodes = x.GetXmlDoc().selectNodes("data/Item"); |
| | | KXMLDOMNodeList nodes = x.selectNodes(L"data/Item"); |
| | | AddItems(id,nodes); |
| | | nodes.Release(); |
| | | string PriceInfo = ""; |
| | | xstring PriceInfo = L""; |
| | | for(int i=1;i<=dw_pricelist.GetRowCount();i++) |
| | | { |
| | | if(i==1) |
| | | PriceInfo = dw_priceitem.GetItemString(i,"PriceInfo"); |
| | | PriceInfo = dw_priceitem.GetItemString(i,L"PriceInfo"); |
| | | else |
| | | PriceInfo = PriceInfo + " " + dw_priceitem.GetItemString(i,"PriceInfo"); |
| | | PriceInfo = PriceInfo + L" " + dw_priceitem.GetItemString(i,L"PriceInfo"); |
| | | } |
| | | dw_pricelist.SetItemString(dw_pricelist.GetRow(),"PriceInfo",PriceInfo); |
| | | dw_pricelist.SetItemString(dw_pricelist.GetRow(),L"PriceInfo",PriceInfo); |
| | | dw_pricelist.Redraw(); |
| | | } |
| | | return 1; |
| | |
| | | { |
| | | if(dw_pricelist.GetRow() < 1) return 1; |
| | | dw_priceitem.DeleteRow(0); |
| | | string PriceInfo = ""; |
| | | xstring PriceInfo = L""; |
| | | for(int i=1;i<=dw_pricelist.GetRowCount();i++) |
| | | { |
| | | if(i==1) |
| | | PriceInfo = dw_priceitem.GetItemString(i,"PriceInfo"); |
| | | PriceInfo = dw_priceitem.GetItemString(i,L"PriceInfo"); |
| | | else |
| | | PriceInfo = PriceInfo + " " + dw_priceitem.GetItemString(i,"PriceInfo"); |
| | | PriceInfo = PriceInfo + L" " + dw_priceitem.GetItemString(i,L"PriceInfo"); |
| | | } |
| | | dw_pricelist.SetItemString(dw_pricelist.GetRow(),"PriceInfo",PriceInfo); |
| | | dw_pricelist.SetItemString(dw_pricelist.GetRow(),L"PriceInfo",PriceInfo); |
| | | dw_pricelist.Redraw(); |
| | | return 1; |
| | | } |
| | |
| | | int row = hdr.row; |
| | | |
| | | int hCursor = xutil::SetCursorWait(); |
| | | string EnquiryNo = dw_list.GetItemString(row,"EnquiryNo"); |
| | | xml x = ViewObject::RetrieveData("/sale/data/Enquiry/maint","id",EnquiryNo); |
| | | xstring EnquiryNo = dw_list.GetItemString(row,L"EnquiryNo"); |
| | | xml x = ViewObject::RetrieveData(L"/sale/data/Enquiry/maint",L"id",EnquiryNo); |
| | | if(x) |
| | | dw_goods.Retrieve(x); |
| | | else |
| | |
| | | int row = hdr.row; |
| | | |
| | | int hCursor = xutil::SetCursorWait(); |
| | | string EnquiryNo = dw_list2.GetItemString(row,"EnquiryNo"); |
| | | xml x = ViewObject::RetrieveData("/sale/data/Enquiry/maint","id",EnquiryNo); |
| | | xstring EnquiryNo = dw_list2.GetItemString(row,L"EnquiryNo"); |
| | | xml x = ViewObject::RetrieveData(L"/sale/data/Enquiry/maint",L"id",EnquiryNo); |
| | | if(x) |
| | | dw_goods2.Retrieve(x); |
| | | else |
| | |
| | | int row = hdr.row; |
| | | |
| | | int hCursor = xutil::SetCursorWait(); |
| | | string ItemID = dw_list1.GetItemString(row,"ItemID"); |
| | | xstring ItemID = dw_list1.GetItemString(row,L"ItemID"); |
| | | //alert(ItemID); |
| | | xml x = ViewObject::RetrieveData("/sale/data/Enquiry/folder/listitemsex","itemID",ItemID,"type",state2.toString()); |
| | | xml x = ViewObject::RetrieveData(L"/sale/data/Enquiry/folder/listitemsex",L"itemID",ItemID,L"type",state2.toString()); |
| | | if(x) |
| | | dw_goods1.Retrieve(x); |
| | | else |
| | |
| | | xaserverarg arg = new xaserverarg; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | |
| | | OpenWindow("dev:xpage[UserGroupShareEx.vx]",cast(arg as int)); |
| | | if(arg.GetArgString("process")=="ok") |
| | | OpenWindow(L"dev:xpage[UserGroupShareEx.vx]",cast(arg as int)); |
| | | if(arg.GetArgString(L"process")==L"ok") |
| | | { |
| | | xdwgrid dw_obj = dw_pricelistex; |
| | | if(sheetname=="tab_pricebillex") dw_obj = dw_pricelist; |
| | | if(sheetname==L"tab_pricebillex") dw_obj = dw_pricelist; |
| | | |
| | | sheetname="tab_pricebillshare"; |
| | | SetAgent("list"); |
| | | SwitchLayer("sheet5","frame"); |
| | | sheetname=L"tab_pricebillshare"; |
| | | SetAgent(L"list"); |
| | | SwitchLayer(L"sheet5",L"frame"); |
| | | xml x = xml::Make(); |
| | | x.LoadXml(arg.GetArgString("result")); |
| | | msxml::IXMLDOMNodeList nodes = x.GetXmlDoc().selectNodes("root/item"); |
| | | int count = nodes.length; |
| | | x.LoadXml(arg.GetArgString(L"result")); |
| | | KXMLDOMNodeList nodes = x.selectNodes(L"root/item"); |
| | | int count = nodes.length(); |
| | | int row = dw_obj.GetNextSelectRow(1); |
| | | while(row > 0 && row <= dw_obj.GetRowCount()) |
| | | { |
| | | string SKUID = dw_obj.GetItemString(row,"SKUID"); |
| | | string SKUNo = dw_obj.GetItemDisplayString(row,"SKUID"); |
| | | string CName = dw_obj.GetItemString(row,"CName"); |
| | | string Version = dw_obj.GetItemString(row,"Version"); |
| | | string GoodsNo = dw_obj.GetItemString(row,"GoodsNo"); |
| | | string BOMSchema = dw_obj.GetItemString(row,"BOMSchema"); |
| | | string EntityID = dw_obj.GetGuid(row); |
| | | if(EntityID=="") EntityID = dw_obj.GetItemString(row,"EnquiryPriceListID"); |
| | | xstring SKUID = dw_obj.GetItemString(row,L"SKUID"); |
| | | xstring SKUNo = dw_obj.GetItemDisplayString(row,L"SKUID"); |
| | | xstring CName = dw_obj.GetItemString(row,L"CName"); |
| | | xstring Version = dw_obj.GetItemString(row,L"Version"); |
| | | xstring GoodsNo = dw_obj.GetItemString(row,L"GoodsNo"); |
| | | xstring BOMSchema = dw_obj.GetItemString(row,L"BOMSchema"); |
| | | xstring EntityID = dw_obj.GetGuid(row); |
| | | if(EntityID==L"") EntityID = dw_obj.GetItemString(row,L"EnquiryPriceListID"); |
| | | |
| | | for(int i=0; i<count; i++) |
| | | { |
| | | msxml::IXMLDOMNode node = nodes.item(i); |
| | | string No = ""; |
| | | string GroupOrEmp = ""; |
| | | if(node.selectSingleNode("NO")) No = node.selectSingleNode("NO").text; |
| | | if(node.selectSingleNode("Name")) GroupOrEmp = node.selectSingleNode("Name").text; |
| | | KXMLDOMNode node = nodes.item(i); |
| | | xstring No = L""; |
| | | xstring GroupOrEmp = L""; |
| | | if(node.selectSingleNode(L"NO")) No = node.selectSingleNode(L"NO").text(); |
| | | if(node.selectSingleNode(L"Name")) GroupOrEmp = node.selectSingleNode(L"Name").text(); |
| | | int crow = dw_pricelistshare.InsertRow(1); |
| | | //int crow = dw_pricelistshare.GetRowCount(); |
| | | dw_pricelistshare.SetItemString(crow,"NO",No); |
| | | dw_pricelistshare.SetItemString(crow,"GroupOrEmp",GroupOrEmp); |
| | | dw_pricelistshare.SetItemString(crow,"EntityID",EntityID); |
| | | dw_pricelistshare.SetItemString(crow,"EntityName","产品价格单"); |
| | | if(node.selectSingleNode("UserGroupID")) |
| | | dw_pricelistshare.SetItemString(crow,"UserGroupID",node.selectSingleNode("UserGroupID").text); |
| | | if(node.selectSingleNode("PersonID")) |
| | | dw_pricelistshare.SetItemString(crow,"PersonID",node.selectSingleNode("PersonID").text); |
| | | dw_pricelistshare.SetItemString(crow,L"NO",No); |
| | | dw_pricelistshare.SetItemString(crow,L"GroupOrEmp",GroupOrEmp); |
| | | dw_pricelistshare.SetItemString(crow,L"EntityID",EntityID); |
| | | dw_pricelistshare.SetItemString(crow,L"EntityName",L"产品价格单"); |
| | | if(node.selectSingleNode(L"UserGroupID")) |
| | | dw_pricelistshare.SetItemString(crow,L"UserGroupID",node.selectSingleNode(L"UserGroupID").text()); |
| | | if(node.selectSingleNode(L"PersonID")) |
| | | dw_pricelistshare.SetItemString(crow,L"PersonID",node.selectSingleNode(L"PersonID").text()); |
| | | |
| | | dw_pricelistshare.SetItemString(crow,"SKUID",SKUID); |
| | | dw_pricelistshare.SetItemDisplayString(crow,"SKUID",SKUNo); |
| | | dw_pricelistshare.SetItemString(crow,"CName",CName); |
| | | dw_pricelistshare.SetItemString(crow,"Version",Version); |
| | | dw_pricelistshare.SetItemString(crow,"GoodsNo",GoodsNo); |
| | | dw_pricelistshare.SetItemString(crow,"BOMSchema",BOMSchema); |
| | | dw_pricelistshare.SetItemString(crow,L"SKUID",SKUID); |
| | | dw_pricelistshare.SetItemDisplayString(crow,L"SKUID",SKUNo); |
| | | dw_pricelistshare.SetItemString(crow,L"CName",CName); |
| | | dw_pricelistshare.SetItemString(crow,L"Version",Version); |
| | | dw_pricelistshare.SetItemString(crow,L"GoodsNo",GoodsNo); |
| | | dw_pricelistshare.SetItemString(crow,L"BOMSchema",BOMSchema); |
| | | |
| | | node.Release(); |
| | | } |
| | |
| | | xaserverarg arg = new xaserverarg; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | |
| | | OpenWindow("dev:xpage[UserGroupShareEx.vx]",cast(arg as int)); |
| | | OpenWindow(L"dev:xpage[UserGroupShareEx.vx]",cast(arg as int)); |
| | | |
| | | return 1; |
| | | } |
| | |
| | | { |
| | | xaserverarg arg= new xaserverarg; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | arg.AddArg("no","Category:All"); |
| | | arg.AddArg("QueryTxt",""); |
| | | OpenWindow("dev:xpage[PriceList.PurcharItemSelectEx.vx]",cast(arg as int)); |
| | | if(arg.GetArgString("process") == "ok") |
| | | arg.AddArg(L"no",L"Category:All"); |
| | | arg.AddArg(L"QueryTxt",L""); |
| | | OpenWindow(L"dev:xpage[PriceList.PurcharItemSelectEx.vx]",cast(arg as int)); |
| | | if(arg.GetArgString(L"process") == L"ok") |
| | | { |
| | | xml x = new xml; |
| | | x.setNativePointer(xml::CreateInstance()); |
| | | x.LoadXml(arg.GetArgString("result")); |
| | | msxml::IXMLDOMNodeList nodes = x.GetXmlDoc().selectNodes("data/Item"); |
| | | int len = nodes.length; |
| | | x.LoadXml(arg.GetArgString(L"result")); |
| | | KXMLDOMNodeList nodes = x.selectNodes(L"data/Item"); |
| | | int len = nodes.length(); |
| | | for(int i=0; i<len;i++) |
| | | { |
| | | int row = dw_pricelistex.InsertRow(1); |
| | | //int row = dw_pricelistex.GetRowCount(); |
| | | msxml::IXMLDOMNode ele = nodes.item(i); |
| | | KXMLDOMNode ele = nodes.item(i); |
| | | //alert(ele.xml); |
| | | if(ele.selectSingleNode("SKUID")) dw_pricelistex.SetItemString(row,"Item",ele.selectSingleNode("SKUID").text); |
| | | if(ele.selectSingleNode("SKUNo")) dw_pricelistex.SetItemDisplayString(row,"SKUID",ele.selectSingleNode("SKUNo").text); |
| | | if(ele.selectSingleNode("GoodsNo")) dw_pricelistex.SetItemString(row,"GoodsNo",ele.selectSingleNode("GoodsNo").text); |
| | | if(ele.selectSingleNode("CName")) dw_pricelistex.SetItemString(row,"CName",ele.selectSingleNode("CName").text); |
| | | if(ele.selectSingleNode("ItemName")) dw_pricelistex.SetItemString(row,"CName",ele.selectSingleNode("ItemName").text); |
| | | if(ele.selectSingleNode("BOMSchema")) dw_pricelistex.SetItemString(row,"BOMSchema",ele.selectSingleNode("BOMSchema").text); |
| | | if(ele.selectSingleNode("Version")) dw_pricelistex.SetItemString(row,"Version",ele.selectSingleNode("Version").text); |
| | | if(ele.selectSingleNode("SchemaNote")) dw_pricelistex.SetItemString(row,"SchemaNote",ele.selectSingleNode("SchemaNote").text); |
| | | if(ele.selectSingleNode("Current")) dw_pricelistex.SetItemString(row,"Current",ele.selectSingleNode("Current").text); |
| | | if(ele.selectSingleNode("PriceInfo")) dw_pricelistex.SetItemString(row,"PriceInfo",ele.selectSingleNode("PriceInfo").text); |
| | | if(ele.selectSingleNode(L"SKUID")) dw_pricelistex.SetItemString(row,L"Item",ele.selectSingleNode(L"SKUID").text()); |
| | | if(ele.selectSingleNode(L"SKUNo")) dw_pricelistex.SetItemDisplayString(row,L"SKUID",ele.selectSingleNode(L"SKUNo").text()); |
| | | if(ele.selectSingleNode(L"GoodsNo")) dw_pricelistex.SetItemString(row,L"GoodsNo",ele.selectSingleNode(L"GoodsNo").text()); |
| | | if(ele.selectSingleNode(L"CName")) dw_pricelistex.SetItemString(row,L"CName",ele.selectSingleNode(L"CName").text()); |
| | | if(ele.selectSingleNode(L"ItemName")) dw_pricelistex.SetItemString(row,L"CName",ele.selectSingleNode(L"ItemName").text()); |
| | | if(ele.selectSingleNode(L"BOMSchema")) dw_pricelistex.SetItemString(row,L"BOMSchema",ele.selectSingleNode(L"BOMSchema").text()); |
| | | if(ele.selectSingleNode(L"Version")) dw_pricelistex.SetItemString(row,L"Version",ele.selectSingleNode(L"Version").text()); |
| | | if(ele.selectSingleNode(L"SchemaNote")) dw_pricelistex.SetItemString(row,L"SchemaNote",ele.selectSingleNode(L"SchemaNote").text()); |
| | | if(ele.selectSingleNode(L"Current")) dw_pricelistex.SetItemString(row,L"Current",ele.selectSingleNode(L"Current").text()); |
| | | if(ele.selectSingleNode(L"PriceInfo")) dw_pricelistex.SetItemString(row,L"PriceInfo",ele.selectSingleNode(L"PriceInfo").text()); |
| | | |
| | | string edate = ele.selectSingleNode("EnquiryDate").text; |
| | | string ver = edate.mid(2,2)+"."+edate.mid(5,2)+"."+edate.mid(5,2); |
| | | dw_pricelistex.SetItemString(row,"Version",ver); |
| | | xstring edate = ele.selectSingleNode(L"EnquiryDate").text(); |
| | | xstring ver = edate.mid(2,2)+L"."+edate.mid(5,2)+L"."+edate.mid(5,2); |
| | | dw_pricelistex.SetItemString(row,L"Version",ver); |
| | | |
| | | ///dw_pricelistex.SetItemString(row,"EnquiryPriceListID",id); |
| | | if(ele.selectSingleNode("SchemaNote")) dw_pricelistex.SetItemString(row,"SchemaNote",ele.selectSingleNode("SchemaNote").text); |
| | | if(ele.selectSingleNode("BOMType")) dw_pricelistex.SetItemString(row,"BOMType",ele.selectSingleNode("BOMType").text); |
| | | if(ele.selectSingleNode("BOMPartNo")) dw_pricelistex.SetItemString(row,"BOMPartNo",ele.selectSingleNode("BOMPartNo").text); |
| | | if(ele.selectSingleNode("SupplierID")) dw_pricelistex.SetItemString(row,"SupplierID",ele.selectSingleNode("SupplierID").text); |
| | | if(ele.selectSingleNode("SupplierID/@_displaystring")) dw_pricelistex.SetItemDisplayString(row,"SupplierID",ele.selectSingleNode("SupplierID/@_displaystring").text); |
| | | if(ele.selectSingleNode("POPrice")) dw_pricelistex.SetItemString(row,"BuyPrice",ele.selectSingleNode("POPrice").text); |
| | | if(ele.selectSingleNode("ItemMiniQty")) dw_pricelistex.SetItemString(row,"ItemMiniQty",ele.selectSingleNode("ItemMiniQty").text); |
| | | if(ele.selectSingleNode("EnquiryNo")) dw_pricelistex.SetItemString(row,"EnquiryNo",ele.selectSingleNode("EnquiryNo").text); |
| | | if(ele.selectSingleNode("EnquiryDate")) dw_pricelistex.SetItemString(row,"EnquiryDate",ele.selectSingleNode("EnquiryDate").text); |
| | | if(ele.selectSingleNode("ValidDay")) dw_pricelistex.SetItemString(row,"ValidDay",ele.selectSingleNode("ValidDay").text); |
| | | if(ele.selectSingleNode("ItemNote")) dw_pricelistex.SetItemString(row,"ItemNote",ele.selectSingleNode("ItemNote").text); |
| | | if(ele.selectSingleNode("EnquiryLineID")) dw_pricelistex.SetItemString(row,"EnquiryLineID",ele.selectSingleNode("EnquiryLineID").text); |
| | | ///dw_pricelistex.SetItemString(row,L"EnquiryPriceListID",id); |
| | | if(ele.selectSingleNode(L"SchemaNote")) dw_pricelistex.SetItemString(row,L"SchemaNote",ele.selectSingleNode(L"SchemaNote").text()); |
| | | if(ele.selectSingleNode(L"BOMType")) dw_pricelistex.SetItemString(row,L"BOMType",ele.selectSingleNode(L"BOMType").text()); |
| | | if(ele.selectSingleNode(L"BOMPartNo")) dw_pricelistex.SetItemString(row,L"BOMPartNo",ele.selectSingleNode(L"BOMPartNo").text()); |
| | | if(ele.selectSingleNode(L"SupplierID")) dw_pricelistex.SetItemString(row,L"SupplierID",ele.selectSingleNode(L"SupplierID").text()); |
| | | if(ele.selectSingleNode(L"SupplierID/@_displaystring")) dw_pricelistex.SetItemDisplayString(row,L"SupplierID",ele.selectSingleNode(L"SupplierID/@_displaystring").text()); |
| | | if(ele.selectSingleNode(L"POPrice")) dw_pricelistex.SetItemString(row,L"BuyPrice",ele.selectSingleNode(L"POPrice").text()); |
| | | if(ele.selectSingleNode(L"ItemMiniQty")) dw_pricelistex.SetItemString(row,L"ItemMiniQty",ele.selectSingleNode(L"ItemMiniQty").text()); |
| | | if(ele.selectSingleNode(L"EnquiryNo")) dw_pricelistex.SetItemString(row,L"EnquiryNo",ele.selectSingleNode(L"EnquiryNo").text()); |
| | | if(ele.selectSingleNode(L"EnquiryDate")) dw_pricelistex.SetItemString(row,L"EnquiryDate",ele.selectSingleNode(L"EnquiryDate").text()); |
| | | if(ele.selectSingleNode(L"ValidDay")) dw_pricelistex.SetItemString(row,L"ValidDay",ele.selectSingleNode(L"ValidDay").text()); |
| | | if(ele.selectSingleNode(L"ItemNote")) dw_pricelistex.SetItemString(row,L"ItemNote",ele.selectSingleNode(L"ItemNote").text()); |
| | | if(ele.selectSingleNode(L"EnquiryLineID")) dw_pricelistex.SetItemString(row,L"EnquiryLineID",ele.selectSingleNode(L"EnquiryLineID").text()); |
| | | ele.Release(); |
| | | } |
| | | x.Free(); |
| | |
| | | { |
| | | xaserverarg arg= new xaserverarg; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | arg.AddArg("no","Category:All"); |
| | | arg.AddArg("QueryTxt",""); |
| | | OpenWindow("dev:xpage[PriceList.PurcharItemSelectEx.vx]",cast(arg as int)); |
| | | if(arg.GetArgString("process") == "ok") |
| | | arg.AddArg(L"no",L"Category:All"); |
| | | arg.AddArg(L"QueryTxt",L""); |
| | | OpenWindow(L"dev:xpage[PriceList.PurcharItemSelectEx.vx]",cast(arg as int)); |
| | | if(arg.GetArgString(L"process") == L"ok") |
| | | { |
| | | xml x = new xml; |
| | | x.setNativePointer(xml::CreateInstance()); |
| | | x.LoadXml(arg.GetArgString("result")); |
| | | msxml::IXMLDOMNodeList nodes = x.GetXmlDoc().selectNodes("data/Item"); |
| | | int len = nodes.length; |
| | | x.LoadXml(arg.GetArgString(L"result")); |
| | | KXMLDOMNodeList nodes = x.selectNodes(L"data/Item"); |
| | | int len = nodes.length(); |
| | | for(int i=0; i<len;i++) |
| | | { |
| | | dw_pricelist.InsertRow(0); |
| | | int row = dw_pricelist.GetRowCount(); |
| | | //dw_pricelist.SetRow(row); |
| | | msxml::IXMLDOMNode ele = nodes.item(i); |
| | | if(ele.selectSingleNode("SKUID")) dw_pricelist.SetItemString(row,"Item",ele.selectSingleNode("SKUID").text); |
| | | if(ele.selectSingleNode("SKUNo")) dw_pricelist.SetItemDisplayString(row,"SKUID",ele.selectSingleNode("SKUNo").text); |
| | | if(ele.selectSingleNode("GoodsNo")) dw_pricelist.SetItemString(row,"GoodsNo",ele.selectSingleNode("GoodsNo").text); |
| | | if(ele.selectSingleNode("CName")) dw_pricelist.SetItemString(row,"CName",ele.selectSingleNode("CName").text); |
| | | if(ele.selectSingleNode("BOMSchema")) dw_pricelist.SetItemString(row,"BOMSchema",ele.selectSingleNode("BOMSchema").text); |
| | | if(ele.selectSingleNode("Version")) dw_pricelist.SetItemString(row,"Version",ele.selectSingleNode("Version").text); |
| | | if(ele.selectSingleNode("SchemaNote")) dw_pricelist.SetItemString(row,"SchemaNote",ele.selectSingleNode("SchemaNote").text); |
| | | if(ele.selectSingleNode("Current")) dw_pricelist.SetItemString(row,"Current",ele.selectSingleNode("Current").text); |
| | | if(ele.selectSingleNode("PriceInfo")) dw_pricelist.SetItemString(row,"PriceInfo",ele.selectSingleNode("PriceInfo").text); |
| | | KXMLDOMNode ele = nodes.item(i); |
| | | if(ele.selectSingleNode(L"SKUID")) dw_pricelist.SetItemString(row,L"Item",ele.selectSingleNode(L"SKUID").text()); |
| | | if(ele.selectSingleNode(L"SKUNo")) dw_pricelist.SetItemDisplayString(row,L"SKUID",ele.selectSingleNode(L"SKUNo").text()); |
| | | if(ele.selectSingleNode(L"GoodsNo")) dw_pricelist.SetItemString(row,L"GoodsNo",ele.selectSingleNode(L"GoodsNo").text()); |
| | | if(ele.selectSingleNode(L"CName")) dw_pricelist.SetItemString(row,L"CName",ele.selectSingleNode(L"CName").text()); |
| | | if(ele.selectSingleNode(L"BOMSchema")) dw_pricelist.SetItemString(row,L"BOMSchema",ele.selectSingleNode(L"BOMSchema").text()); |
| | | if(ele.selectSingleNode(L"Version")) dw_pricelist.SetItemString(row,L"Version",ele.selectSingleNode(L"Version").text()); |
| | | if(ele.selectSingleNode(L"SchemaNote")) dw_pricelist.SetItemString(row,L"SchemaNote",ele.selectSingleNode(L"SchemaNote").text()); |
| | | if(ele.selectSingleNode(L"Current")) dw_pricelist.SetItemString(row,L"Current",ele.selectSingleNode(L"Current").text()); |
| | | if(ele.selectSingleNode(L"PriceInfo")) dw_pricelist.SetItemString(row,L"PriceInfo",ele.selectSingleNode(L"PriceInfo").text()); |
| | | |
| | | string edate = ele.selectSingleNode("EnquiryDate").text; |
| | | string ver = edate.mid(2,2)+"."+edate.mid(5,2)+"."+edate.mid(5,2); |
| | | dw_pricelist.SetItemString(row,"Version",ver); |
| | | xstring edate = ele.selectSingleNode(L"EnquiryDate").text(); |
| | | xstring ver = edate.mid(2,2)+L"."+edate.mid(5,2)+L"."+edate.mid(5,2); |
| | | dw_pricelist.SetItemString(row,L"Version",ver); |
| | | |
| | | if(ele.selectSingleNode("SupplierID/@_displaystring")) |
| | | if(ele.selectSingleNode(L"SupplierID/@_displaystring")) |
| | | { |
| | | string name = ele.selectSingleNode("SupplierID/@_displaystring").text; |
| | | string price = ele.selectSingleNode("POPrice").text; |
| | | string PriceInfo = price + " " + name; |
| | | dw_pricelist.SetItemString(row,"PriceInfo",PriceInfo); |
| | | xstring name = ele.selectSingleNode(L"SupplierID/@_displaystring").text(); |
| | | xstring price = ele.selectSingleNode(L"POPrice").text(); |
| | | xstring PriceInfo = price + L" " + name; |
| | | dw_pricelist.SetItemString(row,L"PriceInfo",PriceInfo); |
| | | } |
| | | string id = dw_pricelist.GetGuid(row); |
| | | if(id=="") |
| | | xstring id = dw_pricelist.GetGuid(row); |
| | | if(id==L"") |
| | | { |
| | | id = publiccode::GetGuid(); |
| | | dw_pricelist.SetGuid(row,id); |
| | |
| | | |
| | | dw_priceitem.InsertRow(0); |
| | | row = dw_priceitem.GetRowCount(); |
| | | dw_priceitem.SetItemString(row,"EnquiryPriceListID",id); |
| | | if(ele.selectSingleNode("SchemaNote")) dw_priceitem.SetItemString(row,"SchemaNote",ele.selectSingleNode("SchemaNote").text); |
| | | if(ele.selectSingleNode("BOMType")) dw_priceitem.SetItemString(row,"BOMType",ele.selectSingleNode("BOMType").text); |
| | | if(ele.selectSingleNode("BOMPartNo")) dw_priceitem.SetItemString(row,"BOMPartNo",ele.selectSingleNode("BOMPartNo").text); |
| | | if(ele.selectSingleNode("SupplierID")) dw_priceitem.SetItemString(row,"SupplierID",ele.selectSingleNode("SupplierID").text); |
| | | if(ele.selectSingleNode("SupplierID/@_displaystring")) dw_priceitem.SetItemDisplayString(row,"SupplierID",ele.selectSingleNode("SupplierID/@_displaystring").text); |
| | | if(ele.selectSingleNode("POPrice")) dw_priceitem.SetItemString(row,"BuyPrice",ele.selectSingleNode("POPrice").text); |
| | | if(ele.selectSingleNode("ItemMiniQty")) dw_priceitem.SetItemString(row,"ItemMiniQty",ele.selectSingleNode("ItemMiniQty").text); |
| | | if(ele.selectSingleNode("EnquiryNo")) dw_priceitem.SetItemString(row,"EnquiryNo",ele.selectSingleNode("EnquiryNo").text); |
| | | if(ele.selectSingleNode("EnquiryDate")) dw_priceitem.SetItemString(row,"EnquiryDate",ele.selectSingleNode("EnquiryDate").text); |
| | | if(ele.selectSingleNode("ValidDay")) dw_priceitem.SetItemString(row,"ValidDay",ele.selectSingleNode("ValidDay").text); |
| | | if(ele.selectSingleNode("ItemNote")) dw_priceitem.SetItemString(row,"ItemNote",ele.selectSingleNode("ItemNote").text); |
| | | if(ele.selectSingleNode("EnquiryLineID")) dw_priceitem.SetItemString(row,"EnquiryLineID",ele.selectSingleNode("EnquiryLineID").text); |
| | | dw_priceitem.SetItemString(row,L"EnquiryPriceListID",id); |
| | | if(ele.selectSingleNode(L"SchemaNote")) dw_priceitem.SetItemString(row,L"SchemaNote",ele.selectSingleNode(L"SchemaNote").text()); |
| | | if(ele.selectSingleNode(L"BOMType")) dw_priceitem.SetItemString(row,L"BOMType",ele.selectSingleNode(L"BOMType").text()); |
| | | if(ele.selectSingleNode(L"BOMPartNo")) dw_priceitem.SetItemString(row,L"BOMPartNo",ele.selectSingleNode(L"BOMPartNo").text()); |
| | | if(ele.selectSingleNode(L"SupplierID")) dw_priceitem.SetItemString(row,L"SupplierID",ele.selectSingleNode(L"SupplierID").text()); |
| | | if(ele.selectSingleNode(L"SupplierID/@_displaystring")) dw_priceitem.SetItemDisplayString(row,L"SupplierID",ele.selectSingleNode(L"SupplierID/@_displaystring").text()); |
| | | if(ele.selectSingleNode(L"POPrice")) dw_priceitem.SetItemString(row,L"BuyPrice",ele.selectSingleNode(L"POPrice").text()); |
| | | if(ele.selectSingleNode(L"ItemMiniQty")) dw_priceitem.SetItemString(row,L"ItemMiniQty",ele.selectSingleNode(L"ItemMiniQty").text()); |
| | | if(ele.selectSingleNode(L"EnquiryNo")) dw_priceitem.SetItemString(row,L"EnquiryNo",ele.selectSingleNode(L"EnquiryNo").text()); |
| | | if(ele.selectSingleNode(L"EnquiryDate")) dw_priceitem.SetItemString(row,L"EnquiryDate",ele.selectSingleNode(L"EnquiryDate").text()); |
| | | if(ele.selectSingleNode(L"ValidDay")) dw_priceitem.SetItemString(row,L"ValidDay",ele.selectSingleNode(L"ValidDay").text()); |
| | | if(ele.selectSingleNode(L"ItemNote")) dw_priceitem.SetItemString(row,L"ItemNote",ele.selectSingleNode(L"ItemNote").text()); |
| | | if(ele.selectSingleNode(L"EnquiryLineID")) dw_priceitem.SetItemString(row,L"EnquiryLineID",ele.selectSingleNode(L"EnquiryLineID").text()); |
| | | |
| | | //AddItems(id,items); |
| | | //items.Release(); |
| | |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | int row = dw_term.GetRow(); |
| | | if(row < 1) return 0; |
| | | string str = dw_term.GetItemString(row,"TechNote"); |
| | | arg.AddArg("value",str); |
| | | OpenWindow("dev:xpage[memo.edit.new.vx]",arg.getNativePointer()); |
| | | if(arg.GetArgString("comdid")=="xmOK") |
| | | xstring str = dw_term.GetItemString(row,L"TechNote"); |
| | | arg.AddArg(L"value",str); |
| | | OpenWindow(L"dev:xpage[memo.edit.new.vx]",arg.getNativePointer()); |
| | | if(arg.GetArgString(L"comdid")==L"xmOK") |
| | | { |
| | | str = arg.GetArgString("value"); |
| | | str = arg.GetArgString(L"value"); |
| | | dw_term.AcceptText(); |
| | | dw_term.SetItemString(row,"TechNote",str); |
| | | dw_term.SetItemString(row,L"TechNote",str); |
| | | dw_term.Redraw(); |
| | | } |
| | | return 0; |
| | |
| | | |
| | | if(row < 1) return 0; |
| | | |
| | | string ItemID = dw_pricelistex.GetItemString(row,"ItemID"); |
| | | string EnquiryID = dw_pricelistex.GetItemString(row,"EnquiryID"); |
| | | string OriginEnquiryLineID = dw_pricelistex.GetItemString(row,"OriginEnquiryLineID"); |
| | | string ValidDay = dw_pricelistex.GetItemString(row,"ValidDay"); |
| | | string SupplierID = dw_pricelistex.GetItemString(row,"SupplierID1"); |
| | | string SupplierIDName = dw_pricelistex.GetItemString(row,"supplieridName1"); |
| | | string SONo = dw_pricelistex.GetItemString(row,"SONo"); |
| | | string Remark = dw_pricelistex.GetItemString(row,"Remark"); |
| | | string Source = dw_pricelistex.GetItemString(row,"Source"); |
| | | string PayTerm = dw_pricelistex.GetItemString(row,"PayTerm"); |
| | | string CustomerContactName = dw_pricelistex.GetItemString(row,"CustomerContactName"); |
| | | string ContactTel = dw_pricelistex.GetItemString(row,"ContactTel"); |
| | | //string EnquiryNo = EnquiryView::MakeBillNo(); |
| | | xstring ItemID = dw_pricelistex.GetItemString(row,L"ItemID"); |
| | | xstring EnquiryID = dw_pricelistex.GetItemString(row,L"EnquiryID"); |
| | | xstring OriginEnquiryLineID = dw_pricelistex.GetItemString(row,L"OriginEnquiryLineID"); |
| | | xstring ValidDay = dw_pricelistex.GetItemString(row,L"ValidDay"); |
| | | xstring SupplierID = dw_pricelistex.GetItemString(row,L"SupplierID1"); |
| | | xstring SupplierIDName = dw_pricelistex.GetItemString(row,L"supplieridName1"); |
| | | xstring SONo = dw_pricelistex.GetItemString(row,L"SONo"); |
| | | xstring Remark = dw_pricelistex.GetItemString(row,L"Remark"); |
| | | xstring Source = dw_pricelistex.GetItemString(row,L"Source"); |
| | | xstring PayTerm = dw_pricelistex.GetItemString(row,L"PayTerm"); |
| | | xstring CustomerContactName = dw_pricelistex.GetItemString(row,L"CustomerContactName"); |
| | | xstring ContactTel = dw_pricelistex.GetItemString(row,L"ContactTel"); |
| | | //xstring EnquiryNo = EnquiryView::MakeBillNo(); |
| | | |
| | | arg.AddArg("ItemID",ItemID); |
| | | arg.AddArg("EnquiryID",EnquiryID); |
| | | arg.AddArg("ValidDay",ValidDay); |
| | | arg.AddArg("SupplierID",SupplierID); |
| | | arg.AddArg("SupplierID/@_displaystring",SupplierIDName); |
| | | arg.AddArg("SONo",SONo); |
| | | arg.AddArg("Remark",Remark); |
| | | arg.AddArg("Source",Source); |
| | | arg.AddArg("PayTerm",PayTerm); |
| | | arg.AddArg("CustomerContactName",CustomerContactName); |
| | | arg.AddArg("ContactTel",ContactTel); |
| | | arg.AddArg(L"ItemID",ItemID); |
| | | arg.AddArg(L"EnquiryID",EnquiryID); |
| | | arg.AddArg(L"ValidDay",ValidDay); |
| | | arg.AddArg(L"SupplierID",SupplierID); |
| | | arg.AddArg(L"SupplierID/@_displaystring",SupplierIDName); |
| | | arg.AddArg(L"SONo",SONo); |
| | | arg.AddArg(L"Remark",Remark); |
| | | arg.AddArg(L"Source",Source); |
| | | arg.AddArg(L"PayTerm",PayTerm); |
| | | arg.AddArg(L"CustomerContactName",CustomerContactName); |
| | | arg.AddArg(L"ContactTel",ContactTel); |
| | | int pa = arg.getNativePointer(); |
| | | openUrl("/sale/view/Enquiry3/xpage/maint", pa); |
| | | openUrl(L"/sale/view/Enquiry3/xpage/maint", pa); |
| | | return 1; |
| | | } |
| | | |
| | |
| | | if(row < 1) return 0; |
| | | if(row1 < 1) return 0; |
| | | |
| | | string ItemID = dw_pricelist.GetItemString(row1,"ItemID"); |
| | | string EnquiryID = dw_priceitem.GetItemString(row,"EnquiryID"); |
| | | string OriginEnquiryLineID = dw_priceitem.GetItemString(row,"OriginEnquiryLineID"); |
| | | string ValidDay = dw_priceitem.GetItemString(row,"ValidDay"); |
| | | string SupplierID = dw_priceitem.GetItemString(row,"SupplierID1"); |
| | | string SupplierIDName = dw_priceitem.GetItemString(row,"supplieridName1"); |
| | | string SONo = dw_priceitem.GetItemString(row,"SONo"); |
| | | string Remark = dw_priceitem.GetItemString(row,"Remark"); |
| | | string Source = dw_priceitem.GetItemString(row,"Source"); |
| | | string PayTerm = dw_priceitem.GetItemString(row,"PayTerm"); |
| | | string CustomerContactName = dw_priceitem.GetItemString(row,"CustomerContactName"); |
| | | string ContactTel = dw_priceitem.GetItemString(row,"ContactTel"); |
| | | //string EnquiryNo = EnquiryView::MakeBillNo(); |
| | | xstring ItemID = dw_pricelist.GetItemString(row1,L"ItemID"); |
| | | xstring EnquiryID = dw_priceitem.GetItemString(row,L"EnquiryID"); |
| | | xstring OriginEnquiryLineID = dw_priceitem.GetItemString(row,L"OriginEnquiryLineID"); |
| | | xstring ValidDay = dw_priceitem.GetItemString(row,L"ValidDay"); |
| | | xstring SupplierID = dw_priceitem.GetItemString(row,L"SupplierID1"); |
| | | xstring SupplierIDName = dw_priceitem.GetItemString(row,L"supplieridName1"); |
| | | xstring SONo = dw_priceitem.GetItemString(row,L"SONo"); |
| | | xstring Remark = dw_priceitem.GetItemString(row,L"Remark"); |
| | | xstring Source = dw_priceitem.GetItemString(row,L"Source"); |
| | | xstring PayTerm = dw_priceitem.GetItemString(row,L"PayTerm"); |
| | | xstring CustomerContactName = dw_priceitem.GetItemString(row,L"CustomerContactName"); |
| | | xstring ContactTel = dw_priceitem.GetItemString(row,L"ContactTel"); |
| | | //xstring EnquiryNo = EnquiryView::MakeBillNo(); |
| | | |
| | | arg.AddArg("ItemID",ItemID); |
| | | arg.AddArg("EnquiryID",EnquiryID); |
| | | arg.AddArg("ValidDay",ValidDay); |
| | | arg.AddArg("SupplierID",SupplierID); |
| | | arg.AddArg("SupplierID/@_displaystring",SupplierIDName); |
| | | arg.AddArg("SONo",SONo); |
| | | arg.AddArg("Remark",Remark); |
| | | arg.AddArg("Source",Source); |
| | | arg.AddArg("PayTerm",PayTerm); |
| | | arg.AddArg("CustomerContactName",CustomerContactName); |
| | | arg.AddArg("ContactTel",ContactTel); |
| | | arg.AddArg(L"ItemID",ItemID); |
| | | arg.AddArg(L"EnquiryID",EnquiryID); |
| | | arg.AddArg(L"ValidDay",ValidDay); |
| | | arg.AddArg(L"SupplierID",SupplierID); |
| | | arg.AddArg(L"SupplierID/@_displaystring",SupplierIDName); |
| | | arg.AddArg(L"SONo",SONo); |
| | | arg.AddArg(L"Remark",Remark); |
| | | arg.AddArg(L"Source",Source); |
| | | arg.AddArg(L"PayTerm",PayTerm); |
| | | arg.AddArg(L"CustomerContactName",CustomerContactName); |
| | | arg.AddArg(L"ContactTel",ContactTel); |
| | | |
| | | |
| | | int pa = arg.getNativePointer(); |
| | | openUrl("/sale/view/Enquiry3/xpage/maint", pa); |
| | | openUrl(L"/sale/view/Enquiry3/xpage/maint", pa); |
| | | return 1; |
| | | } |
| | | |
| | | int PreOnCmdDispatch(string comdid) |
| | | int PreOnCmdDispatch(xstring comdid) |
| | | { |
| | | //alert(comdid); |
| | | if(comdid=="xmSearch") |
| | | if(comdid==L"xmSearch") |
| | | { |
| | | OnFilter(); |
| | | return 0; |
| | | } |
| | | if(comdid=="xmTech") |
| | | if(comdid==L"xmTech") |
| | | { |
| | | return OnTech(dw_pricelistex); |
| | | } |
| | | else if(comdid=="xmTech1") |
| | | else if(comdid==L"xmTech1") |
| | | { |
| | | return OnTech(dw_pricelist); |
| | | } |
| | | else if(comdid=="xmTech2") |
| | | else if(comdid==L"xmTech2") |
| | | { |
| | | return OnTech(dw_priceitem); |
| | | } |
| | | if(comdid=="tab_pricebill") |
| | | if(comdid==L"tab_pricebill") |
| | | { |
| | | sheetname="tab_pricebill"; |
| | | SetAgent("list"); |
| | | sheetname=L"tab_pricebill"; |
| | | SetAgent(L"list"); |
| | | |
| | | SwitchLayer("tv_folder_pricebill","folder_frame"); |
| | | SwitchLayer(L"tv_folder_pricebill",L"folder_frame"); |
| | | if(dw_pricelistex.GetRowCount() < 1) OnProductPriceBillRetrieve(); |
| | | return 0; |
| | | } |
| | | else if(comdid=="tab_pricebillex") |
| | | else if(comdid==L"tab_pricebillex") |
| | | { |
| | | sheetname="tab_pricebillex"; |
| | | SetAgent("list"); |
| | | SwitchLayer("tv_folder_pricebill","folder_frame"); |
| | | sheetname=L"tab_pricebillex"; |
| | | SetAgent(L"list"); |
| | | SwitchLayer(L"tv_folder_pricebill",L"folder_frame"); |
| | | if(dw_pricelist.GetRowCount() < 1) OnPriceBillRetrieve(); |
| | | return 0; |
| | | }else if(comdid=="tab_list2") |
| | | }else if(comdid==L"tab_list2") |
| | | { |
| | | dw_list = GetControl("dw_list2"); |
| | | sheetname = "tab_list2"; |
| | | SetAgent("list"); |
| | | dw_list = GetControl(L"dw_list2"); |
| | | sheetname = L"tab_list2"; |
| | | SetAgent(L"list"); |
| | | } |
| | | |
| | | else if(comdid.left(4)=="tab_") |
| | | else if(comdid.left(4)==L"tab_") |
| | | { |
| | | if(comdid=="tab_list") |
| | | if(comdid==L"tab_list") |
| | | { |
| | | dw_list = GetControl("dw_list"); |
| | | sheetname = "dw_list"; |
| | | dw_list = GetControl(L"dw_list"); |
| | | sheetname = L"dw_list"; |
| | | } |
| | | if(comdid=="tab_pricebillshare") |
| | | SwitchLayer("tv_folder_pricebill","folder_frame"); |
| | | if(comdid==L"tab_pricebillshare") |
| | | SwitchLayer(L"tv_folder_pricebill",L"folder_frame"); |
| | | else |
| | | SwitchLayer("tv_folder","folder_frame"); |
| | | SwitchLayer(L"tv_folder",L"folder_frame"); |
| | | sheetname=comdid; |
| | | SetAgent("list"); |
| | | SetAgent(L"list"); |
| | | return 0; |
| | | } |
| | | |
| | | if(comdid=="xmAddRow") |
| | | if(comdid==L"xmAddRow") |
| | | { |
| | | OnAddRow(); |
| | | return 0; |
| | | } |
| | | if(comdid=="xmDeleteRow") |
| | | if(comdid==L"xmDeleteRow") |
| | | { |
| | | OnDeleteRow(); |
| | | return 0; |
| | | } |
| | | if(comdid=="xmDelete") |
| | | if(comdid==L"xmDelete") |
| | | { |
| | | OnDeletePriceList(); |
| | | return 0; |
| | | } |
| | | |
| | | if(comdid=="xmBOMSchema") |
| | | if(comdid==L"xmBOMSchema") |
| | | { |
| | | OpenWindow("dev:xpage[ProductSchema.vx]"); |
| | | OpenWindow(L"dev:xpage[ProductSchema.vx]"); |
| | | return 0; |
| | | } |
| | | else if(comdid=="xmAddPriceList") |
| | | else if(comdid==L"xmAddPriceList") |
| | | { |
| | | OnAddPriceList(); |
| | | return 0; |
| | | } |
| | | else if(comdid=="xmAddPriceListVersion") |
| | | else if(comdid==L"xmAddPriceListVersion") |
| | | { |
| | | OnAddPriceListVersion(); |
| | | return 0; |
| | | } |
| | | |
| | | if(comdid=="action:bill.trantopricebill" || comdid=="bill.trantopricebill") |
| | | if(comdid==L"action:bill.trantopricebill" || comdid==L"bill.trantopricebill") |
| | | { |
| | | OnTransPriceBillEx(); |
| | | return 0; |
| | | } |
| | | if(comdid=="action:bill.new") |
| | | if(comdid==L"action:bill.new") |
| | | { |
| | | string s = publiccode::GetUser().id; |
| | | xml supplier_x = ViewObject::RetrieveData("/sale/data/SupplierV3/entity/FindBySaleType","id", s); |
| | | xstring s = publiccode::GetUser().id; |
| | | xml supplier_x = ViewObject::RetrieveData(L"/sale/data/SupplierV3/entity/FindBySaleType",L"id", s); |
| | | if(supplier_x) |
| | | { |
| | | if(supplier_x.GetXmlDoc().text == "采购经理") |
| | | if(supplier_x.text == L"采购经理") |
| | | { |
| | | alert("当前角色不是采购员不能新增单子,请重新选择角色"); |
| | | alert(L"当前角色不是采购员不能新增单子,请重新选择角色"); |
| | | return 0; |
| | | } |
| | | } |
| | | } |
| | | if(comdid=="action:bill.histroydata") return Onhistroydata(); |
| | | else if(comdid=="action:bill.refresh") return OnPreRetrieve(); |
| | | else if(comdid=="action:bill.print") return OnPrint(); |
| | | else if(comdid=="action:bill.share" || comdid=="xmShare") |
| | | if(comdid==L"action:bill.histroydata") return Onhistroydata(); |
| | | else if(comdid==L"action:bill.refresh") return OnPreRetrieve(); |
| | | else if(comdid==L"action:bill.print") return OnPrint(); |
| | | else if(comdid==L"action:bill.share" || comdid==L"xmShare") |
| | | { |
| | | OnShare(); |
| | | return 0; |
| | | } |
| | | |
| | | else if(comdid=="xmShare2") |
| | | else if(comdid==L"xmShare2") |
| | | { |
| | | OnShare2(); |
| | | return 0; |
| | | } |
| | | else if(comdid=="xmSave") |
| | | else if(comdid==L"xmSave") |
| | | { |
| | | OnSave(); |
| | | return 0; |
| | | } |
| | | else if(comdid=="xmCopy") |
| | | else if(comdid==L"xmCopy") |
| | | { |
| | | OnCopy(); |
| | | return 0; |
| | | } |
| | | else if(comdid=="xmGroupCopy") |
| | | else if(comdid==L"xmGroupCopy") |
| | | { |
| | | OnGroupCopy(); |
| | | return 0; |
| | | } |
| | | else if(comdid=="xmShareSave") |
| | | else if(comdid==L"xmShareSave") |
| | | { |
| | | OnSaveShare(); |
| | | return 0; |
| | | } |
| | | else if(comdid=="xmPriceListDeleteRow") |
| | | else if(comdid==L"xmPriceListDeleteRow") |
| | | { |
| | | dw_pricelistex.DeleteRow(0); |
| | | return 0; |
| | | } |
| | | else if(comdid=="xmShareRefresh") |
| | | else if(comdid==L"xmShareRefresh") |
| | | { |
| | | OnProductPriceShareRetrieve(); |
| | | return 0; |
| | | } |
| | | else if(comdid=="xmPriceBillRefresh") |
| | | else if(comdid==L"xmPriceBillRefresh") |
| | | { |
| | | OnPriceBillRetrieve(); |
| | | return 0; |
| | | } |
| | | else if(comdid=="xmShareDeleteRow") |
| | | else if(comdid==L"xmShareDeleteRow") |
| | | { |
| | | dw_pricelistshare.DeleteRow(0); |
| | | return 0; |
| | |
| | | int wid = ddlb_1.GetId(); |
| | | int CB_GETCURSEL = 0x0147; |
| | | int nIndex = win32::SendMessage(wid,CB_GETCURSEL,0,0); |
| | | msxml::IXMLDOMElement e = ddlb_1.GetElement(); |
| | | msxml::IXMLDOMElement e2 = e.selectSingleNode("item["+(nIndex+1).toString()+"]"); |
| | | string no=e2.selectSingleNode("@element").text; |
| | | KXMLDOMElement e = ddlb_1.GetElement(); |
| | | KXMLDOMElement e2 = e.selectSingleNode(L"item["+(nIndex+1).toString()+L"]"); |
| | | xstring no=e2.selectSingleNode(L"@element").text(); |
| | | |
| | | int hItem = tv_folder.GetRootItem(); |
| | | while(tv_folder.GetChildItem(hItem)) |
| | |
| | | |
| | | int OnCkbCLick(ref TEvent evt,int p) |
| | | { |
| | | xcheckbox cbx_1 = GetControl("cbx1"); |
| | | xcheckbox cbx_1 = GetControl(L"cbx1"); |
| | | int state=cbx_1.GetCheck(cbx_1.GetId()); |
| | | if(evt.lParam == GetControl("cbx1").GetId()) |
| | | if(evt.lParam == GetControl(L"cbx1").GetId()) |
| | | { |
| | | if (state== -1) |
| | | SwitchLayer("sheet1","frame"); |
| | | SwitchLayer(L"sheet1",L"frame"); |
| | | else |
| | | SwitchLayer("sheet2","frame"); |
| | | SwitchLayer(L"sheet2",L"frame"); |
| | | return 1; |
| | | }else if(evt.lParam == GetControl("cbx2").GetId()) |
| | | }else if(evt.lParam == GetControl(L"cbx2").GetId()) |
| | | { |
| | | cbx_1 = GetControl("cbx2"); |
| | | cbx_1 = GetControl(L"cbx2"); |
| | | state=cbx_1.GetCheck(cbx_1.GetId()); |
| | | int hCursor = xutil::SetCursorWait(); |
| | | string ItemID = dw_list1.GetItemString(dw_list1.GetRow(),"ItemID"); |
| | | xstring ItemID = dw_list1.GetItemString(dw_list1.GetRow(),L"ItemID"); |
| | | |
| | | xml x = ViewObject::RetrieveData("/sale/data/Enquiry/folder/listitemsex","itemID",ItemID,"type",state.toString()); |
| | | xml x = ViewObject::RetrieveData(L"/sale/data/Enquiry/folder/listitemsex",L"itemID",ItemID,L"type",state.toString()); |
| | | if(x) |
| | | dw_goods1.Retrieve(x); |
| | | else |
| | |
| | | ref DWASKSTYLENMHDR hdr = trust(evt.pnmh as ref DWASKSTYLENMHDR); |
| | | int row = hdr.row; |
| | | int col = hdr.col; |
| | | string colname = hdr.colname; |
| | | xstring colname = hdr.colname; |
| | | |
| | | int rows = dw_list.GetRowCount(); |
| | | if(row < 1 || row > rows) |
| | | { |
| | | return 1; |
| | | } |
| | | if(colname=="EnquiryNo" || colname=="SupplierID" || colname=="EnquiryDate" || |
| | | colname=="ValidDate"||colname=="ApprovalStatus"||colname=="SalespersonID"|| |
| | | colname=="PayTerm"||colname=="OrgName") |
| | | if(colname==L"EnquiryNo" || colname==L"SupplierID" || colname==L"EnquiryDate" || |
| | | colname==L"ValidDate"||colname==L"ApprovalStatus"||colname==L"SalespersonID"|| |
| | | colname==L"PayTerm"||colname==L"OrgName") |
| | | { |
| | | int days = dw_list.GetItemInt(row,"Days"); |
| | | int days = dw_list.GetItemInt(row,L"Days"); |
| | | if(days < 0) |
| | | { |
| | | hdr.mask = DMS_CSSSTYLE; |
| | | hdr.cssstyle = "color:#cccccc"; |
| | | hdr.cssstyle = L"color:#cccccc"; |
| | | } |
| | | } |
| | | return 1; |
| | | } |
| | | int OnFilter() |
| | | { |
| | | string str = GetControl("sl_search").GetText(); |
| | | xstring str = GetControl(L"sl_search").GetText(); |
| | | xdwgrid dw_obj; |
| | | if(sheetname=="tab_goods") dw_obj = dw_list1; |
| | | else if(sheetname=="tab_pricebill") dw_obj = dw_pricelistex; |
| | | else if(sheetname=="tab_pricebillex") dw_obj = dw_pricelist; |
| | | else if(sheetname=="tab_pricebillshare") dw_obj = dw_pricelistshare; |
| | | dw_obj.Filter("*",str); |
| | | if(sheetname==L"tab_goods") dw_obj = dw_list1; |
| | | else if(sheetname==L"tab_pricebill") dw_obj = dw_pricelistex; |
| | | else if(sheetname==L"tab_pricebillex") dw_obj = dw_pricelist; |
| | | else if(sheetname==L"tab_pricebillshare") dw_obj = dw_pricelistshare; |
| | | dw_obj.Filter(L"*",str); |
| | | |
| | | return 1; |
| | | } |
| | |
| | | xaserverarg arg=new xaserverarg; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | |
| | | string EnquiryNo = dw_list2.GetItemString(row,"EnquiryNo"); |
| | | arg.AddArg("EnquiryNo",EnquiryNo); |
| | | xstring EnquiryNo = dw_list2.GetItemString(row,L"EnquiryNo"); |
| | | arg.AddArg(L"EnquiryNo",EnquiryNo); |
| | | |
| | | int pa = arg.getNativePointer(); |
| | | openUrl("/sale/view/Enquiry3/xpage/maint", pa); |
| | | openUrl(L"/sale/view/Enquiry3/xpage/maint", pa); |
| | | xutil::RestoreCursor(hCursor); |
| | | return 1; |
| | | } |
| | | int OnDoubleClicked(ref TNotifyEvent evt,int p) |
| | | { |
| | | int hCursor = xutil::SetCursorWait(); |
| | | OnCmdDispatch("action:bill.open"); |
| | | OnCmdDispatch(L"action:bill.open"); |
| | | xutil::RestoreCursor(hCursor); |
| | | return 1; |
| | | } |
| | | int AttachEvent() |
| | | { |
| | | AttachEvent("tv_folder", "TVN_SELCHANGED",OnTreeSelChanged); //树选择 |
| | | AttachEvent("tv_folder", "TVN_ITEMEXPANDING",OnTreeExpanding); //树展开 |
| | | AttachEvent("dw_list","DWV_ROWFOCUSCHANGED",OnRowChanged); |
| | | AttachEvent("dw_list2","DWV_ROWFOCUSCHANGED",OnRowChanged2); |
| | | AttachEvent("dw_list1","DWV_ROWFOCUSCHANGED",OnRowChanged1); |
| | | AttachEvent("cbx_1","CBN_SELCHANGE",OnSelectDdlb); |
| | | AttachEvent("WM_COMMAND",OnCkbCLick); |
| | | AttachEvent("dw_list","DWV_ASKSTYLE",OnItemAskStyle); |
| | | AttachEvent("dw_pricelist","DWV_ROWFOCUSCHANGED",OnPriceListRowChanged); |
| | | AttachEvent("tv_folder_pricebill", "TVN_SELCHANGED",OnPriceBillTreeSelChanged); //树选择 |
| | | AttachEvent("tv_folder_pricebill", "TVN_ITEMEXPANDING",OnPriceBillTreeExpanding); |
| | | AttachEvent(L"tv_folder", L"TVN_SELCHANGED",OnTreeSelChanged); //树选择 |
| | | AttachEvent(L"tv_folder", L"TVN_ITEMEXPANDING",OnTreeExpanding); //树展开 |
| | | AttachEvent(L"dw_list",L"DWV_ROWFOCUSCHANGED",OnRowChanged); |
| | | AttachEvent(L"dw_list2",L"DWV_ROWFOCUSCHANGED",OnRowChanged2); |
| | | AttachEvent(L"dw_list1",L"DWV_ROWFOCUSCHANGED",OnRowChanged1); |
| | | AttachEvent(L"cbx_1",L"CBN_SELCHANGE",OnSelectDdlb); |
| | | AttachEvent(L"WM_COMMAND",OnCkbCLick); |
| | | AttachEvent(L"dw_list",L"DWV_ASKSTYLE",OnItemAskStyle); |
| | | AttachEvent(L"dw_pricelist",L"DWV_ROWFOCUSCHANGED",OnPriceListRowChanged); |
| | | AttachEvent(L"tv_folder_pricebill", L"TVN_SELCHANGED",OnPriceBillTreeSelChanged); //树选择 |
| | | AttachEvent(L"tv_folder_pricebill", L"TVN_ITEMEXPANDING",OnPriceBillTreeExpanding); |
| | | |
| | | AttachEvent("dw_pricelistex","DWV_DOUBLECLICKED",OnPriceListDoubleClicked); |
| | | AttachEvent("dw_list2","DWV_DOUBLECLICKED",OnDoubleClicked); |
| | | AttachEvent(L"dw_pricelistex",L"DWV_DOUBLECLICKED",OnPriceListDoubleClicked); |
| | | AttachEvent(L"dw_list2",L"DWV_DOUBLECLICKED",OnDoubleClicked); |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | |
| | | int OnRetrieveItem(string EnquiryPriceListID) |
| | | int OnRetrieveItem(xstring EnquiryPriceListID) |
| | | { |
| | | xml x = new xml; |
| | | x.setNativePointer(xml::CreateInstance()); |
| | | xaserverarg arg = new xaserverarg; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | arg.AddArg("EnquiryPriceListID",EnquiryPriceListID); |
| | | if (getUrl("/sale/data/Enquiry/fetch/PriceList/item",arg.GetString(),x)!=1) |
| | | arg.AddArg(L"EnquiryPriceListID",EnquiryPriceListID); |
| | | if (getUrl(L"/sale/data/Enquiry/fetch/PriceList/item",arg.GetString(),x)!=1) |
| | | { |
| | | trace(x.GetXmlDoc().text); |
| | | trace(x.text()); |
| | | return -1; |
| | | }else |
| | | { |
| | |
| | | int OnPriceBillRetrieve() |
| | | { |
| | | int hItem = tv_folder_pricebill.GetSelectedItem(); |
| | | msxml::IXMLDOMElement e1 = cast(tv_folder_pricebill.GetItemData(hItem) as msxml::IXMLDOMElement); |
| | | string no = e1.getAttribute("no"); |
| | | KXMLDOMElement e1 = cast(tv_folder_pricebill.GetItemData(hItem) as KXMLDOMElement); |
| | | xstring no = e1.getAttribute(L"no"); |
| | | |
| | | xml x = new xml; |
| | | x.setNativePointer(xml::CreateInstance()); |
| | | xaserverarg arg = new xaserverarg; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | arg.AddArg("no",no); |
| | | if (getUrl("/sale/data/Enquiry/fetch/PriceList",arg.GetString(),x)!=1) |
| | | arg.AddArg(L"no",no); |
| | | if (getUrl(L"/sale/data/Enquiry/fetch/PriceList",arg.GetString(),x)!=1) |
| | | { |
| | | trace(x.GetXmlDoc().text); |
| | | trace(x.text()); |
| | | return -1; |
| | | }else |
| | | { |
| | |
| | | int OnProductPriceBillRetrieve() |
| | | { |
| | | int hItem = tv_folder_pricebill.GetSelectedItem(); |
| | | msxml::IXMLDOMElement e1 = cast(tv_folder_pricebill.GetItemData(hItem) as msxml::IXMLDOMElement); |
| | | string no = e1.getAttribute("no"); |
| | | KXMLDOMElement e1 = cast(tv_folder_pricebill.GetItemData(hItem) as KXMLDOMElement); |
| | | xstring no = e1.getAttribute(L"no"); |
| | | |
| | | xml x = new xml; |
| | | x.setNativePointer(xml::CreateInstance()); |
| | | xaserverarg arg = new xaserverarg; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | arg.AddArg("no",no); |
| | | if (getUrl("/sale/data/Enquiry/ProductPriceList/nobom",arg.GetString(),x)!=1) |
| | | arg.AddArg(L"no",no); |
| | | if (getUrl(L"/sale/data/Enquiry/ProductPriceList/nobom",arg.GetString(),x)!=1) |
| | | { |
| | | trace(x.GetXmlDoc().text); |
| | | trace(x.text()); |
| | | return -1; |
| | | }else |
| | | { |
| | |
| | | x.setNativePointer(xml::CreateInstance()); |
| | | xaserverarg arg = new xaserverarg; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | if (getUrl("/sale/data/Enquiry/ProductPriceList/share",arg.GetString(),x)!=1) |
| | | if (getUrl(L"/sale/data/Enquiry/ProductPriceList/share",arg.GetString(),x)!=1) |
| | | { |
| | | trace(x.GetXmlDoc().text); |
| | | trace(x.text()); |
| | | return -1; |
| | | }else |
| | | { |
| | | trace(x.GetXml()); |
| | | trace(x.xml()); |
| | | dw_pricelistshare.Retrieve(x); |
| | | dw_pricelistshare.Redraw(); |
| | | dw_pricelistshare.SetReadOnly(true); |
| | |
| | | listwin::onload(); |
| | | dw_list.SetAskStyle(true); |
| | | |
| | | dw_list2 = GetControl("dw_list2"); |
| | | dw_list2.openUrl("/sale/view/Enquiry3/template/list"); |
| | | dw_list2.SetColumnState("SupplierID",false); |
| | | dw_list2.SetColumnState("PayTerm",false); |
| | | dw_list2.SetColumnState("EnquiryID",false); |
| | | dw_list2.SetColumnState("Days",false); |
| | | dw_list2 = GetControl(L"dw_list2"); |
| | | dw_list2.openUrl(L"/sale/view/Enquiry3/template/list"); |
| | | dw_list2.SetColumnState(L"SupplierID",false); |
| | | dw_list2.SetColumnState(L"PayTerm",false); |
| | | dw_list2.SetColumnState(L"EnquiryID",false); |
| | | dw_list2.SetColumnState(L"Days",false); |
| | | dw_list2.SetSelectionMode(3); |
| | | |
| | | dw_goods2 = GetControl("dw_goods2"); |
| | | dw_goods2.openUrl("/sale/view/Enquiry3/template/item/pricelist"); |
| | | dw_goods2.SetColumnState("ItemID",false); |
| | | dw_goods2.SetColumnState("Picture",false); |
| | | dw_goods2.SetColumnState("category",false); |
| | | dw_goods2.SetColumnState("RealEnquiryLineID",false); |
| | | dw_goods2.SetColumnState("RelEnquiryLineID",false); |
| | | dw_goods2 = GetControl(L"dw_goods2"); |
| | | dw_goods2.openUrl(L"/sale/view/Enquiry3/template/item/pricelist"); |
| | | dw_goods2.SetColumnState(L"ItemID",false); |
| | | dw_goods2.SetColumnState(L"Picture",false); |
| | | dw_goods2.SetColumnState(L"category",false); |
| | | dw_goods2.SetColumnState(L"RealEnquiryLineID",false); |
| | | dw_goods2.SetColumnState(L"RelEnquiryLineID",false); |
| | | |
| | | |
| | | ddlb_1 = this.GetControl("cbx_1"); |
| | | dw_goods = GetControl("dw_goods"); |
| | | dw_goods .openUrl("/sale/view/Enquiry3/template/item/pricelist"); |
| | | dw_goods.SetColumnState("ItemID",false); |
| | | dw_goods.SetColumnState("SupplierID",false); |
| | | ddlb_1 = GetControl(L"cbx_1"); |
| | | dw_goods = GetControl(L"dw_goods"); |
| | | dw_goods .openUrl(L"/sale/view/Enquiry3/template/item/pricelist"); |
| | | dw_goods.SetColumnState(L"ItemID",false); |
| | | dw_goods.SetColumnState(L"SupplierID",false); |
| | | |
| | | dw_list1 = GetControl("dw_list1"); |
| | | dw_list1 .openUrl("/sale/view/Enquiry3/template/item/itempricelist"); |
| | | dw_list1.SetColumnState("ItemID",false); |
| | | dw_list1 = GetControl(L"dw_list1"); |
| | | dw_list1 .openUrl(L"/sale/view/Enquiry3/template/item/itempricelist"); |
| | | dw_list1.SetColumnState(L"ItemID",false); |
| | | |
| | | dw_goods1 = GetControl("dw_goods1"); |
| | | dw_goods1 .openUrl("/sale/view/Enquiry3/template/item/itempricelist"); |
| | | dw_goods1.SetColumnState("ItemID",false); |
| | | dw_goods1 = GetControl(L"dw_goods1"); |
| | | dw_goods1 .openUrl(L"/sale/view/Enquiry3/template/item/itempricelist"); |
| | | dw_goods1.SetColumnState(L"ItemID",false); |
| | | |
| | | dw_pricelistex = GetControl("dw_pricelistex"); |
| | | dw_pricelistex.openUrl("/sale/view/Enquiry3/template/purcharpricelist"); |
| | | dw_pricelistex.SetColumnState("EnquiryID",false); |
| | | dw_pricelistex.SetColumnState("PayTerm",false); |
| | | dw_pricelistex.SetColumnState("Source",false); |
| | | dw_pricelistex.SetColumnState("SONo",false); |
| | | dw_pricelistex.SetColumnState("OriginEnquiryLineID",false); |
| | | dw_pricelistex.SetColumnState("EnquiryLineID",false); |
| | | dw_pricelistex.SetColumnState("SupplierID1",false); |
| | | dw_pricelistex.SetColumnState("supplieridName1",false); |
| | | dw_pricelistex.SetColumnState("CustomerContactName",false); |
| | | dw_pricelistex.SetColumnState("ContactTel",false); |
| | | dw_pricelistex = GetControl(L"dw_pricelistex"); |
| | | dw_pricelistex.openUrl(L"/sale/view/Enquiry3/template/purcharpricelist"); |
| | | dw_pricelistex.SetColumnState(L"EnquiryID",false); |
| | | dw_pricelistex.SetColumnState(L"PayTerm",false); |
| | | dw_pricelistex.SetColumnState(L"Source",false); |
| | | dw_pricelistex.SetColumnState(L"SONo",false); |
| | | dw_pricelistex.SetColumnState(L"OriginEnquiryLineID",false); |
| | | dw_pricelistex.SetColumnState(L"EnquiryLineID",false); |
| | | dw_pricelistex.SetColumnState(L"SupplierID1",false); |
| | | dw_pricelistex.SetColumnState(L"supplieridName1",false); |
| | | dw_pricelistex.SetColumnState(L"CustomerContactName",false); |
| | | dw_pricelistex.SetColumnState(L"ContactTel",false); |
| | | |
| | | dw_pricelist = GetControl("dw_pricelist"); |
| | | dw_pricelist.openUrl("/sale/view/Enquiry3/template/purcharpricelistex"); |
| | | dw_pricelist.SetColumnState("ItemID",false); |
| | | dw_pricelist = GetControl(L"dw_pricelist"); |
| | | dw_pricelist.openUrl(L"/sale/view/Enquiry3/template/purcharpricelistex"); |
| | | dw_pricelist.SetColumnState(L"ItemID",false); |
| | | |
| | | dw_priceitem = GetControl("dw_priceitem"); |
| | | dw_priceitem.openUrl("/sale/view/Enquiry3/template/purcharpricelist/item"); |
| | | dw_priceitem = GetControl(L"dw_priceitem"); |
| | | dw_priceitem.openUrl(L"/sale/view/Enquiry3/template/purcharpricelist/item"); |
| | | |
| | | dw_pricelistshare = GetControl("dw_pricelistshare"); |
| | | dw_pricelistshare.openUrl("/sale/view/Enquiry3/template/purcharpricelist/item/share"); |
| | | dw_pricelistshare = GetControl(L"dw_pricelistshare"); |
| | | dw_pricelistshare.openUrl(L"/sale/view/Enquiry3/template/purcharpricelist/item/share"); |
| | | dw_pricelistshare.SetReadOnly(true); |
| | | |
| | | dw_pricelistex.SetColumnState("ItemID",false); |
| | | dw_pricelistex.SetColumnState("EnquiryLineID",false); |
| | | dw_pricelistex.SetColumnState(L"ItemID",false); |
| | | dw_pricelistex.SetColumnState(L"EnquiryLineID",false); |
| | | |
| | | dw_pricelistshare.SetColumnState("UserGroupID",false); |
| | | dw_pricelistshare.SetColumnState("EntityID",false); |
| | | dw_pricelistshare.SetColumnState("EntityName",false); |
| | | dw_pricelistshare.SetColumnState("PersonID",false); |
| | | dw_pricelistshare.SetColumnState("NO",false); |
| | | dw_pricelistshare.SetColumnState(L"UserGroupID",false); |
| | | dw_pricelistshare.SetColumnState(L"EntityID",false); |
| | | dw_pricelistshare.SetColumnState(L"EntityName",false); |
| | | dw_pricelistshare.SetColumnState(L"PersonID",false); |
| | | dw_pricelistshare.SetColumnState(L"NO",false); |
| | | |
| | | dw_priceitem.SetColumnState("PriceInfo",false); |
| | | dw_priceitem.SetColumnState("EnquiryID",false); |
| | | dw_priceitem.SetColumnState("PayTerm",false); |
| | | dw_priceitem.SetColumnState("Source",false); |
| | | dw_priceitem.SetColumnState("SONo",false); |
| | | dw_priceitem.SetColumnState("OriginEnquiryLineID",false); |
| | | dw_priceitem.SetColumnState("EnquiryLineID",false); |
| | | dw_priceitem.SetColumnState("SupplierID1",false); |
| | | dw_priceitem.SetColumnState("supplieridName1",false); |
| | | dw_priceitem.SetColumnState("CustomerContactName",false); |
| | | dw_priceitem.SetColumnState("ContactTel",false); |
| | | dw_priceitem.SetColumnState("Remark",false); |
| | | dw_priceitem.SetColumnState(L"PriceInfo",false); |
| | | dw_priceitem.SetColumnState(L"EnquiryID",false); |
| | | dw_priceitem.SetColumnState(L"PayTerm",false); |
| | | dw_priceitem.SetColumnState(L"Source",false); |
| | | dw_priceitem.SetColumnState(L"SONo",false); |
| | | dw_priceitem.SetColumnState(L"OriginEnquiryLineID",false); |
| | | dw_priceitem.SetColumnState(L"EnquiryLineID",false); |
| | | dw_priceitem.SetColumnState(L"SupplierID1",false); |
| | | dw_priceitem.SetColumnState(L"supplieridName1",false); |
| | | dw_priceitem.SetColumnState(L"CustomerContactName",false); |
| | | dw_priceitem.SetColumnState(L"ContactTel",false); |
| | | dw_priceitem.SetColumnState(L"Remark",false); |
| | | |
| | | |
| | | |
| | | myDataUrl = "/sale/data/Enquiry/folder/list"; |
| | | myDataUrl1 = "/sale/data/Enquiry/folder/listitems"; |
| | | urlTree = "/sale/data/Enquiry/folder"; |
| | | tv_folder = GetControl("tv_folder"); |
| | | myDataUrl = L"/sale/data/Enquiry/folder/list"; |
| | | myDataUrl1 = L"/sale/data/Enquiry/folder/listitems"; |
| | | urlTree = L"/sale/data/Enquiry/folder"; |
| | | tv_folder = GetControl(L"tv_folder"); |
| | | //tv_folder.SetLineAtRoot(true); |
| | | InitialFolder(); |
| | | |
| | | tv_folder_pricebill = GetControl("tv_folder_pricebill"); |
| | | tv_folder_pricebill = GetControl(L"tv_folder_pricebill"); |
| | | InitialFolderPriceBill(); |
| | | |
| | | } |
| | |
| | | |
| | | AttachEvent(); |
| | | |
| | | dw_list.SetColumnState("EnquiryID",false); |
| | | dw_list.SetColumnState("Days",false); |
| | | dw_list.SetColumnState(L"EnquiryID",false); |
| | | dw_list.SetColumnState(L"Days",false); |
| | | |
| | | dw_list1.SetColumnState("EnquiryLineID",false); |
| | | dw_list1.SetColumnState("EnquiryPriceListID",false); |
| | | dw_list1.SetColumnState(L"EnquiryLineID",false); |
| | | dw_list1.SetColumnState(L"EnquiryPriceListID",false); |
| | | |
| | | OnAttachEvent(); |
| | | OnRetrieve(); |
| | |
| | | tv_folder_pricebill.ExpandItem(hItem); |
| | | tv_folder_pricebill.ItemFocus(hItem); |
| | | |
| | | sheetname = "tab_list"; |
| | | sheetname = L"tab_list"; |
| | | |
| | | //dw_priceitem.SetColumnState("EnquiryLineID",false); |
| | | //dw_priceitem.SetColumnState("EnquiryPriceListID",false); |
| | | //dw_priceitem.SetColumnState(L"EnquiryLineID",false); |
| | | //dw_priceitem.SetColumnState(L"EnquiryPriceListID",false); |
| | | |
| | | dw_pricelistex.SetColumnState("BOMPartNo",false); |
| | | dw_pricelistex.SetColumnState("BOMSchema",false); |
| | | dw_pricelistex.SetColumnState("BOMType",false); |
| | | dw_pricelistex.SetColumnState("Current",false); |
| | | dw_pricelistex.SetColumnState(L"BOMPartNo",false); |
| | | dw_pricelistex.SetColumnState(L"BOMSchema",false); |
| | | dw_pricelistex.SetColumnState(L"BOMType",false); |
| | | dw_pricelistex.SetColumnState(L"Current",false); |
| | | |
| | | dw_priceitem.SetReadOnly(true); |
| | | |
| | |
| | | int ProcessUsedArg(xaserverarg arg) |
| | | { |
| | | int hItem = tv_folder.GetCaretItem(); |
| | | arg.AddArg("sheetname",sheetname); |
| | | arg.AddArg(L"sheetname",sheetname); |
| | | if(hItem > 0) |
| | | { |
| | | msxml::IXMLDOMElement e = tv_folder.GetItemData(hItem); |
| | | KXMLDOMElement e = tv_folder.GetItemData(hItem); |
| | | |
| | | if(e) |
| | | { |
| | | string no = e.getAttribute("no"); |
| | | if(no.find("Customer:")>=0) |
| | | xstring no = e.getAttribute(L"no"); |
| | | if(no.find(L"Customer:")>=0) |
| | | { |
| | | arg.AddArg("CustomerID",e.getAttribute("id")); |
| | | string name = e.getAttribute("name"); |
| | | if(name.find("(")>=0) name = name.left(name.find("(")); |
| | | arg.AddArg("CustomerName",name); |
| | | arg.AddArg(L"CustomerID",e.getAttribute(L"id")); |
| | | xstring name = e.getAttribute(L"name"); |
| | | if(name.find(L"(L")>=0) name = name.left(name.find(L"(L")); |
| | | arg.AddArg(L"CustomerName",name); |
| | | } |
| | | } |
| | | } |