当前位置: 首页>>代码示例>>C++>>正文


C++ CBCGPGridRow::SetData方法代码示例

本文整理汇总了C++中CBCGPGridRow::SetData方法的典型用法代码示例。如果您正苦于以下问题:C++ CBCGPGridRow::SetData方法的具体用法?C++ CBCGPGridRow::SetData怎么用?C++ CBCGPGridRow::SetData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CBCGPGridRow的用法示例。


在下文中一共展示了CBCGPGridRow::SetData方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: OnBnClickedButtonReset

/**
* 响应鼠标单击按钮;Reset
* @param void
* @return void
*/
void CTabTestSensor::OnBnClickedButtonReset()
{
    CBCGPGridRow* pRow = NULL;
    POSITION pos = NULL;
    CTestProject* pTestProject = NULL;
    CTestRequest oTestRequest;
    COleVariant oVariantBool;
    COleVariant oVariantString;

    pRow = m_oGridCtrlEdit.GetRow(0);
    pRow->GetItem(0)->SetValue("");
    pRow->GetItem(1)->SetValue("");
    oVariantBool = "FALSE";
    oVariantBool.ChangeType(VT_BOOL);
    pRow->GetItem(2)->SetValue(oVariantBool);
    pRow->GetItem(3)->SetValue("");

    GetDlgItem(IDC_EDIT_ABSOLUTESPREAD)->SetWindowText("");

    m_oGridCtrlList.RemoveAll();	// 列表
    int iCount = m_pSiteData->m_oTestProjectListSensor.m_olsTestProject.GetCount();
    for(int i = 0; i < iCount; i++)
    {
        pos = m_pSiteData->m_oTestProjectListSensor.m_olsTestProject.FindIndex(i);
        pTestProject = m_pSiteData->m_oTestProjectListSensor.m_olsTestProject.GetAt(pos);

        pos = pTestProject->m_olsTestRequest.FindIndex(0);
        oTestRequest = pTestProject->m_olsTestRequest.GetAt(pos);

        pRow = m_oGridCtrlList.CreateRow(m_oGridCtrlList.GetColumnCount());
        pRow->SetData(pTestProject->m_uiTestNb);

        oVariantString = (long)pTestProject->m_uiTestNb;
        oVariantString.ChangeType(VT_BSTR);
        pRow->GetItem(0)->SetValue(oVariantString);

        oVariantString = m_pSiteData->GetTestTypeStringByID(oTestRequest.m_uiType);
        oVariantString.ChangeType(VT_BSTR);
        pRow->GetItem(1)->SetValue(oVariantString);

        if(0 == pTestProject->m_uiRecordResult)
        {
            oVariantBool = "FALSE";
        }
        if(1 == pTestProject->m_uiRecordResult)
        {
            oVariantBool = "TRUE";
        }
        oVariantBool.ChangeType(VT_BOOL);
        pRow->GetItem(2)->SetValue(oVariantBool);

        oVariantString = pTestProject->m_strAbsoluteSpread;
        pRow->GetItem(3)->SetValue(oVariantString);

        m_oGridCtrlList.AddRow(pRow, FALSE);
    }
    m_oGridCtrlEdit.AdjustLayout();
    m_oGridCtrlList.AdjustLayout();
}
开发者ID:svn2github,项目名称:jy00755131,代码行数:64,代码来源:TabTestSensor.cpp

示例2: OnBnClickedButtonAddA

