-
Notifications
You must be signed in to change notification settings - Fork 4
/
dbase_cashier.h
59 lines (36 loc) · 1.22 KB
/
dbase_cashier.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef DBASE_CASHIER_H
#define DBASE_CASHIER_H
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QSqlQueryModel>
#include<QList>
#include <QMessageBox>
class Dbase_Cashier
{
private:
QSqlDatabase db;
public:
Dbase_Cashier(const QString &path);
~Dbase_Cashier();
bool isOpen() const;
bool cashierAuth(const QString& uname, const QString& pass) const;
////fnction to handle logout
void deleteCashier_Login();
QList<QString> getCashier_loginDetails();
QList<QString> getComDetails();
bool validProduct(QString &id);
bool validCashier(QString &username,QString &oldpassword);
void updateCashier(QString &Username,QString &newpassword);
////functions for invoice
void createBillTable();
QList<QString> getProductDetails(const QString &id);
bool addProduct(const QString &id,const QString &name,const int &quantity,const double &rate,const double &amount);
bool product_IdExists(const QString &id);
void deleteBillTable();
QList<QString> getAmount();
////functions for history
void createHistoryTable();
bool addHistory(const QString &date,const double &billamount,const QString &cashier);
int getBillNo();
};
#endif // DBASE_CASHIER_H