| | |
| | | class __declspec(dllexport) EntityProductSelectWin : public xwin |
| | | { |
| | | public: |
| | | int hObject = 0; |
| | | HWND hObject = 0; |
| | | xstring CustomerID; |
| | | xstring SupplierID; |
| | | xstring m_customer; |
| | |
| | | xml x ; |
| | | |
| | | x.loadXML(L"<Item update.new='1' update.modify='1' guid='" + id + L"'>" + |
| | | "<ProductPictureID>" + id + L"</ProductPictureID>" + |
| | | "<OriginFile>" + originfile + L"</OriginFile>" + |
| | | "<FileExt>" + ext + L"</FileExt>" + |
| | | "<SKUID>" + skuid + L"</SKUID>" + |
| | | "<Name>[" + SKUNo.trim() + L"]</Name>" + |
| | | "<FileName>" + id + L".jpg</FileName>" + |
| | | "</Item>" |
| | | L"<ProductPictureID>" + id + L"</ProductPictureID>" + |
| | | L"<OriginFile>" + originfile + L"</OriginFile>" + |
| | | L"<FileExt>" + ext + L"</FileExt>" + |
| | | L"<SKUID>" + skuid + L"</SKUID>" + |
| | | L"<Name>[" + SKUNo.trim() + L"]</Name>" + |
| | | L"<FileName>" + id + L".jpg</FileName>" + |
| | | L"</Item>" |
| | | ); |
| | | |
| | | xaserverarg arg; |
| | |
| | | xml x ; |
| | | |
| | | x.loadXML(L"<Item update.new='1' update.modify='1' guid='" + id + L"'>" + |
| | | "<ProductPictureID>" + id + L"</ProductPictureID>" + |
| | | "<OriginFile>" + originfile + L"</OriginFile>" + |
| | | "<FileExt>" + ext + L"</FileExt>" + |
| | | "<SKUID>" + skuid + L"</SKUID>" + |
| | | "<CustomerItemNo>" + CustomerItemNo + L"</CustomerItemNo>" + |
| | | "<CustomerID>" + CustomerID + L"</CustomerID>" + |
| | | "<Name>[" + SKUNo.trim() + L"]</Name>" + |
| | | "<FileName>" + id + L".jpg</FileName>" + |
| | | "</Item>" |
| | | L"<ProductPictureID>" + id + L"</ProductPictureID>" + |
| | | L"<OriginFile>" + originfile + L"</OriginFile>" + |
| | | L"<FileExt>" + ext + L"</FileExt>" + |
| | | L"<SKUID>" + skuid + L"</SKUID>" + |
| | | L"<CustomerItemNo>" + CustomerItemNo + L"</CustomerItemNo>" + |
| | | L"<CustomerID>" + CustomerID + L"</CustomerID>" + |
| | | L"<Name>[" + SKUNo.trim() + L"]</Name>" + |
| | | L"<FileName>" + id + L".jpg</FileName>" + |
| | | L"</Item>" |
| | | ); |
| | | |
| | | xaserverarg arg; |
| | |
| | | |
| | | xstring html = L"<html><style> .text{ font-weight:400} .label { font-weight:400;}</style><body style='margin:2;background-color1:#ccdccc none #f0f0f0 none'>"; |
| | | html += L"<div ><span style='font-weight:700;width:50;font-size:10pt' >编号:</span><span style='width:90;font-size:10pt'>" + dw_list.GetItemString(row, L"No") + |
| | | "</span> <span style='font-weight:700;width:50;font-size:10pt' >类项:</span><span style='width:90;font-size:10pt'>" + dw_list.GetItemString(row, L"RefNo") + |
| | | "</span></div>"; |
| | | L"</span> <span style='font-weight:700;width:50;font-size:10pt' >类项:</span><span style='width:90;font-size:10pt'>" + dw_list.GetItemString(row, L"RefNo") + |
| | | L"</span></div>"; |
| | | html += L"<div ><span style='font-weight:700;width:50;font-size:10pt' >货号:</span><span style='width:90;font-size:10pt'>" + dw_list.GetItemString(row, L"GoodsNo") + |
| | | "</span></div>"; |
| | | L"</span></div>"; |
| | | html += L"<div ><span style='font-weight:700;width:50;font-size:10pt' >品名:</span><span style='width:90;font-size:10pt'>" + dw_list.GetItemString(row, L"CName") + |
| | | "</span></div>"; |
| | | L"</span></div>"; |
| | | if (dw_list.GetItemString(row, L"CSpec") != L"") |
| | | html += L"<div ><span style='font-weight:700;width:50;font-size:10pt' >规格:</span><span style='width:90;font-size:10pt'>" + dw_list.GetItemString(row, L"CSpec") + |
| | | "</span></div>"; |
| | | L"</span></div>"; |
| | | |
| | | KXMLDOMNodeList fieldsEx = x1.selectNodes(L"data/field"); |
| | | xstring ls_detail = L""; |
| | |
| | | } |
| | | ls_detail += L"<tr>" + ls_item + L"</tr>"; |
| | | } |
| | | html += L"<div style='margin-left:8px;margin-right:16px;'>" + |
| | | html += (xstring)L"<div style='margin-left:8px;margin-right:16px;'>" + |
| | | +L"<table><colgroup span='1' width='70'/><colgroup span='1' width='120'/><colgroup span='1' width='70'/><colgroup span='1' width='120'/>" |
| | | + ls_detail |
| | | + L"</table>" |
| | |
| | | xstring terms = L""; |
| | | for (int k = 0; k < tlen; k++) |
| | | { |
| | | if (options.item(k).text) |
| | | if (options.item(k).text()) |
| | | { |
| | | if (k > 0) terms += L", L"; |
| | | terms += L"[" + options.item(k).text + L"]"; |
| | | terms += L"[" + xstring(options.item(k).text()) + L"]"; |
| | | } |
| | | } |
| | | ls_star += L"<div ><span style='font-weight:700;width:50;font-size:10pt' >" + label + L"*:</span><span style='width:90;font-size:10pt'>" + terms + L"</span></div>"; |
| | |
| | | ls_detail += ls_item; |
| | | } |
| | | |
| | | html += L"<div style='margin-left:8px;margin-right:16px;'>" + |
| | | html += (xstring)L"<div style='margin-left:8px;margin-right:16px;'>" + |
| | | +L"<table><colgroup span='1' width='70'/><colgroup span='1' width='120'/><colgroup span='1' width='70'/><colgroup span='1' width='120'/>" |
| | | + ls_detail |
| | | + L"</table>" |
| | |
| | | |
| | | xstring html = L"<html><style> .text{ font-weight:400} .label { font-weight:400;}</style><body style='margin:2;background-color1:#ccdccc none #f0f0f0 none'>"; |
| | | html += L"<div ><span style='font-weight:700;width:50;font-size:10pt' >编号:</span><span style='width:90;font-size:10pt'>" + dwc_list.GetItemString(row, L"No") + |
| | | "</span></div>"; |
| | | L"</span></div>"; |
| | | html += L"<div ><span style='font-weight:700;width:50;font-size:10pt' >品名:</span><span style='width:90;font-size:10pt'>" + dwc_list.GetItemString(row, L"CName") + |
| | | "</span></div>"; |
| | | L"</span></div>"; |
| | | html += L"<div ><span style='font-weight:700;width:50;font-size:10pt' >规格:</span><span style='width:90;font-size:10pt'>" + dwc_list.GetItemString(row, L"CSpec") + |
| | | "</span></div>"; |
| | | L"</span></div>"; |
| | | |
| | | KXMLDOMNodeList fields = x.selectNodes(L"data/field"); |
| | | int len = fields.length(); |
| | | html += L"<table>" + |
| | | "<colgroup span='1' width='80'/>" + |
| | | "<colgroup span='1' width='120'/>" + |
| | | "<colgroup span='1' width='420'/>"; |
| | | html += (xstring)L"<table>" + |
| | | L"<colgroup span='1' width='80'/>" + |
| | | L"<colgroup span='1' width='120'/>" + |
| | | L"<colgroup span='1' width='420'/>"; |
| | | html += L"<tr>"; |
| | | html += L"<td style='text-align:center'>编号</td><td style='text-align:center'>项目</td><td style='text-align:center'>内容</td>"; |
| | | html += L"</tr>"; |
| | |
| | | xstring label = fields.item(i).selectSingleNode(L"@label").text(); |
| | | html += L"<tr>"; |
| | | if (i == 0) |
| | | html += L"<td rowspan='" + len.toString() + L"'>" + No + L"</td><td >" + label + L"</td><td >" + L"</td>"; |
| | | html += L"<td rowspan='" + xstring(len) + L"'>" + No + L"</td><td >" + label + L"</td><td >" + L"</td>"; |
| | | else |
| | | html += L"<td >" + label + L"</td><td >" + g_xdoc_shoppingcart.getData(0, L"data/Item", row, name) + L"</td>"; |
| | | html += L"</tr>"; |
| | |
| | | |
| | | if (dwc_list.GetItemString(row, L"pic") != L"*") |
| | | { |
| | | alert(L"第" + row.toString() + L"行请增加产品图片!"); |
| | | alert(L"第" + xstring(row) + L"行请增加产品图片!"); |
| | | return 1; |
| | | } |
| | | row = dwc_list.GetNextSelectRow(row + 1); |
| | | } |
| | | } |
| | | else { |
| | | row = dw_list.GetNextSelectRow(1); |
| | | int row = dw_list.GetNextSelectRow(1); |
| | | while (row > 0) |
| | | { |
| | | if (dw_list.GetItemString(row, L"pic") != L"*") |
| | | { |
| | | alert(L"第" + row.toString() + L"行请增加产品图片!"); |
| | | alert(L"第" + xstring(row) + L"行请增加产品图片!"); |
| | | return 1; |
| | | } |
| | | row = dw_list.GetNextSelectRow(row + 1); |
| | |
| | | dw_list.Redraw(); |
| | | impStr = L""; |
| | | |
| | | SendMessage(hObject, 0x401, ls_nos, 0); |
| | | SendMessage(hObject, 0x401, (LPARAM)ls_nos, 0); |
| | | alert(L"转入完成!"); |
| | | |
| | | return 1; |
| | |
| | | |
| | | int OnSearch() |
| | | { |
| | | int hItem = tv_folder.GetSelectedItem(); |
| | | HTREEITEM hItem = tv_folder.GetSelectedItem(); |
| | | return RetrieveItem(hItem); |
| | | } |
| | | |
| | |
| | | |
| | | int ItemAdd() |
| | | { |
| | | int hItem = tv_folder.GetSelectedItem(); |
| | | int hTopItem = LookupTopFolder(hItem); |
| | | HTREEITEM hItem = tv_folder.GetSelectedItem(); |
| | | HTREEITEM hTopItem = LookupTopFolder(hItem); |
| | | xstring name = tv_folder.GetItemLabel(hTopItem); |
| | | |
| | | KXMLDOMElement e = tv_folder.GetItemData(hItem); |
| | |
| | | |
| | | int ItemMaint() |
| | | { |
| | | int hItem = tv_folder.GetSelectedItem(); |
| | | HTREEITEM hItem = tv_folder.GetSelectedItem(); |
| | | KXMLDOMElement e = tv_folder.GetItemData(hItem); |
| | | //xstring no = e.getAttribute(L"no"); |
| | | //if(no==L"") return 1; |
| | |
| | | } |
| | | |
| | | //查找当前树项的顶级目录 |
| | | int LookupTopFolder(int hItem) |
| | | HTREEITEM LookupTopFolder(HTREEITEM hItem) |
| | | { |
| | | int hRoot = tv_folder.GetRootItem(); |
| | | HTREEITEM hRoot = tv_folder.GetRootItem(); |
| | | while (tv_folder.GetParentItem(hItem)) hItem = tv_folder.GetParentItem(hItem); |
| | | return hItem; |
| | | } |
| | | |
| | | //插入产品类项的子项 |
| | | int MakeGoodsFolderItem(int hItem, xstring sno) |
| | | int MakeGoodsFolderItem(HTREEITEM hItem, xstring sno) |
| | | { |
| | | xml x = ProductLibraryView::GetTreeChildItems3(sno); |
| | | if (!x) return 0; |
| | |
| | | int len = nlist.length(); |
| | | for (int i = 0; i < len; i++) |
| | | { |
| | | KXMLDOMElement e = nlist.item(i); |
| | | KXMLDOMElement& e = *new KXMLDOMElement(nlist.item(i)); |
| | | xstring name = e.getAttribute(L"CName"); |
| | | xstring no = e.getAttribute(L"CategoryNo"); |
| | | xstring label = no.trim() + L" " + name; |
| | | |
| | | int h = tv_folder.InsertChildItem(hItem, label, trust(e as int), 15); |
| | | tv_folder.SetItemChild(h, 1); |
| | | HTREEITEM h = tv_folder.InsertChildItem(hItem, label, (LPARAM)&e, 15); |
| | | xstring child = e.getAttribute(L"Childs"); |
| | | if (child == L"") |
| | | tv_folder.SetItemChild(h, 1); |
| | | else if (child != L"0") |
| | | tv_folder.SetItemChild(h, 1); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | //插入新产品目录子项 |
| | | int MakeUserGoodsFolderItem(int hItem, xstring sno) |
| | | int MakeUserGoodsFolderItem(HTREEITEM hItem, xstring sno) |
| | | { |
| | | xml x = ProductLibraryView::GetTreeUserChildItems3(sno); |
| | | if (!x) return 0; |
| | |
| | | int len = nlist.length(); |
| | | for (int i = 0; i < len; i++) |
| | | { |
| | | KXMLDOMElement e = nlist.item(i); |
| | | KXMLDOMElement& e = *new KXMLDOMElement(nlist.item(i)); |
| | | xstring name = e.getAttribute(L"CName"); |
| | | xstring no = e.getAttribute(L"CategoryNo"); |
| | | xstring label = no.trim() + L" " + name; |
| | | |
| | | int h = tv_folder.InsertChildItem(hItem, label, trust(e as int), 15); |
| | | HTREEITEM h = tv_folder.InsertChildItem(hItem, label, (LPARAM)&e, 15); |
| | | xstring child = e.getAttribute(L"Childs"); |
| | | if (child == L"") |
| | | tv_folder.SetItemChild(h, 1); |
| | |
| | | } |
| | | |
| | | //插入购物车项 |
| | | int ExpandCatChildFolder(int hItem, KXMLDOMElement ele, int image) |
| | | int ExpandCatChildFolder(HTREEITEM hItem, KXMLDOMElement ele, int image) |
| | | { |
| | | 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++) |
| | | { |
| | | KXMLDOMElement e = nlist.item(i); |
| | | KXMLDOMElement& e = *new KXMLDOMElement(nlist.item(i)); |
| | | xstring name = e.getAttribute(L"name"); |
| | | int h = tv_folder.InsertChildItem(hItem, name, trust(e as int), image); |
| | | HTREEITEM h = tv_folder.InsertChildItem(hItem, name, (LPARAM)&e, image); |
| | | ExpandCatChildFolder(h, e, 35); |
| | | } |
| | | return 1; |
| | | } |
| | | int MakeGoodCarFolderItem(int hItem) |
| | | int MakeGoodCarFolderItem(HTREEITEM hItem) |
| | | { |
| | | xml x = ShoppingCartView::GetSupplierRoleList(SupplierID); |
| | | xml x = ShoppingCartView::GetRoleList(); |
| | | if (!x) return 0; |
| | | KXMLDOMNodeList nlist = x.selectNodes(L"/data/item"); |
| | | int len = nlist.length(); |
| | | for (int i = 0; i < len; i++) |
| | | { |
| | | KXMLDOMElement e = nlist.item(i); |
| | | KXMLDOMElement& e = *new KXMLDOMElement(nlist.item(i)); |
| | | xstring name = e.getAttribute(L"name"); |
| | | int h = tv_folder.InsertChildItem(hItem, name, trust(e as int), 35); |
| | | HTREEITEM h = tv_folder.InsertChildItem(hItem, name, (LPARAM)&e, 35); |
| | | ExpandCatChildFolder(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(hItem); |
| | | NMTREEVIEW& nmtv = *(NMTREEVIEW*)evt->notify.pnmh; |
| | | HTREEITEM hItem = nmtv.itemNew.hItem; |
| | | HTREEITEM hTopItem = LookupTopFolder(hItem); |
| | | xstring name = tv_folder.GetItemLabel(hTopItem); |
| | | int child = tv_folder.GetChildItem(hItem); |
| | | HTREEITEM child = tv_folder.GetChildItem(hItem); |
| | | xstring no = L""; |
| | | KXMLDOMElement e; |
| | | |
| | |
| | | return 1; |
| | | } |
| | | |
| | | int LookupCustomerFolder(int hItem) |
| | | HTREEITEM LookupCustomerFolder(HTREEITEM hItem) |
| | | { |
| | | while (true) |
| | | { |
| | | KXMLDOMElement e1 = cast(tv_folder.GetItemData(hItem) as KXMLDOMElement); |
| | | KXMLDOMElement& e1 = *(KXMLDOMElement*)tv_folder.GetItemData(hItem); |
| | | xstring str = e1.getAttribute(L"no"); |
| | | if (str.find(L"Customer:") >= 0) return hItem; |
| | | hItem = tv_folder.GetParentItem(hItem); |
| | |
| | | return 0; |
| | | } |
| | | |
| | | xstring LookupCustomer(int hItem) |
| | | xstring LookupCustomer(HTREEITEM hItem) |
| | | { |
| | | hItem = LookupCustomerFolder(hItem); |
| | | if (hItem == 0) return ""; |
| | | KXMLDOMElement e1 = cast(tv_folder.GetItemData(hItem) as KXMLDOMElement); |
| | | if (hItem == 0) return L""; |
| | | KXMLDOMElement& e1 = *(KXMLDOMElement*)tv_folder.GetItemData(hItem); |
| | | xstring str = e1.getAttribute(L"no"); |
| | | return str.mid(L"Customer:".length(), 9999); |
| | | return str.mid(xstring(L"Customer:").length(), 9999); |
| | | } |
| | | |
| | | int RetrieveItem(int hItem) |
| | | HTREEITEM RetrieveItem(HTREEITEM hItem) |
| | | { |
| | | int hTopItem = LookupTopFolder(hItem); |
| | | HTREEITEM hTopItem = LookupTopFolder(hItem); |
| | | tname = tv_folder.GetItemLabel(hTopItem); |
| | | xstring selectname = tv_folder.GetItemLabel(hItem); |
| | | ximageview im = GetControl(L"im1"); |
| | | m_customer = L""; |
| | | xcontrol query = GetControl(L"sl_search"); |
| | | xstring queryString = query.GetText(); |
| | | xshtml xs; |
| | | xstring str = L""; |
| | | if (hTopItem == 0 && queryString != L"") |
| | | { |
| | | tname = L"已询价产品"; |
| | |
| | | if (selectname != tname) |
| | | { |
| | | KXMLDOMElement e1 = cast(tv_folder.GetItemData(hItem) as KXMLDOMElement); |
| | | xstring str = e1.getAttribute(L"no"); |
| | | str = e1.getAttribute(L"no"); |
| | | if (str == L"Supplier") return 1; |
| | | if (str.find(L"Customer:") == 0 || str.find(L"SO:") == 0 || str.find(L"Supplier:") == 0 || str.find(L"Enquiry:") == 0) |
| | | { |
| | |
| | | |
| | | if (dwc_list.GetRowCount() >= 1) |
| | | { |
| | | htmlctrl xs = GetControl(L"html_detail"); |
| | | xs = GetControl(L"html_detail"); |
| | | xs.SetContent(makeGoodscarHtml(1)); |
| | | |
| | | if (m_customer != L"") |
| | |
| | | } |
| | | } |
| | | else { |
| | | im.ResetEx(); |
| | | im.Reset(); |
| | | im.Redraw(); |
| | | |
| | | xs = GetControl(L"html_detail"); |
| | |
| | | ResetAgent(L"userlib"); |
| | | else |
| | | ResetAgent(L"goodslib"); |
| | | int hCursor = xutil::SetCursorWait(); |
| | | HCURSOR hCursor = xutil::SetCursorWait(); |
| | | if (tname == L"个人库" || tname == L"公司库") |
| | | { |
| | | xstring no = L"N000005"; |
| | |
| | | if (x) |
| | | { |
| | | g_xdoc_product.Retrieve(x); |
| | | x.Free(); |
| | | |
| | | } |
| | | } |
| | | else |
| | |
| | | } |
| | | else |
| | | { |
| | | im.ResetEx(); |
| | | im.Reset(); |
| | | im.Redraw(); |
| | | |
| | | xs = GetControl(L"html_detail"); |
| | |
| | | impStr = L""; |
| | | } |
| | | |
| | | int OnTreeSelChanged(ref TNotifyEvent evt, int p) |
| | | int OnTreeSelChanged(TEvent* evt, int p) |
| | | { |
| | | ref NMTREEVIEW nmtv = cast(evt.pnmh as NMTREEVIEW); |
| | | int hItem = nmtv.itemNew.hItem; |
| | | NMTREEVIEW& nmtv = *(NMTREEVIEW*)evt->notify.pnmh; |
| | | HTREEITEM hItem = nmtv.itemNew.hItem; |
| | | return RetrieveItem(hItem); |
| | | } |
| | | |
| | | int ExpandChildFolder(int hItem, KXMLDOMElement pElement) |
| | | int ExpandChildFolder(HTREEITEM hItem, KXMLDOMElement pElement) |
| | | { |
| | | KXMLDOMNodeList nlist = pElement.selectNodes(L"Item"); |
| | | int len = nlist.length(); |
| | | for (int i = 0; i < len; i++) |
| | | { |
| | | KXMLDOMElement e = nlist.item(i); |
| | | KXMLDOMElement& e = *new KXMLDOMElement(nlist.item(i)); |
| | | xstring name = e.getAttribute(L"cname"); |
| | | xstring sImage = e.getAttribute(L"image"); |
| | | int image = 15; |
| | | //if(sImage) image = sImage.toInt(); |
| | | int h = tv_folder.InsertChildItem(tv_folder.GetId(), hItem, name, trust(e as int), image); |
| | | HTREEITEM h = tv_folder.InsertChildItem(hItem, name, (LPARAM)&e, image); |
| | | tv_folder.SetItemChild(h, 1); |
| | | ExpandChildFolder(h, e); |
| | | } |
| | |
| | | return 1; |
| | | } |
| | | |
| | | int OnDwClicked(ref TNotifyEvent evt, int p) |
| | | int OnDwClicked(TEvent* evt, int p) |
| | | { |
| | | ref DWNMHDR hdr = cast(evt.pnmh as ref DWNMHDR); |
| | | DWNMHDR& hdr = *(DWNMHDR*)evt->notify.pnmh; |
| | | char ch; |
| | | int row = hdr.row; |
| | | xstring col = hdr.colname; |
| | |
| | | return 1; |
| | | } |
| | | |
| | | int OnDwcClicked(ref TNotifyEvent evt, int p) |
| | | int OnDwcClicked(TEvent* evt, int p) |
| | | { |
| | | ref DWNMHDR hdr = cast(evt.pnmh as ref DWNMHDR); |
| | | DWNMHDR& hdr = *(DWNMHDR*)evt->notify.pnmh; |
| | | char ch; |
| | | int row = hdr.row; |
| | | xstring col = hdr.colname; |
| | |
| | | return 1; |
| | | } |
| | | |
| | | int OnDwcDoubleClicked(ref TNotifyEvent evt, int p) |
| | | int OnDwcDoubleClicked(TEvent* evt, int p) |
| | | { |
| | | |
| | | |
| | | int hCursor = xutil::SetCursorWait(); |
| | | ref DWNMHDR hdr = cast(evt.pnmh as ref DWNMHDR); |
| | | HCURSOR hCursor = xutil::SetCursorWait(); |
| | | DWNMHDR& hdr = *(DWNMHDR*)evt->notify.pnmh; |
| | | int row = hdr.row; |
| | | xstring ls_nos = L"ImportXml:"; |
| | | xstring str = g_xdoc_shoppingcart.getData(0, L"data/Item", row, L"SOLineID"); |
| | |
| | | dw_list.Redraw(); |
| | | dwc_list.Redraw(); |
| | | impStr = L""; |
| | | SendMessage(hObject, 0x401, ls_nos, 0); |
| | | SendMessage(hObject, 0x401, (LPARAM)ls_nos, 0); |
| | | xutil::RestoreCursor(hCursor); |
| | | CloseWindow(); |
| | | return 1; |
| | | } |
| | | int OnDwDoubleClicked(ref TNotifyEvent evt, int p) |
| | | int OnDwDoubleClicked(TEvent* evt, int p) |
| | | { |
| | | int hCursor = xutil::SetCursorWait(); |
| | | ref DWNMHDR hdr = cast(evt.pnmh as ref DWNMHDR); |
| | | HCURSOR hCursor = xutil::SetCursorWait(); |
| | | DWNMHDR& hdr = *(DWNMHDR*)evt->notify.pnmh; |
| | | int row = hdr.row; |
| | | if (row > 0) |
| | | { |
| | | if (dw_list.GetItemString(row, L"pic") != L"*") |
| | | { |
| | | alert(L"第" + row.toString() + L"行请增加产品图片!"); |
| | | alert(L"第" + xstring(row) + L"行请增加产品图片!"); |
| | | return 1; |
| | | } |
| | | } |
| | |
| | | dw_list.Redraw(); |
| | | dwc_list.Redraw(); |
| | | impStr = L""; |
| | | SendMessage(hObject, 0x401, ls_nos, 0); |
| | | SendMessage(hObject, 0x401, (LPARAM)ls_nos, 0); |
| | | xutil::RestoreCursor(hCursor); |
| | | CloseWindow(); |
| | | return 1; |
| | |
| | | int OnAttachEvent() |
| | | { |
| | | //绑定工具条点击事件 |
| | | AttachEvent(L"WM_XCOMMAND", (FEvent)&BasicFareList::OnXCommand); |
| | | AttachEvent(L"WM_XCOMMAND", (FEvent)&EntityProductSelectWin::OnXCommand); |
| | | //获取焦点事件,用于重置工具条 |
| | | AttachEvent(L"WM_SETFOCUS", (FEvent)&BasicFareList::OnSetFocus); |
| | | AttachEvent(L"dw_list", L"DWV_ROWFOCUSCHANGED", (FEvent)&BasicFareList::OnRowChanged); |
| | | AttachEvent(L"dwc_list", L"DWV_ROWFOCUSCHANGED", (FEvent)&BasicFareList::OnGoodsCarRowChanged); |
| | | AttachEvent(L"tv_folder", L"TVN_ITEMEXPANDING", (FEvent)&BasicFareList::OnTreeExpanding); |
| | | AttachEvent(L"tv_folder", L"TVN_SELCHANGED", (FEvent)&BasicFareList::OnTreeSelChanged); |
| | | AttachEvent(L"WM_COMMAND", (FEvent)&BasicFareList::OnCkbCLick); //checkbox打钩事件 |
| | | AttachEvent(L"WM_COMMAND", (FEvent)&BasicFareList::OnCkbCLick2); //checkbox打钩事件 |
| | | AttachEvent(L"WM_SETFOCUS", (FEvent)&EntityProductSelectWin::OnSetFocus); |
| | | AttachEvent(L"dw_list", L"DWV_ROWFOCUSCHANGED", (FEvent)&EntityProductSelectWin::OnRowChanged); |
| | | AttachEvent(L"dwc_list", L"DWV_ROWFOCUSCHANGED", (FEvent)&EntityProductSelectWin::OnGoodsCarRowChanged); |
| | | AttachEvent(L"tv_folder", L"TVN_ITEMEXPANDING", (FEvent)&EntityProductSelectWin::OnTreeExpanding); |
| | | AttachEvent(L"tv_folder", L"TVN_SELCHANGED", (FEvent)&EntityProductSelectWin::OnTreeSelChanged); |
| | | AttachEvent(L"WM_COMMAND", (FEvent)&EntityProductSelectWin::OnCkbCLick); //checkbox打钩事件 |
| | | AttachEvent(L"WM_COMMAND", (FEvent)&EntityProductSelectWin::OnCkbCLick2); //checkbox打钩事件 |
| | | |
| | | AttachEvent(L"dwc_list", L"DWV_DOUBLECLICKED", (FEvent)&BasicFareList::OnDwcDoubleClicked); |
| | | AttachEvent(L"dw_list", L"DWV_DOUBLECLICKED", (FEvent)&BasicFareList::OnDwDoubleClicked); |
| | | AttachEvent(L"dwc_list", L"DWV_DOUBLECLICKED", (FEvent)&EntityProductSelectWin::OnDwcDoubleClicked); |
| | | AttachEvent(L"dw_list", L"DWV_DOUBLECLICKED", (FEvent)&EntityProductSelectWin::OnDwDoubleClicked); |
| | | |
| | | AttachEvent(L"dw_list", L"DWV_CLICKED", (FEvent)&BasicFareList::OnDwClicked); |
| | | AttachEvent(L"dwc_list", L"DWV_CLICKED", (FEvent)&BasicFareList::OnDwcClicked); |
| | | AttachEvent(L"dw_list", L"DWV_CLICKED", (FEvent)&EntityProductSelectWin::OnDwClicked); |
| | | AttachEvent(L"dwc_list", L"DWV_CLICKED", (FEvent)&EntityProductSelectWin::OnDwcClicked); |
| | | return 1; |
| | | } |
| | | |
| | | int onload() |
| | | { |
| | | SetArg(); |
| | | agentFor = L"goodslib"; |
| | | impStr = L""; |
| | | |
| | |
| | | dw_list = GetControl(L"dw_list"); |
| | | dwc_list = GetControl(L"dwc_list"); |
| | | |
| | | xaserverarg arg = GetParam(); |
| | | xaserverarg arg = GetArg(); |
| | | CustomerID = L""; |
| | | SupplierID = L""; |
| | | m_customer = L""; |
| | | hObject = 0; |
| | | if (arg) |
| | | { |
| | | hObject = arg.GetArgString(L"HWND").toInt(); |
| | | hObject = (HWND)arg.GetParam(L"HWND"); |
| | | CustomerID = arg.GetArgString(L"CustomerID"); |
| | | CustomerID = arg.GetArgString(L"SupplierID"); |
| | | } |
| | |
| | | |
| | | if (dw_list.GetRowCount()) |
| | | { |
| | | htmlctrl xs = GetControl(L"html_detail"); |
| | | xshtml xs = GetControl(L"html_detail"); |
| | | xs.SetContent(makeHtml(1)); |
| | | } |
| | | |
| | |
| | | |
| | | return 1; |
| | | } |
| | | }; |
| | | ] |
| | | }; |