LiFan
2024-07-15 de9349d5502e956b09cebccb2c9dbb66f62a42f0
jrj/xframe/xcontrol/xdwgrid.hpp
@@ -52,7 +52,7 @@
   {
      return getKReport()->SaveAs_(pXmlArg);
   }
   int SaveAs(KXMLDOMDocument& xml, LPCTSTR pFileName = NULL) //另存为
   int SaveAs(KXMLDOMDocument xml, LPCTSTR pFileName = NULL) //另存为
   {
      return getKReport()->SaveAs_(xml,pFileName);
   }
@@ -83,8 +83,8 @@
   //int Retrieve(ITrans *pTrans,LPCTSTR pDataUrl, LPCTSTR pArgStr);//读取数据
   int Retrieve(LPCTSTR pDataUrl, LPCTSTR pArgStr) { return getKReport()->Retrieve_(pDataUrl, pArgStr); }//读取数据
   int Retrieve(KXMLDOMElement  pElement) { return getKReport()->Retrieve_(pElement); }//读取数据
   int Retrieve(KXMLDOMDocument& xml) { return  getKReport()->Retrieve_(xml); }//读取数据
   int Retrieve(KXMLDOMElement  pElement) { return pElement?getKReport()->Retrieve_(pElement):0; }//读取数据
   int Retrieve(KXMLDOMDocument xml) { return  xml?getKReport()->Retrieve_(xml):0; }//读取数据
public:
   int SetDataObject(LPCTSTR pServer, LPCTSTR pUrl) { return getKReport()->SetDataObject_(pServer, pUrl); }//设置模板对象
@@ -270,9 +270,9 @@
      return getKReport()->GetTitleName(col);
   }
public:
   int SetRowSort(LPTSTR colName, bool colOrder = true)
   int SetRowSort(LPCTSTR colName, bool colOrder = true)
   {
      return getKReport()->SetRowSort(colName, colOrder);
      return getKReport()->SetRowSort((LPTSTR)colName, colOrder);
   }
   int SetClickEditFlag(bool f)
   {
@@ -302,9 +302,9 @@
   {
      return getKReport()->RetrieveDiff(xml);
   }
   int Filter(LPTSTR pColumn, LPTSTR pStr)
   int Filter(LPCTSTR pColumn, LPCTSTR pStr)
   {
      return getKReport()->Filter(pColumn, pStr);
      return getKReport()->Filter((LPTSTR)pColumn, (LPTSTR)pStr);
   }
public:
   int SetHeaderText(int row, int col, LPTSTR name)
@@ -334,14 +334,21 @@
      return getKReport()->AddRepeats(colName);
   }
public:
   LPTSTR GetColumnProp(int nCol, LPCTSTR pItem)
   void ShowEditor()
   {
      return getKReport()->GetColumnProp(nCol, pItem);
      getKReport()->ShowEditor();
   }
public:
   LPCTSTR GetColumnProp(int nCol, LPCTSTR pItem)
   {
      return L"";
      //return getKReport()->GetColumnProp(nCol, pItem);
   }
   LPTSTR GetColumnProp(LPCTSTR pColName, LPCTSTR pItem)
   LPCTSTR GetColumnProp(LPCTSTR pColName, LPCTSTR pItem)
   {
      return getKReport()->GetColumnProp(pColName, pItem);
      return L"";
      //return getKReport()->GetColumnProp(pColName, pItem);
   }
   int GetItemInt(int row, int col)
@@ -350,9 +357,9 @@
      return str.toInt();
   }
   int GetItemInt(int row, string col)
   int GetItemInt(int row, xstring col)
   {
      xstring str = GetItemString(row, col);
      xstring str = GetItemString(row, col.c_str());
      return str.toInt();
   }
@@ -373,9 +380,9 @@
      return SetItemString(row, col, xstring(str));
   }
   bool SetItemInt(int row, string col, int str)
   bool SetItemInt(int row, xstring col, int str)
   {
      return SetItemString(row, col, xstring(str));
      return SetItemString(row, col.c_str(), xstring(str));
   }
   bool SetItemDouble(int row, int col, double str)
@@ -383,9 +390,18 @@
      return SetItemString(row, col, xstring(str));
   }
   bool SetItemDouble(int row, string col, double str)
   bool SetItemDouble(int row, xstring col, double str)
   {
      return SetItemString(row, col, xstring(str));
      return SetItemString(row, col.c_str(), xstring(str));
   }
   int DataBI(LPCTSTR pSchema = NULL) //数据BI分析
   {
      return getKReport()->DataBI_(pSchema);
   }
   LPTSTR DataAnalysis(LPCTSTR pSchema = NULL)
   {
      return getKReport()->DataAnalysis(pSchema);
   }
public:
@@ -458,52 +474,18 @@
      return L"";
   }
   int SetGuid(int row,xstring val)
   {
      KXMLDOMElement  e = GetRowElement(row);
      if (e)
      {
         e.setAttribute(L"guid",val.c_str());
         return 1;
      }
      return 0;
   }
public:
#if 0
   int GetItemInt(int row, int col)
   {
      xstring str = GetItemString(row, col);
      return str.toInt();
   }
   double GetItemDouble(int row, int col)
   {
      xstring str = GetItemString(row, col);
      return str.toDouble();
   }
   int GetItemInt(int row, string col)
   {
      xstring str = GetItemString(row, col);
      return str.toInt();
   }
   double GetItemDouble(int row, string col)
   {
      xstring str = GetItemString(row, col);
      return str.toDouble();
   }
   bool SetItemInt(int row, int col, int str)
   {
      return SetItemString(row, col, xstring(str));
   }
   bool SetItemDouble(int row, int col, double str)
   {
      return SetItemString(row, col, xstring(str));
   }
   bool SetItemInt(int row, string col, int str)
   {
      return SetItemString(row, col, xstring(str));
   }
   bool SetItemDouble(int row, string col, double str)
   {
      return SetItemString(row, col, xstring(str));
   }
#endif
   int DwRetrieve(string ServerUrl, string src, string argstr)
   {