29 textCtrlName->SetValidator ( wxTextValidator (wxFILTER_ASCII, &name) );
30 if ( !pdb->FillChoice (choiceClient,
client_tid) )
31 wxLogError (
"Initialization of choiceClient failed (yatishDlgProject)");
33 choiceClient->SetValidator ( wxGenericValidator (&choice) );
34 Fit(); SetMaxSize ( GetSize() );
46 wxLogError (
"Initialization of choiceClient failed (yatishDlgProject)");
49 Fit(); SetMaxSize ( GetSize() );
56 wxBoxSizer* BoxSizer1;
57 wxBoxSizer* BoxSizer2;
58 wxButton* buttonCancel;
59 wxFlexGridSizer* FlexGridSizer1;
60 wxStaticText* StaticText1;
61 wxStaticText* StaticText2;
63 Create(0, wxID_ANY, _(
"Table: yatish_project"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T(
"wxID_ANY"));
64 BoxSizer1 =
new wxBoxSizer(wxVERTICAL);
65 staticBoxSizer =
new wxStaticBoxSizer(wxHORIZONTAL,
this, _(
"(previously selected row)"));
66 FlexGridSizer1 =
new wxFlexGridSizer(2, 2, 0, 0);
67 StaticText1 =
new wxStaticText(
this, wxID_ANY, _(
"Name:"), wxDefaultPosition, wxDefaultSize, 0, _T(
"wxID_ANY"));
68 FlexGridSizer1->Add(StaticText1, 1, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
69 textCtrlName =
new wxTextCtrl(
this,
idTextCtrlName, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T(
"idTextCtrlName"));
70 FlexGridSizer1->Add(
textCtrlName, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5);
71 StaticText2 =
new wxStaticText(
this, wxID_ANY, _(
"Client:"), wxDefaultPosition, wxDefaultSize, 0, _T(
"wxID_ANY"));
72 FlexGridSizer1->Add(StaticText2, 1, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
73 choiceClient =
new wxChoice(
this,
idChoiceClient, wxDefaultPosition, wxDefaultSize, 0, 0, 0, wxDefaultValidator, _T(
"idChoiceClient"));
74 FlexGridSizer1->Add(
choiceClient, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5);
75 staticBoxSizer->Add(FlexGridSizer1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
76 BoxSizer1->Add(
staticBoxSizer, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
77 BoxSizer2 =
new wxBoxSizer(wxHORIZONTAL);
78 buttonCancel =
new wxButton(
this, wxID_CANCEL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T(
"wxID_CANCEL"));
79 BoxSizer2->Add(buttonCancel, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
80 buttonSave =
new wxButton(
this, wxID_SAVE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T(
"wxID_SAVE"));
81 BoxSizer2->Add(
buttonSave, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
82 buttonNew =
new wxButton(
this, wxID_NEW, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T(
"wxID_NEW"));
83 BoxSizer2->Add(
buttonNew, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
84 BoxSizer1->Add(BoxSizer2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
87 BoxSizer1->SetSizeHints(
this);
100 TransferDataFromWindow();
102 EndModal (wxID_SAVE);
104 EndModal (wxID_CANCEL);
108 TransferDataFromWindow();
112 EndModal (wxID_CANCEL);
Interacts with yatish tables in a SQLite database.
bool FillChoice(wxChoice *, tableID)
Fills a wxChoice.
bool RecordProject(long, const wxString &, int)
Modifies or creates a record in the yatish_project table.
void OnButtonSaveClick(wxCommandEvent &event)
static const long idChoiceClient
void OnButtonNewClick(wxCommandEvent &event)
static const long idTextCtrlName
wxStaticBoxSizer * staticBoxSizer
wxTextCtrl * textCtrlName
yatishDlgProject(yatishDBsqlite *, long)
This constructor initializes the dialog box with data from the SQL record identified by sql_id.