lifan
10 天以前 34847b82d7712cca5b1b83746eb33b0413feb5ea
jrj/project/business/SO/Product.FetchNo.cpp
@@ -23,7 +23,7 @@
         ProductFetchNoWin* pWin = new ProductFetchNoWin(implPtr, (HWND)hWnd);
         return pWin;
      }
      int SetAgent()
      /*int SetAgent()
      {
         xstring xfNodeAgentArea = L"agentarea";
         xnode anode = GetAgentNode(xfNodeAgentArea);
@@ -42,31 +42,28 @@
            }
         }
         return 1;
      }
      }*/
      int OnRowChanged(TEvent* evt, LPARAM p)
      xstring GetEntityName(LPARAM pr)
      {
         DWNMHDR& hdr = *(DWNMHDR*)evt->notify.pnmh;
         int row = hdr.row;
         /*
         htmlctrl xs = GetControl(L"html_detail");
         xstring html = makeHtml(row);
         xs.SetContent(html);
         xs.Redraw();
         xstring id = g_xdoc_product.getData(0,L"data/Item",row,L"@guid");
         OnShowImage(id);
         */
         return 1;
         return L"SampleNo";
      }
      xstring GetEntityID(LPARAM pr)
      {
         int row = dw_list.GetRow();
         xstring id = dw_list.GetItemString(row, L"SKUID");
         //alert(id);
         return id;
      }
      //焦点激活处理函数
      int OnSetFocus(TEvent* evt, LPARAM p)
      {
         //重置工具条
         //SetAgent();
         SetAgent(L"list", GetEntityID(1));
         return 1;
      }
@@ -105,7 +102,7 @@
            if (error.find(L"error") >= 0)
               alert(L"提交失败");
            else
               alert(L"提交成功!");
               trace(L"提交成功!");
            SendNotice();
         }
         return 1;
@@ -248,9 +245,11 @@
      //命令发布函数
      int OnCmdDispatch(xstring comdid)
      {
         if (comdid == L"xmSubmit")
         if (comdid == L"xmSubmit" || L"action:bill.check.ask")
         {
            return OnSubmit();
            OnSubmit();
            ProcessFlowAction(L"action:bill.check.ask", 1);
            return 1;
         }
         if (comdid == L"xmCancel")
         {
@@ -266,6 +265,14 @@
         return OnCmdDispatch(evt->xcommand.pStrID);
      }
      int OnRowChanged(TEvent* evt, LPARAM p)
      {
         DWNMHDR& hdr = *(DWNMHDR*)evt->notify.pnmh;
         int row = hdr.row;
         SetAgent(L"list", dw_list.GetItemString(row, L"SKUID"));
         return 1;
      }
      int OnAttachEvent()
      {
         AttachEvent(L"dw_list", L"DWV_ROWFOCUSCHANGED", (FEvent)&ProductFetchNoWin::OnRowChanged);
@@ -273,6 +280,7 @@
         AttachEvent(L"WM_XCOMMAND", (FEvent)&ProductFetchNoWin::OnXCommand);
         //获取焦点事件,用于重置工具条
         AttachEvent(L"WM_SETFOCUS", (FEvent)&ProductFetchNoWin::OnSetFocus);
         return 1;
      }
@@ -321,6 +329,8 @@
               
               dw_list.Retrieve(x);
               dw_list.Redraw();
               dw_list.SetReadOnly(true);
               dw_list.SetSelectionMode(1);
            }
         }
         OnAttachEvent();
@@ -331,7 +341,7 @@
      int onloaded()
      {
         //SetAgent();
         SetAgent(L"list", GetEntityID(1));
         return 1;
      }