예제 #1
0
void CDialog_Check::InitComobox(const int &initFlag )
{
	CDate_search condition;
	if(initFlag == -1 || initFlag == 0)
	{
		CControl_material tmpm;
		m_allMaterial = tmpm.SearchList_Material(condition);

		m_mName_ctrl.Clear();
		for (int i = 0;i< m_allMaterial.size() ;i++)
		{
			m_mName_ctrl.AddString(m_allMaterial[i].m_name);
		}
		m_mName_ctrl.SetCurSel(0);
	}
	if(initFlag == -1 || initFlag == 1)
	{
		CControl_user tmpu;
		m_allUser = tmpu.SearchList_UserInfo(condition);
		m_pName_ctrl.Clear();
		for (int i = 0;i< m_allUser.size() ;i++)
		{
			m_pName_ctrl.AddString(m_allUser[i].m_name);
		}
		m_pName_ctrl.SetCurSel(0);
	}
	if (initFlag == -1 || initFlag == 2)
	{
		CControl_class tmpc;
		m_allClass = tmpc.SearchList_Class(condition);
		m_cName_ctrl.Clear();
		for (int i = 0;i< m_allClass.size() ;i++)
		{
			m_cName_ctrl.AddString(m_allClass[i].m_name);
		}
		m_cName_ctrl.SetCurSel(0);
	}
}
예제 #2
0
void CDialog_Material_Stats::OnBnClickedSearchBtn()
{
	// TODO: 在此添加控件通知处理程序代码

	if(BST_CHECKED == IsDlgButtonChecked( IDC_CHECK2 ))
	{
		m_tBegin_ctrl.GetWindowText(m_searcher.m_tBegin);
		m_tEnd_ctrl.GetWindowText(m_searcher.m_tEnd);
		if(m_searcher.m_tBegin.IsEmpty() || m_searcher.m_tEnd.IsEmpty())
		{
			CRuntimeMessageBox::RunMessageBox("请输入正确的时间");
			return;
		}
	}
	else
	{
		m_searcher.m_aBegin.Empty();
		m_searcher.m_tEnd.Empty();
	}
	CControl_material tmp;
	m_searchDates = tmp.SearchList_Material(m_searcher);

	FormatSearchDates(m_modal.GetCurSel());
}