From e3f724c9fd36995c207a6ed173849c20aaa2e3d7 Mon Sep 17 00:00:00 2001 From: LiFan <2308045698@qq.com> Date: 星期二, 17 十二月 2024 13:06:22 +0800 Subject: [PATCH] update --- jrj/project/business/Enquiry/SKU.PictureView.Product3.cpp | 695 +++++++++++++++------------------------------------------ 1 files changed, 191 insertions(+), 504 deletions(-) diff --git a/jrj/project/business/Enquiry/SKU.PictureView.Product3.cpp b/jrj/project/business/Enquiry/SKU.PictureView.Product3.cpp index 6c3d5bb..bc2201d 100644 --- a/jrj/project/business/Enquiry/SKU.PictureView.Product3.cpp +++ b/jrj/project/business/Enquiry/SKU.PictureView.Product3.cpp @@ -1,542 +1,229 @@ #include <wobject/xstring.hpp> #include <xcontrol/xtreeview.hpp> #include <xcontrol/xdwgrid.hpp> +#include <wobject/xdouble.hpp> +#include <xcontrol/xlayersheet.hpp> +#include <xcontrol/xdatetimepick.hpp> +#include <xcontrol/ximageview.hpp> #include "vbusiness/vframe/listwin.vframe.vbusiness.hpp" #include "viewobject/view.base.hpp" using xml = KXMLDOMDocument; -class __declspec(dllexport) listSupplierv3 : public listwin -{ -public: - xdwgrid dw_goods; - xtreeview tv_1; - xcombobox ddlb_1; - int changeddlb; - xstring TypeWork; - xstring GoodsUrl; - xstring m_sType; //type - xstring m_sTypeTxt; //选中树的data - // xstring m_searchtxt; - int PIndex; - xnode m_agentNode; //Agent Condition - xstring m_agentCond; //Agent Node - -public: - listSupplierv3(void* implPtr, HWND hWnd) :listwin(implPtr, hWnd) {} -public: - static listSupplierv3* CreateInstance(void* implPtr, void* hWnd) + class __declspec(dllexport) SKUProductPictureView3 : public xframe { - listSupplierv3* pWin = new listSupplierv3(implPtr, (HWND)hWnd); - return pWin; - } - int OnRetrieve() - { - xml x; - - xaserverarg arg; - arg.AddArg(L"pageindex", xstring(PIndex)); //第几页 - arg.AddArg(L"pagenumber", xstring(listwin::m_pageNumber)); //每页数量 - arg.AddArg(L"QueryTxt", listwin::m_QueryTxt); - arg.AddArg(L"sType", m_sType); - arg.AddArg(L"sTypeTxt", m_sTypeTxt); - trace(arg.GetString()); - //alert(L"xxxx"); - if (getUrl(GetServerUrl(), L"/sale/data/" + GetEntityName(1) + L"/entity/list", arg.GetString(), x) != 1) + public: + ximageview im; + xml doc; + HWND m_winHwnd; + HWND ParentHWND; + public: + SKUProductPictureView3(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {} + public: + static SKUProductPictureView3* CreateInstance(void* implPtr, void* hWnd) { - return -1; + SKUProductPictureView3* pWin = new SKUProductPictureView3(implPtr, (HWND)hWnd); + return pWin; } - else + int hiddenBox(xstring name, bool f) { - KXMLDOMElement e = x.documentElement(); - if (listwin::dw_pages && e.selectSingleNode(L"@TotalPage")) + //xnode anode = GetAgentNode(name); + xnode anode = GetAgentNode(name); + int LayerFlow_None_ = 0x00000001; + int LayerFlow_UnLayer_ = 0x00000100; + int LayerFlow_NS_ = 0x00000004; + int LayerFlow_WE_ = 0x00000008; + int LayerFlow_Control_ = 0x00000010; + if (f) + anode.SetLayerFlow(LayerFlow_WE_ | LayerFlow_Control_); + else + anode.SetLayerFlow(LayerFlow_None_ | LayerFlow_UnLayer_); + return 1; + } + + int OnImgDBClicked(TEvent* evt, LPARAM pr) + { + IMGNNMHDR& nmtv = *(IMGNNMHDR*)evt->notify.pnmh; + xstring src = nmtv.path; + /*if(src.length() > 60) + src = src.right(44); + else + src=src.mid(src.find(L"Thumbs", 0)+6, 50); + */ + xaserverarg arg; + + //arg.AddArg(L"src",L"/business/products/chanpin"+src); + arg.AddArg(L"src", src); + + //win::OpenWindow(L"dev:xpage[BigPicture.vx]",arg); + + int h = openUrl(L"/sale/view/ProductLibrary/xpage/bigpictureview", arg); + return 1; + + /*xwin x = new xwin; + x.setNativePointer(h); + m_winHwnd = x.GetHWND(); + + xstring sh = doc.xml(); + int p = cast(sh as int); + win32::SendMessage(m_winHwnd, 0x401, p, 0); + return 1;*/ + } + + int OnCmdDispatch(xstring comdid) + { + if (comdid == L"xmSave") { - xstring s = e.selectSingleNode(L"@TotalPage").text(); //总数量 - listwin::dw_pages.SetMaxPage(s.toInt()); + xstring x = L" "; + xutil::OpenDialog(GetHWND(), x); + if (x == L"") return 0; + + KXMLDOMElement e = doc.selectSingleNode(L"ImageList"); + KXMLDOMNodeList nlist = e.selectNodes(L"image"); + + HCURSOR hCursor = xutil::SetCursorWait(); + int s = nlist.length(); + xstring result = L""; + for (int i = 0; i < s; i++) + { + KXMLDOMElement xitem = nlist.item(i); + xstring picname = xitem.selectSingleNode(L"PicPath").text(); + if (picname == L"") continue; + xstring goodsno = xitem.selectSingleNode(L"GoodsNo").text(); + xstring src = picname.mid(26, picname.length()); + //trace(picname + L"-->" + src + L"\r\n"); + if (src == L"" || src == L"/") continue; + int openRet = xaserver::DownLoadFile(GetServerUrl(), L"/business/products/chanpin/" + src, L"", x + L"/" + goodsno + L".jpg"); + if (openRet < 0) + { + //trace(picname + L"-->" + src + L"\r\n"); + result += goodsno + L" "; + } + } + xutil::RestoreCursor(hCursor); + if (result != L"") + alert(result + L"\r\n以上货号下载图片失败!"); + else + alert(L"保存完毕!"); } - //alert(x.GetXml()); - dw_list.Retrieve(x); - dw_list.Redraw(); - dw_list.SetReadOnly(true); - } - return 1; - } - - int SetEntityData(xaserverarg arg) - { - xstring strQueryTxt = arg.GetArgString(L"QueryTxt"); - xml x; - - arg.AddArg(L"sType", m_sType); - arg.AddArg(L"sTypeTxt", m_sTypeTxt); - trace(arg.GetString()); - if (getUrl(GetServerUrl(), L"/sale/data/" + GetEntityName(1) + L"/entity/list", arg.GetString(), x) != 1) - { - alert(x.text()); - - return -1; - } - else - { - KXMLDOMElement e = x.documentElement(); - if (listwin::dw_pages && e.selectSingleNode(L"@TotalPage")) + else if (comdid == L"xmDelete") { - - xstring s = e.selectSingleNode(L"@TotalPage").text(); //总数量 - listwin::dw_pages.SetMaxPage(s.toInt()); + if (ParentHWND) + { + int nIndex = im.GetSelectIndex(); + if (nIndex < 0 || nIndex >= im.GetImageCount()) return 0; + im.RemoveImage(nIndex); + im.Redraw(); + xstring comd = L"Delete:" +xstring(nIndex); + SendMessage(ParentHWND, 0x401, (WPARAM)comd.c_str(), 0); + } } - //trace(x.GetXml()); - listwin::dw_list.Retrieve(x); - listwin::dw_list.Redraw(); - listwin::dw_list.SetReadOnly(true); + return 0; } - return 1; - } - - int OnChangePages(TEvent* evt, LPARAM p) - { - PAGENMHDR* h = (PAGENMHDR*)evt->notify.pnmh; - int c = h->cur; - - - HCURSOR hCursor = xutil::SetCursorWait(); - OnRetrieve(); - PIndex = c; - xutil::RestoreCursor(hCursor); - return 1; - - - } - - int ViewUpdate(int pr, xstring updateItem, xaserverarg arg) - { - if (updateItem == L"refresh") + int OnXCommand(TEvent* evt, int param) { - //trace(L"sd"); - xdwpages zz = GetControl(L"pages"); - int h = zz.SetCurPage(1); - //trace(h); - OnRetrieve(); + return OnCmdDispatch(evt->xcommand.pStrID); } - return 1; - } - //树选择 - int OnTreeSelChanged(TEvent evt, LPARAM p) - { - if (changeddlb != 1) + int OnCombboChange(TEvent* evt, int lParam) { - //alert(L"1"); - - HTREEITEM h = tv_1.GetSelectedItem(); - KXMLDOMElement& e = *(KXMLDOMElement*)tv_1.GetItemData(h); - - xstring t = e.selectSingleNode(L"@type").text(); - m_sType = t + L""; - xstring txt = e.selectSingleNode(L"@code").text(); - if (txt == L"") - txt = e.selectSingleNode(L"@name").text(); - m_sTypeTxt = txt + L""; - - //alert(m_sTypeTxt); - - PIndex = 1; - OnRetrieve(); + xcombobox xc = GetControl(L"precent"); + xstring text = xc.GetLBText(); + int p = text.toInt(); + if (p == 0) p = 100; + im.Preview(p); + return 1; } - return 1; - } - int createSubTree(HTREEITEM h, KXMLDOMElement ele) - { - KXMLDOMNodeList nlist = ele.selectNodes(L"item"); - int i; - int s = nlist.length(); - if (s > 0) - for (i = 0; i < s; i++) + int OnAttachEvent() + { + AttachEvent(L"im1", L"IMG_LDBCLICK", (FEvent)&SKUProductPictureView3::OnImgDBClicked); + AttachEvent(L"WM_XCOMMAND", (FEvent)&SKUProductPictureView3::OnXCommand); + AttachEvent(L"precent", L"CBN_SELCHANGE", (FEvent)&SKUProductPictureView3::OnCombboChange); + return 1; + } + + int init() + { + xml x ; + + xaserverarg arg; + + if (GetWinParam()) + arg = GetArg(); + else + return 0; + + if (xurl::get(GetEntityName(1) + L"/pref/category/picture/list", arg.GetString(), x) != 1) { - - KXMLDOMElement* e = new KXMLDOMElement(nlist.item(i)); - xstring name = e->selectSingleNode(L"@name").text(); - HTREEITEM hw = tv_1.InsertChildItem(h, name, (LPARAM)e, 15); - createSubTree(hw, *e); + trace(L"error:" + xstring(x.xml(), true)); + return 0; } - return 1; - } - - int OnCreateTree(xstring sType) - { - - while (tv_1.GetRootItem()) - tv_1.DeleteItem(tv_1.GetRootItem()); - - xml x; - - xaserverarg arg; - - arg.AddArg(L"sType", sType); - //Tree.pref.supplier.xq - //getUrl(GetEntityName(1)+L"/entity/list",arg.GetString(),x); - //if (xaserver::ExecXQuery(GetServerUrl(),L"[Tree.pref.supplier.xq]",arg.GetString(),x)!=1) - if (getUrl(GetServerUrl(), L"/sale/data/" + GetEntityName(1) + L"/pref/list/tree", arg.GetString(), x) != 1) - { - trace(x.text()); - return -1; + //trace(arg.GetString()); + //trace(x.GetXml()); + return 1; } - else + + int onload() { - KXMLDOMNodeList nlist = x.selectNodes(L"root/item"); - int len = nlist.length(); - if (len > 0) + SetArg(); + im = GetControl(L"im1"); + OnAttachEvent(); + + ParentHWND = 0; + + if (GetWinParam()) { + xaserverarg arg = GetArg(); + ParentHWND = (HWND)arg.GetParam(L"ParentHWND"); + xstring openflag = arg.GetArgString(L"OpenFlag"); + //alert(openflag); + if (openflag != L"0") hiddenBox(L"xmDelete", false); + //trace(arg.GetString()); + xml x ; + + //alert(arg.GetString()); + //if(url::get(L"/sale/data/product/pref/category/picture/list",arg.GetString(),x)!=1) + if (xurl::get(L"/sale/data/ProductLibrary3/pref/picture/imagelistSKUNoList", arg.GetString(), x) != 1) + { + trace(L"error:" + xstring(x.xml(), true)); + return 0; + } + doc = x; + //alert(x.xml()); + KXMLDOMElement e = x.selectSingleNode(L"ImageList"); + KXMLDOMNodeList nlist = e.selectNodes(L"image"); int i; - for (i = 0; i < len; i++) + int s = nlist.length(); + for (i = 0; i < s; i++) { - - KXMLDOMElement* e = new KXMLDOMElement(nlist.item(i)); - xstring name = e->selectSingleNode(L"@name").text(); - HTREEITEM hw = tv_1.InsertChildItem(0, name, (LPARAM)e, 15); - - createSubTree(hw, *e); - tv_1.ExpandItem(hw); + KXMLDOMElement xitem = nlist.item(i); + xstring picname = xitem.selectSingleNode(L"PicPath").text(); + xstring goodno = xitem.selectSingleNode(L"GoodsNo").text(); + //trace(picname + L"\r\n"); + if (picname == L"/business/products/Thumbs//") + picname = L"/business/products/Thumbs/00/00000000-0000-0000-0000-000000000000.jpg"; + im.AddImages(picname, goodno); } - tv_1.ExpandItem(0); + im.Redraw(); } - } - - return 1; - } - - //xcombobox下拉 - int OnSelectDdlb(TEvent evt, LPARAM p) - { - changeddlb = 1; - - int CB_GETCURSEL = 0x0147; - int nIndex = SendMessageW(ddlb_1.GetHWND(), CB_GETCURSEL, 0, 0); - KXMLDOMElement e = ddlb_1.GetElement();//GetitemData(wid,nIndex);//ddlb_1.GetElement(); - KXMLDOMElement e2 = e.selectSingleNode(L"item[" + xstring((nIndex + 1)) + L"]"); - xstring text = e2.selectSingleNode(L"@element").text(); - OnCreateTree(text); - changeddlb = 0; - return 1; - } - - int OnDeleteRow() - { - int row = listwin::dw_list.GetNextSelectRow(1); - if (row < 1) { - row = listwin::dw_list.GetRow(); - if (row < 1) { - //win::MessageBox(GetHWND(),L"请选中要删除的行!",L"提示",0); - return -1; + else { + im.AddImages(L"/business/products/chanpin/BL-002/291679.jpg", L"x1"); + im.AddImages(L"/business/products/chanpin/BL-002/291759.jpg", L"x2"); + im.AddImages(L"/business/products/chanpin/BL-002/417884.jpg", L"x3"); + im.Redraw(); } - } + SetFocus(im.GetHWND()); - KXMLDOMElement e = listwin::dw_list.GetRowElement(row); - //xstring sguid = e.SelectSingleNode(L"@guid").text; - //xstring sName = e.selectSingleNode(L"Name").text+L""; - xstring sguid = dw_list.GetItemString(dw_list.GetRow(), L"SupplierID"); - xstring sName = dw_list.GetItemString(dw_list.GetRow(), L"Name"); - int MB_YESNO = 0x00000004; - int IDYES = 6; - if (MessageBoxW(GetHWND(), L"确认要删除供应商 " + sName + L" 的信息吗?", L"提示", MB_YESNO) != IDYES) return 1; - xml x; + xstring userno = xaserver::GetUserNo(); + /*if(userno == L"1003" || userno == L"1137" || userno == L"admin") { + //hiddenBox(); + } else { + hiddenBox(L"xmSave", false); + }*/ + hiddenBox(L"xmSave", false); - xaserverarg arg; - arg.setNativePointer(arg.CreateInstance()); - arg.AddArg(L"guid", sguid); - arg.AddArg(L"EntityID", sguid); - // trace(sguid); - if (xurl::post(GetServerUrl(), L"/sale/data/" + GetEntityName(1) + L"/entity/delete", arg.GetString(), x) != 1) - { - xstring error = x.text(); - trace(error); - } - else - { - KXMLDOMElement msg = x.selectNodes(L"process").item(0); - xstring success = msg.selectSingleNode(L"@finished").text(); - if (success == L"0") - { - alert(msg.selectSingleNode(L"@errInfo").text()); - } - else - { - MessageBoxW(GetHWND(), L"删除成功!", L"提示", 0); - listwin::dw_list.DeleteRow(row); - } - } - return 1; - } - - int OnRowChangedEx(TEvent* evt, LPARAM p) - { - DWNMHDR& hdr = *(DWNMHDR*)evt->notify.pnmh; - int row = hdr.row; - //if(row < 1 or row > dw_list.GetRowCount()) return 1; - KXMLDOMElement ele = listwin::dw_list.GetRowElement(row); - xstring entity = ele.selectSingleNode(L"SupplierID").text(); - xml x; - - xaserverarg arg; - arg.setNativePointer(arg.CreateInstance()); - arg.AddArg(L"EntityID", entity); - - - xstring no1 = publiccode::GetUser().no; - if (no1 != L"00201") - { - - if (TypeWork.find(L"采购") >= 0) - { - GoodsUrl = L"/sale/data/SupplierV3/entity/supplieritemEx"; - } - else - { - GoodsUrl = L"/sale/data/SupplierV3/entity/supplieritem"; - } - } - else - { - GoodsUrl = L"/sale/data/SupplierV3/entity/supplieritem"; - } - if (getUrl(GetServerUrl(), GoodsUrl, arg.GetString(), x) != 1) - { - trace(x.text()); return -1; } - else - { - dw_goods.Retrieve(x); - dw_goods.Redraw(); - dw_goods.SetReadOnly(true); - } - SetAgent(L"list", entity); - return 1; - } - - int GridSearch() - { - //alert(L"你好"); -#if 0 - - xstring m_config = L"view.Supplier.v3.config"; - xdwgrid dw = listwin::dw_list; - xaserverarg& arg = *new xaserverarg; - arg.setNativePointer(arg.CreateInstance()); - xstring str = TFile::node(m_config, L"config", L"search"); - if (str != L"") { - arg.AddArg(L"sheet", str); - } - else - arg.AddArg(L"sheet", L"dev:sheet[Supplier.v3.tpl/list]"); - arg.AddArg(L"search", listwin::m_QueryTxt); - openUrl(L"view.dlg.vface/xpage/grid/column/search", &arg); - xstring ok = arg.GetArgString(L"return"); - if (ok == L"ok") { - xstring txt = arg.GetArgString(L"search"); - if (txt != L"") { - listwin::m_QueryTxt = txt; - //trace(txt); - OnRetrieve(); - } - } -#endif - return 0; - } - - int OnSelectAllRow() - { - int rows = listwin::dw_list.GetRowCount(); - if (rows < 1) return -1; - listwin::dw_list.SelectRow(1, rows, true); - listwin::dw_list.Redraw(); - return 1; - } - - int OnRClick(TEvent evt, LPARAM p) - { - return 1; - } - int OnLogOff() - { - return 1; - } - int OnChecked() - { - xstring partyno = dw_list.GetItemString(dw_list.GetRow(), L"PartyNo"); - if (partyno.find(L"N") < 0) - { - alert(L"已经是正式供应商"); - return 0; - } - xstring entityid = GetEntityID(dw_list.GetRow()); - int MB_OKCANCEL = 1; - int IDOK = 1; - int ret = MessageBoxW(GetHWND(), L"是否转成正式供应商?", L"提示", MB_OKCANCEL); - if (ret == IDOK) - { - xml x = ViewObject::RetrieveData(GetServerUrl(), L"/sale/data/SupplierV3/entity/updateno", L"entityid", entityid); - - if (xstring(x.xml()).find(L"success") > 0) - { - alert(L"处理成功"); - OnRetrieve(); - } - } - return 1; - } - int PreOnCmdDispatch(xstring comdid) - { - //alert(comdid); - - if (comdid.find(L"action:LogOff", 0) >= 0) return OnLogOff(); - if (comdid.find(L"action:bill.delete", 0) >= 0) - { - OnDeleteRow(); - return 0; - } - if (comdid == L"action:search1") return GridSearch(); - if (comdid == L"action:bill.refresh") - { - return OnRetrieve(); - } - if (comdid == L"action:bill.xmSaveAs") - { - xstring userno = publiccode::GetUser().no; - if (userno == L"00701" || userno == L"00601" || userno == L"admin") - { - dw_list.SaveAs(L""); - } - return 1; - } - if (comdid == L"action:bill.Annex") - { - xaserverarg& arg = *new xaserverarg; - arg.setNativePointer(arg.CreateInstance()); - arg.AddArg(L"entityid", dw_list.GetItemString(dw_list.GetRow(), L"SupplierID")); - arg.AddArg(L"ApplyStatus", dw_list.GetItemString(dw_list.GetRow(), L"ApplyStatus")); - - OpenWindow(L"dev:xpage[maint.Document.Supplier.v3.vx]", (LPARAM)&arg); - return 1; - } - if (comdid == L"action:bill.AnnexEx") - { - xaserverarg& arg4 = *new xaserverarg; - arg4.setNativePointer(arg4.CreateInstance()); - arg4.AddArg(L"entityid", dw_list.GetItemString(dw_list.GetRow(), L"SupplierID")); - //arg4.AddArg(L"ApplyStatus",dw_list.GetItemString(dw_list.GetRow(),L"ApplyStatus")); - - //OpenWindow(L"dev:xpage[maint.Document.Customer.v3.vx]", p4); - OpenWindow(L"dev:xpage[maint.Document.SupplierSD.v3.vx]", (LPARAM)&arg4); - return 1; - } - if (comdid == L"action:bill.checked") - return OnChecked(); - // if(comdid==L"action:bill.import") return OnImport(); - // if(comdid.find(L"action:",0)>=0) return ProcessFlowAction(comdid,1); - //if(comdid==L"search") return GridSearch(L"view.dlg.vface/xpage/grid/column/edit"); - //if(comdid==L"showall") return ShowAll(); - - return 1; - } - - - int PostOnAttachEvent() - { - //获得树的选择事件 - AttachEvent(L"tv_1", L"TVN_SELCHANGED", (FEvent)&listSupplierv3::OnTreeSelChanged); - AttachEvent(L"cbx_1", L"CBN_SELCHANGE", (FEvent)&listSupplierv3::OnSelectDdlb); - AttachEvent(L"pages", L"PAGE_CLICK", (FEvent)&listSupplierv3::OnChangePages); - AttachEvent(L"dw_list", L"DWV_RCLICKED", (FEvent)&listSupplierv3::OnRClick);//鼠标右键 - //AttachEvent(L"dw_list", L"DWV_DOUBLECLICKED", (FEvent)&listSupplierv3::OnDoubleClicked); - - return 1; - } - - int onload() - { - PIndex = 1; - listwin::m_QueryTxt = L""; //查询条件 - m_sType = L""; //type - m_sTypeTxt = L""; //选中树的data - - listwin::onload(); - - tv_1 = GetControl(L"tv_1"); - ddlb_1 = GetControl(L"cbx_1"); - - changeddlb = 0; - OnCreateTree(L"GoodsCates"); - dw_list.SetColumnState(L"SupplierID", false); - dw_list.SetColumnState(L"userNo", false); - dw_list.SetColumnState(L"YearEstablished", false); - dw_list.SetColumnState(L"LegalPerson", false); - dw_list.SetColumnState(L"ThirdPartyReport", false); - dw_list.SetColumnState(L"bAddress", false); - dw_list.SetColumnState(L"PayType", false); - dw_list.SetColumnState(L"PicPath", false); - dw_list.SetColumnState(L"SDID", false); - dw_list.SetColumnState(L"AdvantageProduct", false); - //dw_list.SetColumnState(L"ApplyStatus",false); - - dw_goods = GetControl(L"dw_goods"); - dw_goods.openUrl(GetServerUrl(), L"/sale/view/SupplierV3/template/supplier/supplieritem"); - - if (publiccode::GetUser().name != L"admin") - { - xstring s = publiccode::GetUser().id; - - xml supplier_x = ViewObject::RetrieveData(GetServerUrl(), L"/sale/data/SupplierV3/entity/FindBySaleType", L"id", s); - if (supplier_x) - { - TypeWork = supplier_x.text(); - - if (TypeWork.find(L"采购") >= 0) - { - - dw_list.SetColumnState(L"DateEx", false); - dw_list.SetColumnState(L"DateExS", false); - dw_list.SetColumnState(L"Name", false); - dw_list.SetColumnState(L"ProvinceCode", false); - dw_list.SetColumnState(L"City", false); - dw_list.SetColumnState(L"District", false); - dw_list.SetColumnState(L"Address", false); - dw_list.SetColumnState(L"CName", false); - dw_list.SetColumnState(L"TEL", false); - dw_list.SetColumnState(L"Mob", false); - dw_list.SetColumnState(L"AreaCode", false); - dw_list.SetColumnState(L"Fax", false); - dw_goods.SetColumnState(L"Price", false); - dw_goods.SetColumnState(L"PackRMBPrice", false); - dw_goods.SetColumnState(L"PartRMBPrice", false); - dw_goods.SetColumnState(L"PaperRMBPrice", false); - dw_goods.SetColumnState(L"ETD", false); - dw_goods.SetColumnState(L"InvoiceNo", false); - - } - } - - } - - return 1; - } - - int onloaded() - { - AttachEvent(L"dw_list", L"DWV_ROWFOCUSCHANGED", (FEvent)&listSupplierv3::OnRowChangedEx); - - listwin::onloaded(); - xstring EntityID; - int row = dw_list.GetRow(); - if (row<0 || row>dw_list.GetRowCount()) return 1; - KXMLDOMElement ele = dw_list.GetRowElement(row); - xstring id = listwin::m_configDoc.selectSingleNode(L"//entity/EntityID[1]").text(); - if (ele.selectSingleNode(id)) - EntityID = ele.selectSingleNode(id).text(); - listwin::SetAgent(L"list", EntityID); - return 1; - } - -}; \ No newline at end of file + }; \ No newline at end of file -- Gitblit v1.9.3