Text "See the file Readme.txt in the sample source for information on the code in this sample. (In Optima++, open the Files view and double click on the Readme.txt file).";
ResID 105;
DesignName label_Comments;
TabIndex 4;
DesignRect 0,50,205,35;
@end;
@begin Object "WTransaction"
AccessMode "WTAMReadOnly";
AutoCommit "0";
DataSource "Optima++ 1.0 Order Entry Sample";
DisplayWarningDialog "1";
Password "sql";
Userid "dba";
AutoConnect "0";
ResID 106;
DesignName transaction_OrderEntry;
TabIndex 5;
DesignRect 5,85,14,14;
@end;
@begin Object "WGroupBox"
WCCSTop 1;
WCCSNoMoveY 1;
WCCSBottom 1;
WCCSNoResize 1;
WSChild 1;
WSVisible 1;
Text "Customers";
ResID 107;
DesignName groupb_Customers;
TabIndex 6;
DesignRect 0,0,65,45;
@end;
@begin Object "WGroupBox"
WCCSTop 1;
WCCSNoMoveY 1;
WCCSBottom 1;
WCCSNoResize 1;
WSChild 1;
WSVisible 1;
Text "Products";
ResID 108;
DesignName groupb_Products;
TabIndex 7;
DesignRect 70,0,65,45;
@end;
@begin Object "WGroupBox"
WCCSTop 1;
WCCSNoMoveY 1;
WCCSBottom 1;
WCCSNoResize 1;
WSChild 1;
WSVisible 1;
Text "Orders";
ResID 109;
DesignName groupb_Orders;
TabIndex 8;
DesignRect 140,0,65,45;
@end;
@begin Object "WFormProxy"
FormClass "Form_Products";
ResID 110;
DesignName form_Products;
TabIndex 9;
DesignRect 55,85,14,14;
@end;
@begin Object "WFormProxy"
FormClass "Form_Orders";
ResID 111;
DesignName form_Orders;
TabIndex 10;
DesignRect 80,85,14,14;
@end;
@begin HPPPrefixBlock
@begin-code HPPPrefix
// Declarations added here will be included at the top of the .HPP file
@end-code;
GencodeSrcLine 14;
@end;
@begin CPPPrefixBlock
@begin-code CPPPrefix
// Code added here will be included at the top of the .CPP file
// Include definitions for resources.
#include "WRes.h"
#include "KeyTable.hpp"
#include "SQLAnyUtil.hpp"
@end-code;
GencodeSrcLine 10;
@end;
@begin ClassContentsBlock
@begin-code ClassContents
public:
// add your public instance data here
private:
// add your private instance data here
protected:
// add your protected instance data here
@end-code;
GencodeSrcLine 66;
@end;
@begin-code GeneratedClassContents
Form_Main();
~Form_Main();
@end-code;
@begin-code Code "Form_Main::Form_Main()"
@@CLASSNAME@::@CLASSNAME@()
{
}
@end-code;
@begin-code Code "Form_Main::~Form_Main()"
@@CLASSNAME@::~@CLASSNAME@()
{
}
@end-code;
@begin-code Code "Form_Main::Form_Main_Close"
WBool @CLASSNAME@::Form_Main_Close(
WObject * source,
WEventData * event )
{
WBool cancelClose = false;
WMessageBoxReturn result;
result = WMessageBox::Message(
this,
WMBLevelInfo,
WMBButtonYesNoCancel,
GetText(),
"Do you want to save (commit) your changes?",
WMBDefault2 );
switch( result ) {
case WMBReturnYes:
transaction_OrderEntry->Commit();
break;
case WMBReturnNo:
transaction_OrderEntry->Rollback();
break;
default:
cancelClose = true;
}
return cancelClose;
}
@end-code;
@begin-code Code "Form_Main::Form_Main_Create"
WBool @CLASSNAME@::Form_Main_Create(
WObject * source,
WCreateEventData * event )
{
WString command;
const WString DSN( "Optima++ 1.0 Order Entry Sample" );
WFilePath path;
// Register the ODBC data source for this sample.
// (The database is actually the standard SQL Anywhere sample database,
// but this shows you how to register a data source as part of an application).