1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/SharerMax-VMS

Клонировать/Скачать
purchasemsgdialog.cpp 1.3 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
SharerMax Отправлено 11.11.2013 23:31 fbae773
#include "purchasemsgdialog.h"
#include "ui_purchasemsgdialog.h"
purchaseMSGDialog::purchaseMSGDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::purchaseMSGDialog)
{
ui->setupUi(this);
}
purchaseMSGDialog::~purchaseMSGDialog()
{
delete ui;
}
void purchaseMSGDialog::purchaseSet(QModelIndex index, QSqlTableModel *model)
{
QString pid = model->record(index.row()).value(0).toString();
QString fid = model->record(index.row()).value(1).toString();
QString pkind = model->record(index.row()).value(2).toString();
QString pweight = model->record(index.row()).value(3).toString();
QString pprice = model->record(index.row()).value(4).toString();
QString ptime = model->record(index.row()).value(5).toString();
double pay = pweight.toDouble() * pprice.toDouble();
QString ppay;
QString sql = "SELECT fname FROM farmer WHERE fid = " + fid;
QSqlQuery query;
query.first();
ui->pMSGPIDLineEdit->setText(pid);
ui->pMSGIDLineEdit->setText(fid);
ui->pMSGNameLineEdit->setText(query.value(0).toString());
ui->pMSGKindLineEdit->setText(pkind);
ui->pMSGWeightLineEdit->setText(pweight);
ui->pMSGPriceLineEdit->setText(pprice);
ui->pMSGTimeLlineEdit->setText(ptime);
ui->pMSGPayLineEdit->setText(ppay.setNum(pay));
}
void purchaseMSGDialog::on_pMSGOKButton_clicked()
{
close();
}

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/SharerMax-VMS.git
git@api.gitlife.ru:oschina-mirror/SharerMax-VMS.git
oschina-mirror
SharerMax-VMS
SharerMax-VMS
master