xj qian
2024-11-07 94d3840bda13f23c0cd4619a99ac215b74ffcd94
jrj/project/business/Affair/message.business.cpp
@@ -6,6 +6,7 @@
#include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
#include "viewobject/view.base.hpp"
#include "xcontrol/xhtml.hpp"
using xml = KXMLDOMDocument;
   class  __declspec(dllexport) MessageBusinessWin :  public xframe
@@ -20,7 +21,7 @@
      xstring    bill;
   
   public:
      MessageBusinessWin(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
      MessageBusinessWin(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd),sheet(0) {}
   public:
      static MessageBusinessWin* CreateInstance(void* implPtr, void* hWnd)
      {
@@ -212,7 +213,7 @@
         if(sheet)
         {
            
            SendMessage(sheet.GetHWND(),0x401,L"GetEntityData:"+arg,0);
            SendMessage(sheet.GetHWND(),0x401,(LPARAM)(L"GetEntityData:"+xstring((__int64) & arg)).c_str(true), 0);
            xstring data = arg.GetArgString(L"EntityData");
            murl = L"/sale/data/Business/message/attach/update";
            arg1.AddArg(L"url",L"message/attach");
@@ -253,7 +254,7 @@
         if(sheet)
         {
            
            SendMessage(sheet.GetHWND(),0x401,L"GetEntityData:"+arg,0);
            SendMessage(sheet.GetHWND(),0x401, (LPARAM)(L"GetEntityData:" + xstring((__int64)&arg)).c_str(true),0);
            xstring data = arg.GetArgString(L"EntityData");
            murl = L"/sale/data/Business/message/attach/update";
            arg1.AddArg(L"url",L"message/attach");
@@ -321,7 +322,7 @@
            {
               xstring str = x.selectSingleNode(L"root/Content").text();
               str = str.replace(L"\n",L"\r\n");
               GetControl(L"content").SetText(str);
               SetWindowText(GetControl(L"content")->GetHWND(),str.c_str());
            }
            //alert(x.xml());
            if(x.selectSingleNode(L"root/Content2"))
@@ -334,14 +335,14 @@
               int pos = str2.find(L"EntityID=L");
               if(pos >= 0)
               {
                  tm = str2.mid(pos + L"EntityID=L".length(),64);
                  tm = str2.mid(pos + ((xstring)L"EntityID=").length(),64);
                  if(tm.find(L" ")>0) tm = tm.left(tm.find(L" "));
                  EntityID=tm;
               }
               pos = str2.find(L"Category=L");
               if(pos >= 0)
               {
                  tm = str2.mid(pos+L"Category=L".length(),64);
                  tm = str2.mid(pos+((xstring)L"Category=").length(),64);
                  if(tm.find(L" ")>0) tm = tm.left(tm.find(L" "));
                  Category=tm;
               }
@@ -374,8 +375,8 @@
         if(doc.xml() == L"")
            return -1;
         
         htmlctrl ht = GetControl(L"taskinfo");
         ht.SetContent(doc.xml());
         xhtml ht = GetControl(L"taskinfo");
         ht.LoadHtml(doc.xml());
         ht.Redraw();
         
         return 1;