Logo Search packages:      
Sourcecode: lemonpos version File versions

Azahar Class Reference

#include <azahar.h>

List of all members.


Detailed Description

Database access class.

This class makes all database access.

Author:
Miguel Chavez Gamboa <miguel.chavez.gamboa@gmail.com>
Version:
0.1

Definition at line 42 of file azahar.h.


Public Member Functions

bool cancelTransaction (qulonglong id)
bool createOffer (OfferInfo info)
bool decrementProductStock (qulonglong code, double qty, QDate date)
bool deleteEmptyTransactions ()
bool deleteOffer (qlonglong id)
bool deleteTransaction (qulonglong id)
QList< pieProdInfo > getAlmostSoldOutProducts (int min, int max)
QHash< QString, int > getCategoriesHash ()
QStringList getCategoriesList ()
qulonglong getCategoryId (QString texto)
QString getCategoryStr (qulonglong id)
unsigned int getClientId (QString uname)
ClientInfo getClientInfo (qulonglong clientId)
QHash< QString, ClientInfo > getClientsHash ()
QString getMainClient ()
qulonglong getMeasureId (QString texto)
QStringList getMeasuresList ()
QString getMeasureStr (qulonglong id)
ProfitRange getMonthProfitRange ()
ProfitRange getMonthSalesRange ()
QList< TransactionInfo > getMonthTransactions ()
QString getOffersFilterWithText (QString text)
qulonglong getProductCode (QString text)
double getProductDiscount (qulonglong code)
ProductInfo getProductInfo (qulonglong code)
qulonglong getProductOfferCode (qulonglong code)
QList< qulonglong > getProductsCode (QString regExpName)
QStringList getProductsList ()
QList< pieProdInfo > getTop5SoldProducts ()
TransactionInfo getTransactionInfo (qulonglong id)
unsigned int getUserId (QString uname)
QString getUserName (QString username)
QHash< QString, UserInfo > getUsersHash ()
bool incrementClientPoints (qulonglong id, qulonglong points)
void initDatabase (QString user, QString server, QString password, QString dbname)
qulonglong insertBalance (BalanceInfo info)
bool insertCategory (QString text)
bool insertClient (ClientInfo info)
bool insertMeasure (QString text)
bool insertProduct (ProductInfo info)
qulonglong insertTransaction (TransactionInfo info)
bool insertUser (UserInfo info)
bool isConnected ()
QString lastError ()
bool moveOffer (qulonglong oldp, qulonglong newp)
void setDatabase (QSqlDatabase database)
bool updateClient (ClientInfo info)
bool updateProduct (ProductInfo info, qulonglong oldcode)
bool updateTransaction (TransactionInfo info)
bool updateUser (UserInfo info)

Private Member Functions

void setError (QString err)

Private Attributes

QSqlDatabase db
QString errorStr
QString m_mainClient

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index