00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include <iostream>
00013 #include <iomanip>
00014 #include "cgiTemplates.h"
00015 #include "connectstring"
00016 #include "forms.h"
00017 #include "ocTypes.h"
00018 #include "ocString.h"
00019 #include "read_write_base.hpp"
00020 #include "forms_base.hpp"
00021 #include "list_base.hpp"
00022 #include "cgiTemplates.h"
00023
00024 #include "Customer_Payment_Parameter.hpp"
00025
00026 #include "openLogin.h"
00027 #include "connectstring"
00028 using namespace std;
00029 openLogin oLogin;
00030
00031 class Customer_Payment_Parameter_form: public Customer_Payment_Parameter_Obj, public forms_base
00032 {
00033 public:
00034 Customer_Payment_Parameter_form(cgiScript & script):Customer_Payment_Parameter_Obj(),forms_base(script)
00035 {
00036 setKey(*this);
00037 }
00038 virtual ~Customer_Payment_Parameter_form(){;}
00039
00040 void form_id_transfer( void )
00041 {
00042 llongFXfer( "Id", Id );
00043 }
00044 void form_data_transfer( void )
00045 {
00046 llongFXfer( "Customer_Pmt_Service_Id", Customer_Pmt_Service_Id);
00047 llongFXfer( "Pmt_Type_Param_Id", Pmt_Type_Param_Id);
00048 stringFXfer( "Machine_Name", Machine_Name);
00049 stringFXfer( "Value", Value);
00050 }
00051
00052 bool dbf_action( string mode, changeMap & changes )
00053 {
00054 return db_action( mode, changes );
00055 }
00056
00057
00058 bool form_display( void )
00059 {
00060 bool breturn = true;
00061 script << makeTop("Customer_Payment_Parameter_ui.cgi", "Customer_Payment_Parameter");
00062 script << makeStaticBox("Id", "Id", Id ,"8");
00063 script << makeComboBox("Customer_Pmt_Service_Id", "Customer_Pmt_Service_Id", Customer_Pmt_Service_Id ,sql);
00064 script << makeComboBox("Pmt_Type_Param_Id", "Pmt_Type_Param_Id", Pmt_Type_Param_Id ,sql);
00065 script << makeTextBox("Machine_Name", "Machine_Name", Machine_Name ,"25");
00066 script << makeTextBox("Value", "Value", Value ,"25");
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088 script << makeButtons( key() );
00089 script << makeBottom( m_result ) << endl;
00090 return breturn;
00091 }
00092 };
00093
00094
00095 int main( int argcount, char ** args )
00096 {
00097 cgiScript script( "text/html", false );
00098 Customer_Payment_Parameter_form myFrm(script);
00099
00100 if( oLogin.testLoginStatus() )
00101 {
00102 script.closeHeader();
00103 cgiTemplates pgTemplate;
00104 pgTemplate.load("Templates/adminPane.htmp");
00105
00106 script << ocString(pgTemplate.getParagraph("top"))
00107 .replaceAll("$heading$","Customer_Payment_Parameter");
00108
00109 myFrm.loadControlTemplates("Templates/child_form.htmp");
00110 myFrm.form_action();
00111 myFrm.form_display();
00112
00113 ocString end = pgTemplate.getParagraph("bottom");
00114 script << end;
00115 }
00116 else
00117 {
00118 script.Redirect("signIn.html");
00119 }
00120 }
00121
00122 #include "read_write_base.cpp"
00123 #include "forms_base.cpp"
00124