LiFan
2025-02-13 03ef0b51103c735077c784c7df81ae2bcc1599ab
jrj/project/business/SO/paymentterm.base.maint.so.cpp
@@ -1,4 +1,4 @@
#include <wobject/xstring.hpp>
#include <wobject/xstring.hpp>
#include <xcontrol/xtreeview.hpp>
#include <xcontrol/xdwgrid.hpp>
#include <xcontrol/xcell.hpp>
@@ -9,23 +9,21 @@
using xml = KXMLDOMDocument;
   class __declspec(dllexport) PaymentTermEdit : public xframe
   class __declspec(dllexport) PaymentTermSOEdit : public xframe
   {
   public:
      xdwtable   dw_1;
      xdwtable   dw_p;
      xcell dw_cell;
      vcontrol vc;
      //xcell dw_cell;
      xstring sCryno;
   public:
      PaymentTermEdit(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
      PaymentTermSOEdit(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
   public:
      static PaymentTermEdit* CreateInstance(void* implPtr, void* hWnd)
      static PaymentTermSOEdit* CreateInstance(void* implPtr, void* hWnd)
      {
         PaymentTermEdit* pWin = new PaymentTermEdit(implPtr, (HWND)hWnd);
         PaymentTermSOEdit* pWin = new PaymentTermSOEdit(implPtr, (HWND)hWnd);
         return pWin;
      }
@@ -187,6 +185,11 @@
         xstring sTxt = OnCreateTxt();
         dw_1.SetItemString(1, L"PaymentTermEx", sTxt);
         xml x;
         dw_1.DwUpdateAllTo(x);
         GetArg().SetArg(L"content", x.xml());
         GetArg().SetArg(L"process", L"ok");
         CloseWindow();
         return 1;
@@ -338,17 +341,17 @@
      int OnAttachEvent()
      {
         AttachEvent(L"WM_XCOMMAND", (FEvent)&PaymentTermEdit::OnXCommand);
         AttachEvent(L"dw_1", L"DWV_ITEMCHANGED", (FEvent)&PaymentTermEdit::OnItemChanged);
         AttachEvent(L"dw_1", L"DWV_CLICKED", (FEvent)&PaymentTermEdit::OnClick);
         AttachEvent(L"WM_XCOMMAND", (FEvent)&PaymentTermSOEdit::OnXCommand);
         AttachEvent(L"dw_1", L"DWV_ITEMCHANGED", (FEvent)&PaymentTermSOEdit::OnItemChanged);
         AttachEvent(L"dw_1", L"DWV_CLICKED", (FEvent)&PaymentTermSOEdit::OnClick);
         return 1;
      }
      int OnInit()
      {
         xaserver Args = GetArg();
         xaserverarg Args = GetArg();
         /*
         XXmlContentSvr xdoc = new XXmlContentSvr;
         xdoc.setNativePointer(Args);
         vc = new vcontrol;
@@ -356,13 +359,13 @@
         vbind bind = new vbind;
         bind.bind(dw_1, vc);
         xml x;
            xml x;
         x.loadXML(vc.GetContent());
         */
         //alert(x.GetXml());
         xml x;
         xstring xs = GetArg().GetArgString(L"content");
         x.loadXML(xs.c_str());
         dw_1.Retrieve(x);
         //if (x.GetXmlDoc().documentElement.selectSingleNode(L"CurrencyCode"))
@@ -375,11 +378,12 @@
      int onload()
      {
         SetArg();
         dw_1 = GetControl(L"dw_1");
         dw_1.openUrl(L"/sale/view/SaleOrder/template/payment"); //base.maint.so.tpl/payment
         /*
         xml x = new xml;
         xml x ;
         x.setNativePointer(xml::CreateInstance());
         if(url::get(L"/sale/view/SaleOrder/template/SaleOrder/payment1",L"",x)!=1) //SO.updata.oldserver.pr.xq
         {
@@ -394,12 +398,12 @@
         dw_1.SetRowSelectorWidth(0);
         dw_1.SetScrollState(false);
         dw_cell = new xcell;
         dw_cell.setNativePointer(dw_1.QueryItem(L"ixcell"));
         //dw_cell = new xcell;
         //dw_cell.setNativePointer(dw_1.QueryItem(L"ixcell"));
         OnAttachEvent();
         if (GetParam())OnInit();
         if (GetWinParam())OnInit();
         return 1;
      }