.. :   aka DmitrO, mailto: dmitro@russian.ru

.. include:: commonchm.txt

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
     
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
..	<chminfo>
		<insert nodes="//common/maininfo/*"/>
		<alinks>_1cpp_data_provider_sdk_</alinks>
	</chminfo>

.. contents:: 
	:backlinks: none


       * *.
  -  ,      () -  .

       :

	- CDataProvider_;
	- CV7DataProvider_.

      *  *.     
  :

	- CDataRow_;
	- CV7DataRow_.

     ,       .  
       .    
     .

 CDataProvider_  CDataRow_     DataProvider.h.      
  1C (V7).

 CV7DataProvider_  CV7DataRow_     V7DataProvider.h.    
          1C (V7).


#####################################################################
CDataProvider
#####################################################################
     .  ,      .
     `    `_.

  
=====================================================================
..	<chminfo split="0" splitchild="1">
		<insert nodes="//common/propsmethods/*"/>
	</chminfo>

   .

GetControl
---------------------------------------------------------------------
	**:** ``HWND GetControl() const;``

	**:**  ,  NULL -     .

	**:**    ,       .

SetControl
---------------------------------------------------------------------
	**:** ``void SetControl(HWND hControl);``

	**:**    ,       .  
	  .

ResetData
---------------------------------------------------------------------
	**:** ``void ResetData(CDataRow* pDataRow = NULL);``

	**:**

		- pDataRow -    ,      .

	**:**    .      ,   
	  .

SetCurrentRow
---------------------------------------------------------------------
	**:** ``void SetCurrentRow(CDataRow* pDataRow);``

	**:**

		- pDataRow -    ,    .

	**:**     .      ,   
	  .

OnDetach
---------------------------------------------------------------------
	**:** ``virtual void OnDetach();``

	**:**       .

OnAttach
---------------------------------------------------------------------
	**:** ``virtual void OnAttach();``

	**:**       .

    
=====================================================================
..	<chminfo split="0" splitchild="1">
		<insert nodes="//common/propsmethods/*"/>
	</chminfo>

   .

 .

QueryRows
---------------------------------------------------------------------
	**:** ``virtual void QueryRows(CDataRow* pRowFrom, int nRowsCount, int nPageSizeHint) = 0;``

	**:**

		- pRowFrom -  ,     .    NULL,  , 
		      :      (.  nRowsCount);
		- nRowsCount -   .   .
		      -    ().
		      -    ();
		- nPageSizeHint -  .   ,    
		    ,      .

	**:**     .         
	Fetch_      .

Fetch
---------------------------------------------------------------------
	**:** ``virtual CDataRow* Fetch() = 0;``

	**:**    .

	**:**    QueryRows_  .   NULL -  ,
	      .      ,
	    nRowsCount     QueryRows_,   ,  
	     ,         .

	**:**           .  ,
	     ,    -  .

RefreshRow
---------------------------------------------------------------------
	**:** ``virtual BOOL RefreshRow(CDataRow* pRowFrom) = 0;``

	**:**

		- pRowFrom -    ,    .

	**:**     .

	**:**      .

CompareRows
---------------------------------------------------------------------
	**:** ``virtual BOOL CompareRows(CDataRow* pRow1, CDataRow* pRow2) const = 0;``

	**:**

		- pRow1 -     ;
		- pRow2 -     .

	**:** TRUE,          ,  FALSE.

	**:**      .   ,      
	 ,           .  ,   , 
	       -   .

GetLastError
---------------------------------------------------------------------
	**:** ``virtual LPCSTR GetLastError();``

	**:**    -      .

	**:**        .     NULL,
	            .

GetRowCount
---------------------------------------------------------------------
	**:** ``virtual BOOL GetRowCount(UINT* pCount);``

	**:**

		- pCount -   ,      .

	**:**        .

	**:**             .  
	 TRUE - ,          ,
	   pCount      ,     
	     .
	.  GetRowIndex_.

   
=====================================================================
..	<chminfo split="0" splitchild="1">
		<insert nodes="//common/propsmethods/*"/>
	</chminfo>

              , 
     .

  .

QueryField
---------------------------------------------------------------------
	**:** ``virtual void QueryField(LPCSTR szFieldName);``

	**:**

		- szFieldName -   .

	**:**  ,          szFieldName.

ReleaseField
---------------------------------------------------------------------
	**:** ``virtual void ReleaseField(LPCSTR szFieldName);``

	**:**

		- szFieldName -   .

	**:**  ,           
	szFieldName.

OnFieldsChanged
---------------------------------------------------------------------
	**:** ``virtual void OnFieldsChanged();``

	**:**            .
	    -     ,    .

  
=====================================================================
..	<chminfo split="0" splitchild="1">
		<insert nodes="//common/propsmethods/*"/>
	</chminfo>

   * *      .

  .

