xj qian
2024-07-18 1740c5de8324b8214829429c138e619df1fb9d02
jrj/project/business/BasicCode/ForwarderMaint.cpp
@@ -3,12 +3,14 @@
#include <xcontrol/xdwgrid.hpp>
#include <wobject/xdouble.hpp>
#include <xcontrol/xlayersheet.hpp>
#include <xcontrol/xcell.hpp>
#include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
#include "vbusiness/vframe/maint.vframe.vbusiness.hpp"
#include "viewobject/view.base.hpp"
using xml = KXMLDOMDocument;
class __declspec(dllexport) ForwarderMaint : public xframe
class __declspec(dllexport) ForwarderMaint : public maint
{
public:
   KXMLDOMDocument m_configDoc;
@@ -18,21 +20,16 @@
   xstring m_username;
   xstring ContactID;
   xcell dw_cell;
   xstring m_EntityID = L"";
public:
   ForwarderMaint(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
   ForwarderMaint(void* implPtr, HWND hWnd) :maint(implPtr, hWnd) {}
public:
   static ForwarderMaint* CreateInstance(void* implPtr, void* hWnd)
   {
      ForwarderMaint* pWin = new ForwarderMaint(implPtr, (HWND)hWnd);
      return pWin;
   }
   int alert(xstring str)
   {
      //win::MessageBox(GetHWND(),str,L"提示22:",0);
      TApp::alert(this, str);
      return 0;
   }
   int setCellReadOnly()
   {
      dw_base = new xdwtable;
@@ -45,13 +42,12 @@
   }
   xstring GetGuid() {
      return TApp::GetGuid();
      return publiccode::GetGuid();
   }
   int OnClear() {
      if (m_EntityID == L"") {
         trace(1);
         m_userid = TApp::GetUserInfo().id;
         m_username = TApp::GetUserInfo().name;
         m_userid = publiccode::GetUser().id;
         m_username = publiccode::GetUser().name;
         dw_base = new xdwtable;
         dw_base.setNativePointer(GetControl(L"dw_base"));
         dw_base.SetItemString(1, L"ForwarderID", GetGuid());
@@ -67,7 +63,7 @@
         dw_base.SetItemString(1, L"Type", L"5");
         dw_base.SetItemString(1, L"EnterName", m_userid);
         dw_base.SetItemDisplayString(1, L"EnterName", m_username);
         dw_base.SetItemString(1, L"CreateDate", TApp::GetCurDate());
         dw_base.SetItemString(1, L"CreateDate", publiccode::GetCurrentDate());
         /*xdwtable dw =  new xdwtable;
         dw.setNativePointer(dw_base.GetCurTable());
         xdwtable dwcon =  new xdwtable;
@@ -300,8 +296,8 @@
      //主联系人
      xstring spGuid;
      KXMLDOMElement e;
      var list = x.selectNodes(L"//item");
      int nlen = list.length;
      auto list = x.selectNodes(L"//item");
      int nlen = list.length();
      int i;
      for (i = 0; i < nlen; i++)
      {
@@ -462,6 +458,7 @@
      maint::onload();
      OnClear();
      return 1;
   }
};