• 大小: 12M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-07-21
  • 语言: 其他
  • 标签: 其他  

资源简介

嵌入式课程设计(ARM-a9).rar

资源截图

代码片段和文件信息

#include “creategoodstable.h“
creategoodstable::creategoodstable()
{



}
void creategoodstable::create(){
    QSqlDatabase database=QSqlDatabase::addDatabase(“QSQLITE“);
    database.setDatabaseName(“MYsql.db“);
    if(!database.open()){
        QMessageBox::information(NULL“CONNECT SQLLITE““connect error“QMessageBox::Yes|QMessageBox::NoQMessageBox::Yes);
    }
    QString create_table=“drop table goods“;
    QSqlQuery sql_query;
//    sql_query.prepare(create_table);

//    if(!sql_query.exec()){

//        QMessageBox::information(NULL“CREATE TABLE““drop error“QMessageBox::Yes|QMessageBox::NoQMessageBox::Yes);

//    }


    create_table=“create table goods (id int primary keyname varchar(30)price doublecount intimagename varchar(60))“;
    sql_query.prepare(create_table);

    if(!sql_query.exec()){

//        QMessageBox::information(NULL“CREATE TABLE““tabel existed“QMessageBox::Yes|QMessageBox::NoQMessageBox::Yes);

    }else{

           QString sql;
           sql=“insert into goods values (?????)“;//***************************************
           sql_query.prepare(sql);
           sql_query.addBindValue(0);
           sql_query.addBindValue(“name0“);
           sql_query.addBindValue(9);
           sql_query.addBindValue(10);
           sql_query.addBindValue(“image00“);
           if(!sql_query.exec()){
               QMessageBox::information(NULL“insert““insert error“QMessageBox::YesQMessageBox::Yes);
           }
           sql_query.prepare(sql);
           sql_query.addBindValue(1);
           sql_query.addBindValue(“name1“);
           sql_query.addBindValue(9);
           sql_query.addBindValue(10);
           sql_query.addBindValue(“image01“);
           if(!sql_query.exec()){
               QMessageBox::information(NULL“insert““insert error“QMessageBox::YesQMessageBox::Yes);
           }

           sql_query.prepare(sql);
           sql_query.addBindValue(2);
           sql_query.addBindValue(“name2“);
           sql_query.addBindValue(9);
           sql_query.addBindValue(10);
           sql_query.addBindValue(“image02“);
           if(!sql_query.exec()){
               QMessageBox::information(NULL“insert““insert error“QMessageBox::YesQMessageBox::Yes);
           }

           sql_query.prepare(sql);//***************************************
           sql_query.addBindValue(3);
           sql_query.addBindValue(“name3“);
           sql_query.addBindValue(9);
           sql_query.addBindValue(10);
           sql_query.addBindValue(“image10“);
           if(!sql_query.exec()){
               QMessageBox::information(NULL“insert““insert error“QMessageBox::YesQMessageBox::Yes);
           }

           sql_query.prepare(sql);
           sql_query.addBindValue(4);
           sql_query.addBindValue(“name4“);
           sql_query.addBindValue(9);
           sql_query.addBindValue(10);
           sql_query.addBindVal

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        747  2019-08-23 15:00  automatic-teller-machine-ARM-a9\automarket\automarket\automarket.pro

     文件      47767  2019-08-23 15:00  automatic-teller-machine-ARM-a9\automarket\automarket\automarket.pro.user

     文件       7354  2019-08-23 15:00  automatic-teller-machine-ARM-a9\automarket\automarket\creategoodstable.cpp

     文件        381  2019-08-23 15:00  automatic-teller-machine-ARM-a9\automarket\automarket\creategoodstable.h

     文件       1117  2019-08-23 15:00  automatic-teller-machine-ARM-a9\automarket\automarket\createmanagertable.cpp

     文件        369  2019-08-23 15:00  automatic-teller-machine-ARM-a9\automarket\automarket\createmanagertable.h

     文件         76  2019-08-23 15:00  automatic-teller-machine-ARM-a9\automarket\automarket\fdsv.cpp

     文件        204  2019-08-23 15:00  automatic-teller-machine-ARM-a9\automarket\automarket\fdsv.h

     文件       6134  2019-08-23 15:00  automatic-teller-machine-ARM-a9\automarket\automarket\gooddetailpage.cpp

     文件       1494  2019-08-23 15:00  automatic-teller-machine-ARM-a9\automarket\automarket\gooddetailpage.h

     文件       6377  2019-08-23 15:00  automatic-teller-machine-ARM-a9\automarket\automarket\gooddetailpage.ui

     文件        409  2019-08-23 15:00  automatic-teller-machine-ARM-a9\automarket\automarket\goodsimage.qrc

     文件         94  2019-08-23 15:00  automatic-teller-machine-ARM-a9\automarket\automarket\goodwidget.cpp

     文件        233  2019-08-23 15:00  automatic-teller-machine-ARM-a9\automarket\automarket\goodwidget.h

     文件         93  2019-08-23 15:00  automatic-teller-machine-ARM-a9\automarket\automarket\good_list.cpp

     文件        302  2019-08-23 15:00  automatic-teller-machine-ARM-a9\automarket\automarket\good_list.h

     文件      55882  2019-08-23 15:00  automatic-teller-machine-ARM-a9\automarket\automarket\image\7f5da8258853c1f9fdf089364307f3d1.jpg

     文件      90879  2019-08-23 15:00  automatic-teller-machine-ARM-a9\automarket\automarket\image\a28b17ea1d70dccaf973ee327b599324.jpg

     文件       2673  2019-08-23 15:00  automatic-teller-machine-ARM-a9\automarket\automarket\image\erweima.gif

     文件      71980  2019-08-23 15:00  automatic-teller-machine-ARM-a9\automarket\automarket\image\f2f728e9aa55bacf366b86815cfc7f82.jpg

     文件         94  2019-08-23 15:00  automatic-teller-machine-ARM-a9\automarket\automarket\imageclass.cpp

     文件        542  2019-08-23 15:00  automatic-teller-machine-ARM-a9\automarket\automarket\imageclass.h

     文件       1916  2019-08-23 15:00  automatic-teller-machine-ARM-a9\automarket\automarket\loadpage.cpp

     文件       1084  2019-08-23 15:00  automatic-teller-machine-ARM-a9\automarket\automarket\loadpage.h

     文件       2198  2019-08-23 15:00  automatic-teller-machine-ARM-a9\automarket\automarket\loadpage.ui

     文件        394  2019-08-23 15:00  automatic-teller-machine-ARM-a9\automarket\automarket\main.cpp

     文件      30392  2019-08-23 15:00  automatic-teller-machine-ARM-a9\automarket\automarket\mainwindow.cpp

     文件       3571  2019-08-23 15:00  automatic-teller-machine-ARM-a9\automarket\automarket\mainwindow.h

     文件      11881  2019-08-23 15:00  automatic-teller-machine-ARM-a9\automarket\automarket\mainwindow.ui

     文件        260  2019-08-23 15:00  automatic-teller-machine-ARM-a9\automarket\automarket\managerloadpage.cpp

............此处省略161个文件信息

评论

共有 条评论