/**
* @brief 响应鼠标单击按钮;Add
* @note  该函数总是向列表框的后面追加记录。
* @param CBCGPGridCtrl* pGridCtrlEdit 输入行
* @param CBCGPGridCtrl* pGridCtrlList 列表
* @param CList<int, int>* ListNb Nb号队列指针
* @return void
*/
void CGridCtrlOperation::OnBnClickedButtonAddA(CBCGPGridCtrl* pGridCtrlEdit, CBCGPGridCtrl* pGridCtrlList)
{	
	int				i;
	int				iNb;
	COleVariant		oEditVariant;
	CBCGPGridRow*	pRowEdit = NULL;	// 输入行
	CBCGPGridRow*	pRowNew = NULL;	// 新行
	int				iRowID = 0;
	CList<int, int>  ListNb;
	// 得到索引队列,增加操作
	if(false == GetIndexListForAdd(pGridCtrlEdit, &ListNb))
	{
		return;
	}

	pRowEdit = pGridCtrlEdit->GetRow(0);
	
	while(FALSE == ListNb.IsEmpty())
	{
		// 得到索引号
		iNb = ListNb.RemoveHead();
		// 索引号在列表中已经存在
		if(NULL != pGridCtrlList->FindRowByData(iNb))
		{
			continue;
		}
		pRowNew = pGridCtrlList->CreateRow(pGridCtrlList->GetColumnCount());
		pRowNew->SetData(iNb);
		oEditVariant.vt = VT_UI4;
		oEditVariant.ulVal = iNb;
		oEditVariant.ChangeType(VT_BSTR);
		pRowNew->GetItem(0)->SetValue(oEditVariant);
		for(i = 1; i < pGridCtrlList->GetColumnCount(); i++)
		{						
			oEditVariant= pRowEdit->GetItem(i)->GetValue();			
			pRowNew->GetItem(i)->SetValue(oEditVariant);
		}
		pGridCtrlList->AddRow(pRowNew, FALSE);

		/*
		if(iSelectRowIndex == -1)	// 无选中行
		{
			pGridCtrlList->AddRow(pRowNew, FALSE);
		}
		else
		{
			pGridCtrlList->InsertRowAfter(iSelectRowIndex + iRowID, pRowNew, FALSE);
			iRowID++;
		}*/
	}
	pGridCtrlList->AdjustLayout();
}
开发者ID:liquanhai,项目名称:cxm-hitech-matrix428,代码行数:60,代码来源:SetupGridCtrl.cpp

示例3: AddNewRow

void CActiveMemberGrid::AddNewRow(CActiveMember &ActiveMember,  BOOL bAtFront)
{
	CBCGPGridRow* pRow = CBCGPGridCtrl::CreateRow(GetColumnCount());
	pRow->SetData(ActiveMember.GetMemberID());
	UpdateRowData(pRow, ActiveMember);

	// 2011/07/08-8201-gxx: 给本地用户着色
	if (ActiveMember.GetIsLocalUser())
	{
		for(int i=0; i<GetColumnCount(); i++)
		{
			pRow->GetItem(i)->SetTextColor(RGB(38,153,3),FALSE);
		}
	}

	AddRow(pRow, bAtFront);
}	
开发者ID:layerfsd,项目名称:PersonalIBA,代码行数:17,代码来源:ActiveMemberGrid.cpp

示例4: OnBnClickedButtonAddA

/**
* 响应鼠标单击按钮;Add
* @param CBCGPGridCtrl* pGridCtrlEdit 输入行
* @param CBCGPGridCtrl* pGridCtrlList 列表
* @param CList<int, int>* plsNb Nb号队列指针
* @return void
*/
void CTabPage::OnBnClickedButtonAddA(CBCGPGridCtrl* pGridCtrlEdit, CBCGPGridCtrl* pGridCtrlList, CList<int, int>* plsNb)
{
	CBCGPGridRow* pRowEdit = NULL;	// 输入行
	CBCGPGridRow* pRowNew = NULL;	// 新行
	int iRowID = 0;

	// 得到索引队列,增加操作
	if(false == GetIndexListForAdd(pGridCtrlEdit, plsNb))
	{
		return;
	}
	// 得到列表当前选中行索引
	int iSelectRowIndex = GetGridListSelectRowID(pGridCtrlList);
	// 得到输入行
	pRowEdit = pGridCtrlEdit->GetRow(0);

	while(FALSE == plsNb->IsEmpty())
	{
		// 得到索引号
		int iNb = plsNb->RemoveHead();
		// 索引号在列表中已经存在
		if(NULL != pGridCtrlList->FindRowByData(iNb))
		{
			continue;
		}
		pRowNew = pGridCtrlList->CreateRow(pGridCtrlList->GetColumnCount());
		pRowNew->SetData(iNb);
		pRowNew->GetItem(0)->SetValue(iNb);
		for(int i = 1; i < pGridCtrlList->GetColumnCount(); i++)
		{
			COleVariant oVariant = pRowEdit->GetItem(i)->GetValue();
			pRowNew->GetItem(i)->SetValue(oVariant);
		}
		if(iSelectRowIndex == -1)	// 无选中行
		{
			pGridCtrlList->AddRow(pRowNew, FALSE);
		}
		else
		{
			pGridCtrlList->InsertRowAfter(iSelectRowIndex + iRowID, pRowNew, FALSE);
			iRowID++;
		}
	}
	pGridCtrlList->AdjustLayout();
}
开发者ID:liquanhai,项目名称:cxm-hitech-matrix428,代码行数:52,代码来源:TabPage.cpp

