| | |
| | | |
| | | int changeddlb; |
| | | xcombobox ddlb_1; |
| | | xcombobox cbx_datashow; |
| | | xcombobox cbx_datashow; |
| | | |
| | | xtreeview tv_folder; |
| | | xdwgrid dw_goods; |
| | |
| | | return 0; |
| | | }*/ |
| | | |
| | | xaserverarg& arg = *new xaserverarg; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | xaserverarg arg ; |
| | | |
| | | trace(EntityID); |
| | | arg.AddArg(L"GDNID", EntityID); |
| | | OpenWindow(L"dev:xpage[GDNDelay.vx]", (LPARAM)&arg); |
| | | OpenWindow(L"dev:xpage[GDNDelay.vx]", arg); |
| | | |
| | | } |
| | | else if (comdid == L"action:bill.SourceRemark") return OnSourceRemark(); |
| | |
| | | } |
| | | |
| | | |
| | | int OnItemAskStyle(TEvent* evt, LPARAM p) |
| | | { |
| | | int DMS_CSSSTYLE = 0x8; |
| | | DWASKSTYLENMHDR& hdr = *(DWASKSTYLENMHDR*)evt->notify.pnmh; |
| | | int row = hdr.row; |
| | | int col = hdr.col; |
| | | xstring colname = hdr.colname; |
| | | |
| | | int rows = dw_goods.GetRowCount(); |
| | | |
| | | if (row < 1 || row > rows) |
| | | { |
| | | return 1; |
| | | } |
| | | |
| | | if (colname == L"Packages") |
| | | { |
| | | |
| | | int PackingRate = dw_goods.GetItemString(row, L"PackingRate").toInt(); |
| | | int Quantity = dw_goods.GetItemString(row, L"Quantity").toInt(); |
| | | alert(colname); |
| | | alert(xstring(PackingRate)); |
| | | if (PackingRate != 0) |
| | | { |
| | | if ((Quantity / PackingRate) * PackingRate != Quantity) |
| | | { |
| | | hdr.mask = DMS_CSSSTYLE; |
| | | hdr.pCssStyle = (wchar_t*)L"color:#ff0000"; |
| | | } |
| | | } |
| | | } |
| | | return 1; |
| | | } |
| | | int PostOnAttachEvent() |
| | | { |
| | | AttachEvent(L"tv_folder", L"TVN_SELCHANGED", (FEvent)&ListGDN3Win::OnTreeSelChanged); //树选择 |
| | |
| | | AttachEvent(L"dw_list", L"DWV_ROWFOCUSCHANGED", (FEvent)&ListGDN3Win::OnRowChanged); |
| | | AttachEvent(L"cbx_1", L"CBN_SELCHANGE", (FEvent)&ListGDN3Win::OnSelectDdlb); |
| | | AttachEvent(L"cbx_datashow", L"CBN_SELCHANGE", (FEvent)&ListGDN3Win::OnSelectDataShowDdlb); |
| | | AttachEvent(L"dw_goods", L"DWV_ASKSTYLE", (FEvent)&ListGDN3Win::OnItemAskStyle); |
| | | return 1; |
| | | } |
| | | |
| | |
| | | dw_custom.SetColumnState(L"ClassifyID", false); |
| | | dw_custom.SetColumnState(L"AmountEx", false); |
| | | //dw_custom.SetReadOnlyColumn(L"CustName",true); |
| | | dw_custom.SetColumnState(L"LineNo", false); |
| | | //dw_custom.SetColumnState(L"LineNo", false); |
| | | |
| | | rows = L"500"; |
| | | myDataUrl = L"/sale/data/GDN3/folder/list"; |
| | |
| | | { |
| | | 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")); |
| | | if (name.find(L"(") >= 0) name = name.left(name.find(L"(")); |
| | | arg.AddArg(L"CustomerName", name); |
| | | } |
| | | return 1; |