listalmacenview.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 "listalmacenview.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 ListAlmacenView::ListAlmacenView(Company *comp, QWidget *parent)
00048         : FichaBf(comp, parent) {
00049     _depura("ListAlmacenView::ListAlmacenView", 1);
00050     setTitleName(tr("Almacen"));
00051     setDBTableName("almacen");
00052     setAttribute(Qt::WA_DeleteOnClose);
00053     setupUi(this);
00054     mui_listado->setEmpresaBase(comp);
00055     mui_listado->cargar();
00056     meteWindow(windowTitle(), this);
00057     _depura("END ListAlmacenView::ListAlmacenView", 1);
00058 }
00059 
00060 
00062 
00064 void ListAlmacenView::on_mui_aceptar_clicked() {
00065     _depura("ListAlmacenView::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 ListAlmacenView::on_mui_aceptar_clicked", 0);
00073 }
00074 
00075 
00077 
00079 ListAlmacenView::~ListAlmacenView() {
00080     _depura("ListAlmacenView::~ListAlmacenView", 0);
00081     _depura("END ListAlmacenView::~ListAlmacenView", 0);
00082 }
00083 
00084 
00087 
00090 ListAlmacenSubForm::ListAlmacenSubForm(QWidget *parent) : SubForm2Bf(parent) {
00091     _depura("ListAlmacenSubForm::ListAlmacenSubForm", 0);
00092     setDBTableName("almacen");
00093     setDBCampoId("idalmacen");
00094     addSHeader("idalmacen", DBCampo::DBint, DBCampo::DBPrimaryKey, SHeader::DBNoView, tr("Id almacen"));
00095     addSHeader("codigoalmacen", DBCampo::DBvarchar, DBCampo::DBNotNull, SHeader::DBNone, tr("Codigo almacen"));
00096     addSHeader("nomalmacen", DBCampo::DBvarchar, DBCampo::DBNotNull, SHeader::DBNone, tr("Nombre almacen"));
00097     setinsercion(TRUE);
00098     _depura("END ListAlmacenSubForm::ListAlmacenSubForm", 0);
00099 }
00100 
00101 
00103 
00105 void ListAlmacenSubForm::cargar() {
00106         _depura("ListAlmacenSubForm::cargar", 0);
00107         SubForm3::cargar("SELECT * FROM almacen");
00108         _depura("END ListAlmacenSubForm::cargar", 0);
00109 }
00110 

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