#include "CopyObjForm.h"
#include "SearchObjForm.h"
#include "DotNetString.h"

using namespace ObjDataEdit;

System::Void CopyObjForm::TB_SelectID_DoubleClick(System::Object*  sender, System::EventArgs*  e) 
{
	SearchFormTypeStruct Info;
	Info.DataBaseName = _DBName;
	Info.TypeArr[ _FormType ] = true;
	SearchObjForm::g_SearchObjForm->SetViewFormInfo( Info );

	SearchObjForm::g_SearchObjForm->ShowDialogBox( _FormType );
	if( SearchObjForm::g_SearchObjForm->IsAccept() == false )
		return;

	_SelectID = SearchObjForm::g_SearchObjForm->SelectID();
	TB_SelectID->Text = String::Format( "{0}" , __box( _SelectID ) );
}

System::Void CopyObjForm::TB_SelectID_TextChanged(System::Object*  sender, System::EventArgs*  e)
{
	try
	{
		_SelectID = DotNetStr::StringToInt( TB_SelectID->Text );
	}
	catch( ... )
	{
	}
}