示例5: OnBnClickedButtonReset

/**
* 响应鼠标单击按钮;Reset
* @param void
* @return void
*/
void CTabSpreadAbsolute::OnBnClickedButtonReset()
{
	CBCGPGridRow* pRow = NULL;
	POSITION pos = NULL;
	CSpreadAbsoluteData oSpread;
	COleVariant oVariantBool;
	COleVariant oVariantString;

	pRow = m_oGridCtrlEdit.GetRow(0);
	pRow->GetItem(0)->SetValue("");
	pRow->GetItem(1)->SetValue("");
	pRow->GetItem(2)->SetValue("");

	m_oEditAbsoluteSpread.SetWindowText("");

	m_oGridCtrlList.RemoveAll();	// 列表
	int iCount = m_pSiteData->m_oSpreadAbsoluteList.m_olsSpreadAbsolute.GetCount();
	for(int i = 0; i < iCount; i++)
	{
		pos = m_pSiteData->m_oSpreadAbsoluteList.m_olsSpreadAbsolute.FindIndex(i);
		oSpread = m_pSiteData->m_oSpreadAbsoluteList.m_olsSpreadAbsolute.GetAt(pos);

		pRow = m_oGridCtrlList.CreateRow(m_oGridCtrlList.GetColumnCount());
		pRow->SetData(oSpread.m_uiNb);

		oVariantString = (long)oSpread.m_uiNb;
		oVariantString.ChangeType(VT_BSTR);
		pRow->GetItem(0)->SetValue(oVariantString);

		oVariantString = oSpread.m_strLabel;
		pRow->GetItem(1)->SetValue(oVariantString);

		oVariantString = oSpread.m_strSpread;
		pRow->GetItem(2)->SetValue(oVariantString);

		m_oGridCtrlList.AddRow(pRow, FALSE);
	}
	m_oGridCtrlEdit.AdjustLayout();
	m_oGridCtrlList.AdjustLayout();
}
开发者ID:liquanhai,项目名称:cxm-hitech-matrix428,代码行数:45,代码来源:TabSpreadAbsolute.cpp

示例6: OnBnClickedButtonReset

/**
* 响应鼠标单击按钮;Reset
* @param void
* @return void
*/
void CTabFormLine::OnBnClickedButtonReset()
{
	CBCGPGridRow* pRow = NULL;
	POSITION pos= NULL;
	CFormLineData oFormLineData;
	COleVariant oVariant;

	pRow = m_oGridCtrlEdit.GetRow(0);
	pRow->GetItem(0)->SetValue("");
	pRow->GetItem(1)->SetValue("");
	pRow->GetItem(2)->SetValue("");

	m_oGridCtrlList.RemoveAll();	// 列表
	int iCount = m_pSiteData->m_oFormLineList.m_olsFormLine.GetCount();
	for(int i = 0; i < iCount; i++)
	{
		pos = m_pSiteData->m_oFormLineList.m_olsFormLine.FindIndex(i);
		oFormLineData = m_pSiteData->m_oFormLineList.m_olsFormLine.GetAt(pos);
		pRow = m_oGridCtrlList.CreateRow(m_oGridCtrlList.GetColumnCount());
		pRow->SetData(oFormLineData.m_uiNb);
		pRow->GetItem(0)->SetValue((int)oFormLineData.m_uiNb);

		// 得到BoxType字符串
		CString strBoxType = m_pSiteData->GetBoxTypeStringByID(oFormLineData.m_uiBoxType);
		oVariant = strBoxType;
		pRow->GetItem(1)->SetValue(oVariant);

		CString strSN;
		strSN.Format("%d", oFormLineData.m_uiSN);
		oVariant = strSN;
		oVariant.ChangeType(VT_BSTR);
		pRow->GetItem(2)->SetValue(oVariant);

		m_oGridCtrlList.AddRow(pRow, FALSE);
	}
	m_oGridCtrlEdit.AdjustLayout();
	m_oGridCtrlList.AdjustLayout();
}
开发者ID:liquanhai,项目名称:cxm-hitech-matrix428,代码行数:43,代码来源:TabFormLine.cpp

