コード例 #1
0
void DMR_DEMIRBAS_KARTI::DELETE_RECORD ( int record_id )
{
    SQL_QUERY sql_query ( DB );

    sql_query.PREPARE_SELECT ( "dmr_demirbaslar","demirbas_kodu , demirbas_adi,fatura_id",
                               "demirbas_id = :demirbas_id");
    sql_query.SET_VALUE      ( ":demirbas_id" , record_id );

    if ( sql_query.SELECT() EQ 0 ) {
        return;
    }
    sql_query.NEXT();
    QString demirbas_kodu = sql_query.VALUE(0).toString();
    QString demirbas_adi  = sql_query.VALUE(1).toString();
    int     fatura_id     = sql_query.VALUE(2).toInt();

    if ( fatura_id > 0 ) {
        DMR_ENTEGRASYON_FISI_OLUSTUR(fatura_id , 0);
    }


    SQL_QUERY delete_query ( DB );

    delete_query.PREPARE_DELETE ( "dmr_demirbaslar","demirbas_id = :demirbas_id" );
    delete_query.SET_VALUE      ( ":demirbas_id" , record_id );
    delete_query.DELETE();

    GRP_KAYDIN_GRUPLARINI_SIL(E9_PROGRAMI,DEMIRBAS_GRUP_MODULU,record_id);

    QString log_detaylari = QObject::tr ( "Demirbaş Kodu / Adı : " );
    log_detaylari.append ( demirbas_kodu + "  " + demirbas_adi );

    E9_LOG_KAYDI_EKLE  ( DEMIRBAS_MODULU , LOG_DMR_DEMIRBASLAR , LOG_ISLEM_DELETE , log_detaylari );
}
コード例 #2
0
ファイル: openjpip.c プロジェクト: 7sam7/openjpeg
void end_QRprocess( server_record_t *rec, QR_t **qr)
{
  /* TODO: record client preferences if necessary*/
  (void)rec; /* unused */
  delete_query( &((*qr)->query));
  delete_msgqueue( &((*qr)->msgqueue));
  opj_free( *qr);
}
コード例 #3
0
void ADR_KARTI_SIL( int p_adres_id )
{
    SQL_QUERY delete_query( DB );

    delete_query.PREPARE_DELETE ( "adr_adresler","adres_id = :adres_id");
    delete_query.SET_VALUE      ( ":adres_id" , p_adres_id);
    delete_query.DELETE();

}
コード例 #4
0
void addDataFromLocalFile(QString fileName, MyModel* model)
{
    QSqlQuery delete_query("DELETE from result3", model->database());

    QSqlQuery reset_pk("alter table result3 auto_increment=1");
    QSqlQuery query(model->database());
    fileName.prepend("'");
    fileName.append("'");
    query.prepare("LOAD DATA INFILE " + fileName + " replace INTO table result3 fields terminated by ' '" );
    qDebug() << "Start importing on thread " <<  QThread::currentThread();
    qDebug() << query.exec();

    QSqlQuery query2("delete from gap_all_sp", model->database());
    QSqlQuery query3("delete from gap_all_nsp", model->database());

    QSqlQuery query4("INSERT INTO gap_all_sp (Serial) SELECT Serial from result3", model->database());
    QSqlQuery query5("INSERT INTO gap_all_nsp (Serial) SELECT Serial from result3", model->database());

    for (int blueBall = 1; blueBall <= 16; ++blueBall)
    {
        QString sp_table = "gap_blue" + QString::number(blueBall)+ "_sp";
        QString nsp_table = "gap_blue" + QString::number(blueBall)+ "_nsp";
        QSqlQuery gap_table_query1("DELETE FROM " + sp_table, model->database());
        QSqlQuery gap_table_query2("DELETE FROM " + nsp_table, model->database());

        QSqlQuery insert_query_sp;
        insert_query_sp.prepare("INSERT INTO " + sp_table + " (Serial) SELECT Serial from result3 where Blue1 = :Blue1");
        insert_query_sp.bindValue(":Blue1", blueBall);
        insert_query_sp.exec();

        QSqlQuery insert_query_nsp;
        insert_query_nsp.prepare("INSERT INTO " + nsp_table + " (Serial) SELECT Serial from result3 where Blue1 = :Blue1");
        insert_query_nsp.bindValue(":Blue1", blueBall);
        insert_query_nsp.exec();

    }

    model->calculateGaps();

    model->select();
}
コード例 #5
0
void STOK_HIZMET_KARTI_FORMU::DELETE_RECORD ( int record_id )
{
    SQL_QUERY delete_query(DB);
    SQL_QUERY sql_query(DB);

    sql_query.PREPARE_SELECT("stk_urunler","urun_kodu,urun_adi" ,"urun_id = :urun_id");
    sql_query.SET_VALUE(":urun_id" , record_id);

    if(sql_query.SELECT() EQ 0 ) {
        return;
    }
    sql_query.NEXT();
    QString hizmet_kodu = sql_query.VALUE(0).toString();
    QString hizmet_ismi = sql_query.VALUE(1).toString();

    delete_query.PREPARE_DELETE("stk_urunler", "urun_id = :urun_id");
    delete_query.SET_VALUE(":urun_id" , record_id);
    delete_query.DELETE();

    QString log_detaylari = "Hizmet Kodu / Adı : " + hizmet_kodu + "  " + hizmet_ismi;

    K9_LOG_KAYDI_EKLE ( FATURA_MODULU , LOG_FAT_HIZMETLER , LOG_ISLEM_DELETE , log_detaylari);
}