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 #include "openLogin.h"
00024 #include "connectstring"
00025 #include "Customer_Payment_Service.hpp"
00026 #include "list_base.hpp"
00027
00028 using namespace std;
00029 openLogin oLogin;
00030
00031 class Customer_Payment_Service_form: public Customer_Payment_Service_Obj, public forms_base
00032 {
00033 public:
00034 Customer_Payment_Service_form(cgiScript & script):Customer_Payment_Service_Obj(),forms_base(script)
00035 {
00036 setKey(*this);
00037 }
00038 virtual ~Customer_Payment_Service_form(){;}
00039
00040 void form_id_transfer( void )
00041 {
00042 llongFXfer( "Id", Id );
00043 }
00044 void form_data_transfer( void )
00045 {
00046 llongFXfer( "Customer_Id", Customer_Id);
00047 llongFXfer( "Payment_Service_Id", Payment_Service_Id);
00048 }
00049
00050 bool dbf_action( string mode, changeMap & changes )
00051 {
00052 return db_action( mode, changes );
00053 }
00054
00055
00056 bool form_display( void )
00057 {
00058 bool breturn = true;
00059 script << makeTop("Customer_Payment_Service_ui.cgi", "Customer_Payment_Service");
00060 script << makeStaticBox("Id", "Id", Id ,"8");
00061 script << makeComboBox("Customer_Id", "Customer_Id", Customer_Id ,sql);
00062 script << makeComboBox("Payment_Service_Id", "Payment_Service_Id", Payment_Service_Id ,sql);
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084 script << makeButtons( key() );
00085 script << makeBottom( m_result ) << endl;
00086 return breturn;
00087 }
00088 };
00089
00090
00091 int main( int argcount, char ** args )
00092 {
00093 cgiScript script( "text/html", false );
00094 Customer_Payment_Service_form myFrm(script);
00095
00096 if( oLogin.testLoginStatus() )
00097 {
00098 script.closeHeader();
00099 cgiTemplates pgTemplate;
00100 pgTemplate.load("Templates/adminPane.htmp");
00101
00102 script << ocString(pgTemplate.getParagraph("top"))
00103 .replaceAll("$heading$","Customer_Payment_Service");
00104
00105 myFrm.loadControlTemplates("Templates/child_form.htmp");
00106 myFrm.form_action();
00107 myFrm.form_display();
00108
00109 ocString end = pgTemplate.getParagraph("bottom");
00110 script << end;
00111 }
00112 else
00113 {
00114 script.Redirect("signIn.html");
00115 }
00116 }
00117
00118 #include "read_write_base.cpp"
00119 #include "forms_base.cpp"
00120