示例7: FillParameterGrid

BOOL OperationParameterDialog::FillParameterGrid()
{
	if(NULL == userInputParameters)
		return FALSE;

	vector<OperationParameterPtr>::const_iterator curIterator = userInputParameters->begin();
	vector<OperationParameterPtr>::const_iterator endPos = userInputParameters->end();
	for(; curIterator != endPos; curIterator++)
	{
		OperationParameterPtr curParameterPtr = *curIterator;
		CBCGPGridRow* parameterRow = parameterInputCtrl.CreateRow(parameterInputCtrl.GetColumnCount());

		CBCGPGridItem* nameGridItem = parameterRow->GetItem(PARAMETER_NAME_COLUMN_INDEX);
		nameGridItem->SetValue((LPCSTR)curParameterPtr->GetDisplayName(), FALSE);
		nameGridItem->AllowEdit(FALSE);

		CBCGPGridItem* valueGridItem = parameterRow->GetItem(PARAMETER_VALUE_COLUMN_INDEX);
		valueGridItem->SetValue((LPCSTR)curParameterPtr->GetValue(), FALSE);

		CBCGPGridItem* rangeGridItem = parameterRow->GetItem(PARAMETER_RANGE_COLUMN_INDEX);
		rangeGridItem->SetValue((LPCSTR)curParameterPtr->GetValueRange(), FALSE);
		rangeGridItem->AllowEdit(FALSE);

		CBCGPGridItem* unitGridItem = parameterRow->GetItem(PARAMETER_UNIT_COLUNM_INDEX);
		unitGridItem->SetValue((LPCSTR)curParameterPtr->GetValueUnit(), FALSE);
		unitGridItem->AllowEdit(FALSE);

		parameterInputCtrl.AddRow(parameterRow, FALSE);

		parameterRow->SetData((DWORD_PTR)curParameterPtr.get());
	}

	parameterInputCtrl.AdjustLayout();

	return TRUE;
}
开发者ID:pqcyylu,项目名称:ConfigurationPlugin,代码行数:36,代码来源:OperationParameterDialog.cpp

示例8: OnBnClickedButtonReverseA

