listtipoivaview.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2004 by Tomeu Borras Riera                              *
00003  *   tborras@conetxia.com                                                  *
00004  *   Copyright (C) 2006 by Fco. Javier M. C. (Porting to QT4)              *
00005  *   fcojavmc@todo-redes.com                                               *
00006  *                                                                         *
00007  *   This program is free software; you can redistribute it and/or modify  *
00008  *   it under the terms of the GNU General Public License as published by  *
00009  *   the Free Software Foundation; either version 2 of the License, or     *
00010  *   (at your option) any later version.                                   *
00011  *                                                                         *
00012  *   This program is distributed in the hope that it will be useful,       *
00013  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00014  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00015  *   GNU General Public License for more details.                          *
00016  *                                                                         *
00017  *   You should have received a copy of the GNU General Public License     *
00018  *   along with this program; if not, write to the                         *
00019  *   Free Software Foundation, Inc.,                                       *
00020  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00021  ***************************************************************************/
00022 
00023 #include <QMessageBox>
00024 #include <QWidget>
00025 #include <QComboBox>
00026 #include <QToolButton>
00027 #include <QTextStream>
00028 #include <QLayout>
00029 #include <QMessageBox>
00030 
00031 #include <fstream>
00032 
00033 #include "listtipoivaview.h"
00034 #include "company.h"
00035 #include "configuracion.h"
00036 #include "busquedacliente.h"
00037 #include "busquedafecha.h"
00038 
00039 #include "funcaux.h"
00040 
00041 
00043 
00047 ListTipoIVAView::ListTipoIVAView(Company *comp, QWidget *parent)
00048         : FichaBf(comp, parent) {
00049     _depura("ListTipoIVAView::ListTipoIVAView", 1);
00050     setTitleName(tr("Tipo IVA"));
00051     setDBTableName("tipo_iva");
00052     setAttribute(Qt::WA_DeleteOnClose);
00053     setupUi(this);
00054     mui_listado->setEmpresaBase(comp);
00055     mui_listado->cargar();
00056     meteWindow(windowTitle(), this);
00057     _depura("END ListTipoIVAView::ListTipoIVAView", 1);
00058 }
00059 
00060 
00062 
00064 void ListTipoIVAView::on_mui_aceptar_clicked() {
00065     _depura("ListTipoIVAView::on_mui_aceptar_clicked", 0);
00066     try {
00067         mui_listado->guardar();
00068         close();
00069     } catch (...) {
00070         mensajeInfo("Error al guardar los almacenes");
00071     } // end try
00072     _depura("END ListTipoIVAView::on_mui_aceptar_clicked", 0);
00073 }
00074 
00075 
00077 
00079 ListTipoIVAView::~ListTipoIVAView() {
00080     _depura("ListTipoIVAView::~ListTipoIVAView", 0);
00081     _depura("END ListTipoIVAView::~ListTipoIVAView", 0);
00082 }
00083 
00084 /*
00085 int ListTipoIVAView::sacaWindow() {
00086     _depura("ListTipoIVAView::sacaWindow", 0);
00087     companyact->sacaWindow(this);
00088     _depura("END ListTipoIVAView::sacaWindow", 0);
00089     return 0;
00090 }
00091 */
00092 
00093 
00096 
00099 ListTipoIVASubForm::ListTipoIVASubForm(QWidget *parent) : SubForm2Bf(parent) {
00100     _depura("ListTipoIVASubForm::ListTipoIVASubForm", 0);
00101     setDBTableName("tipo_iva");
00102     setDBCampoId("idtipo_iva");
00103     addSHeader("idtipo_iva", DBCampo::DBint, DBCampo::DBPrimaryKey, SHeader::DBNoView, tr("Id Tipo IVA"));
00104     addSHeader("desctipo_iva", DBCampo::DBvarchar, DBCampo::DBNotNull, SHeader::DBNone, tr("Tipo IVA"));
00105     setinsercion(TRUE);
00106     _depura("END ListTipoIVASubForm::ListTipoIVASubForm", 0);
00107 }
00108 
00109 
00111 
00113 void ListTipoIVASubForm::cargar() {
00114         _depura("ListTipoIVASubForm::cargar", 0);
00115         SubForm3::cargar("SELECT * FROM tipo_iva");
00116         _depura("END ListTipoIVASubForm::cargar", 0);
00117 }
00118 

Generated on Sat Dec 15 00:01:13 2007 for BulmaGes by  doxygen 1.5.1