GetQuickSearchType
---------------------------------------------------------------------
	**:** ``virtual DataType GetQuickSearchType(LPCSTR szFieldName);``

	**:**

		- szFieldName -   .

	**:**          szFieldName.

	**:**  ,      -    
	    szFieldName.   dtUndefined -       ,
	             szFieldName.

	**:**      dtText.

QuickSearch
---------------------------------------------------------------------
	**:** ``virtual void QuickSearch(stQuickSearchPattern& QSPattern);``

	**:**

		- QSPattern -    stQuickSearchPattern_ -     .

	**:**         .   
	   (SetCurrentRow_).       stQuickSearchPattern_.

 
=====================================================================
..	<chminfo split="0" splitchild="1">
		<insert nodes="//common/propsmethods/*"/>
	</chminfo>

stQuickSearchPattern
---------------------------------------------------------------------
	**:** 

	::

		struct stQuickSearchPattern
		{
			LPCSTR szFieldName;
			DataType dataType;
			union
			{
				CString* pTextData; //for text fields;
			};
		};

	:szFieldName:

		  ,     .

	:dataType:

		    .

	:pTextData:

		    dtText.         
		  :       ,    
		  .

	**:**           .


=====================================================================
..	<chminfo split="0" splitchild="1">
		<insert nodes="//common/propsmethods/*"/>
	</chminfo>

DataType
---------------------------------------------------------------------
	**:** 

	::

		enum DataType
		{
			dtUndefined,
			dtText,
			dtNumeric,
			dtDate,
			dtFalse,
			dtTrue,
		};

	**:**        :

		- dtUndefined:   ;
		- dtText:  ();
		- dtNumeric: ;
		- dtDate: ;
		- dtFalse:   ;
		- dtTrue:   .

#####################################################################
CDataRow
#####################################################################
      ().

  
=====================================================================
..	<chminfo split="0" splitchild="1">
		<insert nodes="//common/propsmethods/*"/>
	</chminfo>

GetFieldCount
---------------------------------------------------------------------
	**:** ``virtual int GetFieldCount() = 0;``

	**:**  .

	**:**    .

GetFieldIndexOf
---------------------------------------------------------------------
	**:** ``virtual int GetFieldIndexOf(LPCSTR szFieldName) = 0;``

	**:**

		- szFieldName -   .

	**:**   .

	**:**      .      ,  
	 -1.

GetFieldName
---------------------------------------------------------------------
	**:** ``virtual LPCSTR GetFieldName(int nIndex) = 0;``

	**:**

		- nIndex -   .

	**:**       .

	**:**      .

GetFieldType
---------------------------------------------------------------------
	**:** ``virtual DataType GetFieldType(int nIndex);``

	**:**

		- nIndex -   .

	**:**   .

	**:**     .   ,  
	   .

FormatField
---------------------------------------------------------------------
	**:** ``virtual void FormatField(int nIndex, CString& strValue) = 0;``

	**:**

		- nIndex -   ;
		- strValue -      .

	**:**    . strValue - ,     .

GetRowIndex
---------------------------------------------------------------------
	**:** ``virtual UINT GetRowIndex();``

	**:**    ()   .

	**:**     ()       
	.      ,     .
	.  GetRowCount_.

#####################################################################
CV7DataProvider
#####################################################################
    .         1CV7.


=====================================================================
..	<chminfo split="0" splitchild="1">
		<insert nodes="//common/propsmethods/*"/>
	</chminfo>

GetV7DataRow
---------------------------------------------------------------------
	**:** ``virtual CV7DataRow* GetV7DataRow(CDataRow* pDataRow) const = 0;``

	**:**

		- pDataRow -     (   ).

	**:**      CV7DataRow_.
	
	**:**    .    CDataRow*  CV7DataRow*.   ,
	        ,      
	  RTTI -      .     
	  . (   upcast  downcast)

GetRowValue
---------------------------------------------------------------------
	**:** ``virtual void GetRowValue(CDataRow* pDataRow, CValue& value) const;``

	**:**

		- pDataRow -     (   ).
		- value - [out]    .

	**:**         value ,   
	pDataRow  .
	
	**:**          .  
	  ,    .

BuildRowByValue
---------------------------------------------------------------------
	**:** ``virtual CDataRow* BuildRowByValue(const CValue& value);``

	**:**

		- value -    .

	**:**    .

	**:**               
	   value.      .  
	,    ,        , 
	     .
	
	**:**          .

#####################################################################
CV7DataRow
#####################################################################
      ().           1CV7.


=====================================================================
..	<chminfo split="0" splitchild="1">
		<insert nodes="//common/propsmethods/*"/>
	</chminfo>

GetValue
---------------------------------------------------------------------
	**:** ``virtual const CValue& GetValue(int nIndex) const = 0;``

	**:**

		- nIndex -   .

	**:**      .

	**:**       .

FormatValue
---------------------------------------------------------------------
	**:** ``static void FormatValue(const CValue& Value, CString& strValue);``

	**:**

		- Value -   ;
		- strValue - [out]  .

	**:**  ,    Value    1CV7
	      .
