xj qian
2024-07-18 68d53805cead98b6fd18a05738af034020cad123
jrj/project/business/BasicCode/ForwarderMaint.cpp
@@ -32,10 +32,8 @@
   int setCellReadOnly()
   {
      dw_base = new xdwtable;
      dw_base.setNativePointer(GetControl(L"dw_base"));
      dw_cell = new xcell;
      dw_cell.setNativePointer(dw_base.QueryItem(L"ixcell"));
      dw_base =GetControl(L"dw_base");
      dw_cell = dw_base.QueryItem(L"ixcell");
      xstring strnew = L"<cellprop celltype='' cellformatex='' cellformat='' cellprotectex='' cellprotect='保护' cellvisibleex='' cellvisible='' cellvalid='' cellinitial=''/>";
      //dw_cell.SetCellProps(2,2,strnew);         
      return 0;
@@ -48,8 +46,7 @@
      if (m_EntityID == L"") {
         m_userid = publiccode::GetUser().id;
         m_username = publiccode::GetUser().name;
         dw_base = new xdwtable;
         dw_base.setNativePointer(GetControl(L"dw_base"));
         dw_base = GetControl(L"dw_base");
         dw_base.SetItemString(1, L"ForwarderID", GetGuid());
         dw_base.SetItemString(1, L"PartyID", GetGuid());
         dw_base.SetItemString(1, L"PStatus", L"1");
@@ -94,10 +91,8 @@
   int OnAddrow()
   {
      dw_base = new xdwtable;
      dw_base.setNativePointer(GetControl(L"dw_base"));
      xdwtable dw = new xdwtable;
      dw.setNativePointer(dw_base.GetCurTable());
      dw_base = GetControl(L"dw_base");
      xdwtable dw = dw_base.GetCurTable();
      xstring dw_n = dw.GetDwName();
      if (dw_n == L"item")
      {
@@ -109,10 +104,8 @@
   }
   int OnInsertRow()
   {
      dw_base = new xdwtable;
      dw_base.setNativePointer(GetControl(L"dw_base"));
      xdwtable dw = new xdwtable;
      dw.setNativePointer(dw_base.GetCurTable());
      dw_base = GetControl(L"dw_base");
      xdwtable dw = dw_base.GetCurTable();
      xstring dw_n = dw.GetDwName();
      if (dw_n == L"item")
      {
@@ -128,8 +121,7 @@
   {
      dw_base = new xdwtable;
      dw_base.setNativePointer(GetControl(L"dw_base"));
      xdwtable dw = new xdwtable;
      dw.setNativePointer(dw_base.GetCurTable());
      xdwtable dw = dw_base.GetCurTable();
      xstring dw_n = dw.GetDwName();
      if (dw_n == L"item")
      {
@@ -179,15 +171,13 @@
   int OnPreSave()
   {
      dw_base.AcceptText();
      dw_base = new xdwtable;
      dw_base.setNativePointer(GetControl(L"dw_base"));
      dw_base = GetControl(L"dw_base");
      xstring ForwarderNo = dw_base.GetItemString(1, L"ForwarderNo");
      if (ForwarderNo == L"")
      {
         dw_base.SetItemString(1, L"ForwarderNo", getGoodsNo());
      }
      xdwtable dwcon = new xdwtable;
      dwcon.setNativePointer(dw_base.FindDwTable(L"item", 0));
      xdwtable dwcon =dw_base.FindDwTable(L"item", 0);
      int i;
      for (i = 1; i <= dwcon.GetRowCount(); i++)
      {
@@ -214,8 +204,7 @@
            }
         }
      }
      xdwtable dwcon2 = new xdwtable;
      dwcon2.setNativePointer(dw_base.FindDwTable(L"item2", 0));
      xdwtable dwcon2 = dw_base.FindDwTable(L"item2", 0);
      int k;
      xstring sPBABankName2 = L"";
      xstring sPBABankAccountNo2 = L"";
@@ -248,8 +237,7 @@
            }
         }
      }
      xdwtable  dwcon1 = new xdwtable;
      dwcon1.setNativePointer(dw_base.FindDwTable(L"item1", 0));
      xdwtable  dwcon1 = dw_base.FindDwTable(L"item1", 0);
      int j;
      xstring sPBABankName1 = L"";
      xstring sPBABankAccountNo1 = L"";
@@ -284,8 +272,7 @@
   }
   int OnPostSave()
   {
      dw_base = new xdwtable;
      dw_base.setNativePointer(GetControl(L"dw_base"));
      dw_base = GetControl(L"dw_base");
      xaserverarg args;
      xml x;
@@ -332,8 +319,7 @@
   }
   int OnSave()
   {
      dw_base = new xdwtable;
      dw_base.setNativePointer(GetControl(L"dw_base"));
      dw_base = GetControl(L"dw_base");
      xstring SName = dw_base.GetItemString(1, L"Name");
      if (SName == L"") {
         alert(L"请输入货代名称!");
@@ -396,8 +382,7 @@
   }
   int OnCellChanged(TEvent* evt, LPARAM p)
   {
      dw_base = new xdwtable;
      dw_base.setNativePointer(GetControl(L"dw_base"));
      dw_base = GetControl(L"dw_base");
      DWNMHDR& hdr = *(DWNMHDR*)evt->notify.pnmh;
      xstring colname = hdr.colname;
      xstring coldata = hdr.data;
@@ -426,8 +411,7 @@
      else if (colname == L"PPrimaryFlag" && coldata == L"Y")
      {
         xdwtable dw_pc;
         dw_pc = new xdwtable;
         dw_pc.setNativePointer(dw_base.FindDwTable(L"item"));
         dw_pc = dw_base.FindDwTable(L"item");
         if (dw_pc)
         {
            int i;
@@ -449,8 +433,7 @@
   }
   int onload()
   {
      dw_base = new xdwtable;
      dw_base.setNativePointer(GetControl(L"dw_base"));
      dw_base = GetControl(L"dw_base");
      OnAttachEvent();
      //if(!m_configDoc) return -1;