/**
* 响应鼠标单击按钮;Reverse
* @param CBCGPGridCtrl* pGridCtrlEdit 输入行
* @param CBCGPGridCtrl* pGridCtrlList 列表
* @param CList<int, int>* plsNb Nb号队列指针
* @return void
*/
void CGridCtrlOperation::OnBnClickedButtonReverseA(CBCGPGridCtrl* pGridCtrlEdit, CBCGPGridCtrl* pGridCtrlList)
{
	CList<int, int> ListNb;
	CList<int, int>* plsNb = &ListNb;
	// 得到索引队列,修改操作、删除操作、颠倒操作
	if(false == GetIndexListForChangeOrDeleteOrReverse(pGridCtrlEdit, pGridCtrlList, plsNb))
	{
		return;
	}

	CBCGPGridRow* pRow = NULL;	// 行
	CBCGPGridRow* pRowMax = NULL;	// 排序行	
	CBCGPGridRow* pRowNew = NULL;	// 新行

	CList<int, int> olsNb;
	int iNbStart = -1;
	int iNbEnd = -1;
	int iRowIndex = -1;
	int i, j;

	POSITION posMax;
	POSITION pos;
	int iNbMax;
	int iNb;

	// 得到Nb队列
	for(i = 0; i < plsNb->GetCount(); i++)
	{
		pos = plsNb->FindIndex(i);
		iRowIndex = plsNb->GetAt(pos);
		iNb = pGridCtrlList->GetRow(iRowIndex)->GetData();
		olsNb.AddTail(iNb);
		if(0 == i)
		{
			iNbStart = iNb;
		}
		if((plsNb->GetCount() - 1) == i)
		{
			iNbEnd = iNb;
		}
	}

	// 对Nb排序,由小到大
	for(i = 0; i < olsNb.GetCount(); i++)
	{
		posMax = olsNb.FindIndex(i);
		iNbMax = olsNb.GetAt(posMax);
		for(j = i + 1; j < olsNb.GetCount(); j++)
		{
			pos = olsNb.FindIndex(j);
			iNb = olsNb.GetAt(pos);

			if(iNbStart < iNbEnd)
			{
				if(iNbMax > iNb)
				{
					iNbMax = iNb;
					posMax = pos;
				}
			}
			else
			{
				if(iNbMax < iNb)
				{
					iNbMax = iNb;
					posMax = pos;
				}
			}

		}
		olsNb.RemoveAt(posMax);
		olsNb.AddHead(iNbMax);
	}

	for(i = 0; i < plsNb->GetCount(); i++)
	{
		pos = plsNb->FindIndex(i);
		iRowIndex = plsNb->GetAt(pos);
		pRow = pGridCtrlList->GetRow(iRowIndex);

		posMax = olsNb.FindIndex(i);
		iNbMax = olsNb.GetAt(posMax);
		pRowMax = pGridCtrlList->FindRowByData(iNbMax);

		pRowNew = pGridCtrlList->CreateRow(pGridCtrlList->GetColumnCount());
		pGridCtrlList->AddRow(pRowNew, FALSE);

		pRowNew->SetData(pRow->GetData());
		pRowNew->GetItem(0)->SetValue(pRow->GetItem(0)->GetValue());
		for(int j = 1; j < pGridCtrlList->GetColumnCount(); j++)
		{
			COleVariant oVariant = pRow->GetItem(j)->GetValue();
			pRowNew->GetItem(j)->SetValue(oVariant);
//.........这里部分代码省略.........
开发者ID:liquanhai,项目名称:cxm-hitech-matrix428,代码行数:101,代码来源:SetupGridCtrl.cpp

示例9: AddRow

void CDlgAllCheckOut::AddRow(INT_PTR nIndex, ReturnInfo &rInfo)
{
	CBCGPGridRow* pRow = CreateNewRow();

	pRow->SetData(nIndex);

	if (rInfo.bLocal)
	{
		pRow->GetItem(0)->SetValue(rInfo.LocalInfo.GetSerialNum().GetString());
		pRow->GetItem(1)->SetValue(rInfo.LocalInfo.GetName().GetString());
		pRow->GetItem(2)->SetValue(CNetBarConfig::GetInstance()->GetUserClassName(rInfo.LocalInfo.GetClassId()).GetString());
		pRow->GetItem(3)->SetValue(rInfo.LocalInfo.GetTermId().GetString());
	
		CString strTmp;

		UINT nTmp = CIBAHelpper::RoundMoney(rInfo.LocalInfo.GetReturnAmount(), CNetBarConfig::GetInstance()->GetRoundType());
		strTmp.Format(_T("%.2f"), nTmp / 100.0);
		pRow->GetItem(4)->SetValue(strTmp.GetString());

		if ( rInfo.bLocalReturned )
		{
			pRow->GetItem(5)->SetValue(_T("已退款"));
		}
		else
		{
			CBCGPGridItem* pItem = new CBCGPGridButtonItem(_T("退款"), GirdButtonId);
			pRow->ReplaceItem(6, pItem);
		}
		
		m_listCtrl.InsertItem(nIndex,_T(""));
		m_listCtrl.SetItemText(nIndex,0,rInfo.LocalInfo.GetSerialNum().GetString());
		m_listCtrl.SetItemText(nIndex,1,rInfo.LocalInfo.GetName().GetString());
		m_listCtrl.SetItemText(nIndex,2,CNetBarConfig::GetInstance()->GetUserClassName(rInfo.LocalInfo.GetClassId()).GetString());
		m_listCtrl.SetItemText(nIndex,3,rInfo.LocalInfo.GetTermId().GetString());
		m_listCtrl.SetItemText(nIndex,4,strTmp.GetString());
		if ( rInfo.bLocalReturned )
		{
			m_listCtrl.SetItemText(nIndex,5,_T("已退款"));
		}
		else
		{
			m_listCtrl.SetItem(nIndex,6,_T("退款"),NS_COMMON::CGxxListCtrl::GLC_Button);
		}
	}
	else
	{
		CCheckOutinfo& CheckOutinfo = rInfo.CheckOutInfo;

		pRow->GetItem(0)->SetValue(CheckOutinfo.GetSerialNum().GetString());
		pRow->GetItem(1)->SetValue(CheckOutinfo.GetUserName().GetString());
		pRow->GetItem(2)->SetValue(CheckOutinfo.GetClassName().GetString());
		pRow->GetItem(3)->SetValue(CheckOutinfo.GetTerminalId().GetString());

		CString strTmp;

		UINT nTmp = CIBAHelpper::RoundMoney(CheckOutinfo.GetBalanceMoney(), CNetBarConfig::GetInstance()->GetRoundType());
		strTmp.Format(_T("%.2f"), nTmp / 100.0);
		pRow->GetItem(4)->SetValue(strTmp.GetString());

		if (CheckOutinfo.GetReturnState() == 1)
		{
			pRow->GetItem(5)->SetValue(_T("已退款"));
		}
		else
		{
			CBCGPGridItem* pItem = new CBCGPGridButtonItem(_T("退款"), GirdButtonId);
			pRow->ReplaceItem(6, pItem);
		}

		m_listCtrl.InsertItem(nIndex,_T(""));
		m_listCtrl.SetItemText(nIndex,0,CheckOutinfo.GetSerialNum().GetString());
		m_listCtrl.SetItemText(nIndex,1,CheckOutinfo.GetUserName().GetString());
		m_listCtrl.SetItemText(nIndex,2,CheckOutinfo.GetClassName().GetString());
		m_listCtrl.SetItemText(nIndex,3,CheckOutinfo.GetTerminalId().GetString());

		m_listCtrl.SetItemText(nIndex,4,strTmp.GetString());
		if ( CheckOutinfo.GetReturnState() == 1 )
		{
			m_listCtrl.SetItemText(nIndex,5,_T("已退款"));
		}
		else
		{
			m_listCtrl.SetItem(nIndex,6,_T("退款"),NS_COMMON::CGxxListCtrl::GLC_Button);
		}
	}

	

	//CBCGPGridCheckItem* pItem = new CBCGPGridCheckItem(CheckOutinfo.GetReturnState() > 0 ? true : false);
	//pRow->ReplaceItem(7, pItem);

	m_GridCtrl.AddRow(pRow, FALSE);
}
开发者ID:layerfsd,项目名称:PersonalIBA,代码行数:93,代码来源:AllCheckOut.cpp

示例10: OnBnClickedButtonReset

/**
* 响应鼠标单击按钮;Reset
* @param void
* @return void
*/
void CTabBlastMachine::OnBnClickedButtonReset()
{
	CBCGPGridRow* pRow = NULL;
	POSITION pos= NULL;
	CBlastMachineData oBlastMachineData;
	COleVariant oVariant;

	pRow = m_oGridCtrlEdit.GetRow(0);
	pRow->GetItem(0)->SetValue("");
	pRow->GetItem(1)->SetValue("");
	pRow->GetItem(2)->SetValue("");
	pRow->GetItem(3)->SetValue("");
	pRow->GetItem(4)->SetValue("");
	pRow->GetItem(5)->SetValue("");
	pRow->GetItem(6)->SetValue("");
	pRow->GetItem(7)->SetValue("");

	m_oGridCtrlList.RemoveAll();	// 列表
	int iCount = m_pSiteData->m_oBlastMachineList.m_olsBlastMachine.GetCount();
	for(int i = 0; i < iCount; i++)
	{
		pos = m_pSiteData->m_oBlastMachineList.m_olsBlastMachine.FindIndex(i);
		oBlastMachineData = m_pSiteData->m_oBlastMachineList.m_olsBlastMachine.GetAt(pos);
		pRow = m_oGridCtrlList.CreateRow(m_oGridCtrlList.GetColumnCount());
		pRow->SetData(oBlastMachineData.m_uiNb);
		pRow->GetItem(0)->SetValue((int)oBlastMachineData.m_uiNb);

		oVariant = oBlastMachineData.m_strLabel;
		oVariant.ChangeType(VT_BSTR);
		pRow->GetItem(1)->SetValue(oVariant);

		oVariant = m_pSiteData->GetBoxTypeStringByID(oBlastMachineData.m_uiBoxType);
		oVariant.ChangeType(VT_BSTR);
		pRow->GetItem(2)->SetValue(oVariant);

		CString strSN;
		strSN.Format("%d", oBlastMachineData.m_uiSN);
		oVariant = strSN;
		oVariant.ChangeType(VT_BSTR);
		pRow->GetItem(3)->SetValue(oVariant);

		oVariant = (long)oBlastMachineData.m_uiChannelNb;
		oVariant.ChangeType(VT_BSTR);
		pRow->GetItem(4)->SetValue(oVariant);

		oVariant = m_pSiteData->GetGainStringByGainData(oBlastMachineData.m_uiGain);
		oVariant.ChangeType(VT_BSTR);
		pRow->GetItem(5)->SetValue(oVariant);

		oVariant = (long)oBlastMachineData.m_uiDPGNb;
		oVariant.ChangeType(VT_BSTR);
		pRow->GetItem(6)->SetValue(oVariant);

		oVariant = oBlastMachineData.m_strComments;
		oVariant.ChangeType(VT_BSTR);
		pRow->GetItem(7)->SetValue(oVariant);

		m_oGridCtrlList.AddRow(pRow, FALSE);
	}
	m_oGridCtrlEdit.AdjustLayout();
	m_oGridCtrlList.AdjustLayout();
}
开发者ID:liquanhai,项目名称:cxm-hitech-matrix428,代码行数:67,代码来源:TabBlastMachine.cpp

示例11: OnBnClickedButtonReset

/**
* 响应鼠标单击按钮;Reset
* @param void
* @return void
*/
void CTabSensor::OnBnClickedButtonReset()
{
	CBCGPGridRow* pRow = NULL;
	POSITION pos= NULL;
	CSensorData oSensorData;
	COleVariant oVariant;

	pRow = m_oGridCtrlEdit.GetRow(0);
	pRow->GetItem(0)->SetValue("");
	pRow->GetItem(1)->SetValue("");
	pRow->GetItem(2)->SetValue("");
	pRow->GetItem(3)->SetValue("");
	pRow->GetItem(4)->SetValue("");
	pRow->GetItem(5)->SetValue("");
	pRow->GetItem(6)->SetValue("");
	pRow->GetItem(7)->SetValue("");

	m_oGridCtrlList.RemoveAll();	// 列表
	int iCount = m_pSiteData->m_oSensorList.m_olsSensor.GetCount();
	for(int i = 0; i < iCount; i++)
	{
		pos = m_pSiteData->m_oSensorList.m_olsSensor.FindIndex(i);
		oSensorData = m_pSiteData->m_oSensorList.m_olsSensor.GetAt(pos);
		pRow = m_oGridCtrlList.CreateRow(m_oGridCtrlList.GetColumnCount());
		pRow->SetData(oSensorData.m_uiNb);
		pRow->GetItem(0)->SetValue((int)oSensorData.m_uiNb);

		oVariant = oSensorData.m_strLabel;
		oVariant.ChangeType(VT_BSTR);
		pRow->GetItem(1)->SetValue(oVariant);

		oVariant = oSensorData.m_fContinuityMin;
		oVariant.ChangeType(VT_BSTR);
		pRow->GetItem(2)->SetValue(oVariant);

		oVariant = oSensorData.m_fContinuityMax;
		oVariant.ChangeType(VT_BSTR);
		pRow->GetItem(3)->SetValue(oVariant);

		oVariant = oSensorData.m_fTilt;
		oVariant.ChangeType(VT_BSTR);
		pRow->GetItem(4)->SetValue(oVariant);

		oVariant = oSensorData.m_fNoise;
		oVariant.ChangeType(VT_BSTR);
		pRow->GetItem(5)->SetValue(oVariant);

		oVariant = oSensorData.m_fLeaKage;
		oVariant.ChangeType(VT_BSTR);
		pRow->GetItem(6)->SetValue(oVariant);

		// 得到SegdCode字符串
		CString strSegdCode = m_pSiteData->GetSegdCodeStringByID(oSensorData.m_uiSegdCode);
		oVariant = strSegdCode;
		pRow->GetItem(7)->SetValue(oVariant);

		m_oGridCtrlList.AddRow(pRow, FALSE);
	}
	m_oGridCtrlEdit.AdjustLayout();
	m_oGridCtrlList.AdjustLayout();
}
开发者ID:liquanhai,项目名称:cxm-hitech-matrix428,代码行数:66,代码来源:TabSensor.cpp

示例12: FillGridTree

void CNDCheckInDlg::FillGridTree(void)
{
	m_wndGridTree.RemoveAll();

	//{ 2011/07/11-8201-gxx: 是否本地用户换机或者在断网情况下中心用户不能跨区域换机
	BOOL bNormalAdd = TRUE;
	INT nPCClassID = 0;
	if (!m_strNetId.IsEmpty())
	{
		CActiveMember ActiveMember;
		if(CLocalServer::GetInstance()->ActiveMemberList.GetActiveMemberNetID(m_strNetId, ActiveMember))
		{
			if ( (!ActiveMember.GetTerminalID().IsEmpty()) )
			{
				if (ActiveMember.GetIsLocalUser())
				{
					bNormalAdd = FALSE;
					nPCClassID = ActiveMember.GetPCClassID();
				}
				else if (!ActiveMember.GetIsLocalUser() && CIBAGlobal::NetworkStatus == CIBAGlobal::emNetworkBroken)
				{
					bNormalAdd = FALSE;
					nPCClassID = ActiveMember.GetPCClassID();
				}
			}
		}
	}
	//}

	for (INT_PTR i = 0; i < CLocalServer::GetInstance()->ComputerList.GetCount(); i++)
	{
		CComputerInfo & computer = CLocalServer::GetInstance()->ComputerList.GetComputer(i);

		if (computer.GetComputerStatus() == CComputerInfo::ECS_OFFLINE
			|| computer.GetComputerStatus() == CComputerInfo::ECS_LOCKED)
		{
			CActiveMember ActiveMember;

			BOOL bFind = CLocalServer::GetInstance()->ActiveMemberList.GetActiveMember(computer.GetTerminalID(), ActiveMember);
			
			//{ 2011/07/11-8201-gxx: 是否允许本地用户换机或者在断网情况下中心用户不能跨区域换机
			if (!bFind && !bNormalAdd)
			{
				if (nPCClassID != computer.GetPCClassID())
				{
					bFind = TRUE;
				}
			}
			//}
			
			// 确认没有,列表中就可以添加终端
			if (!bFind)
			{
				CBCGPGridRow* pRow = m_wndGridTree.CreateRow(m_wndGridTree.GetColumnCount());
				pRow->GetItem(0)->SetValue(computer.GetTerminalID().GetString(), FALSE);
				pRow->GetItem(1)->SetValue(computer.GetStatusAsString().GetString(), FALSE);
				pRow->GetItem(2)->SetValue(computer.GetPCClass().GetString(), FALSE);

				pRow->SetData(i);

				m_wndGridTree.AddRow(pRow, FALSE);
			}
		}
	}
	

	m_wndGridTree.SetSortColumn(0);
	m_wndGridTree.AdjustLayout();
}
开发者ID:layerfsd,项目名称:PersonalIBA,代码行数:69,代码来源:NDCheckInDlg.cpp


注:本文中的CBCGPGridRow::SetData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。