示例#1
0
contact::contact(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  connect(_close,		  SIGNAL(clicked()), this, SLOT(sClose()));
  connect(_deleteCharacteristic,  SIGNAL(clicked()), this, SLOT(sDeleteCharass()));
  connect(_detachUse,		  SIGNAL(clicked()), this, SLOT(sDetachUse()));
  connect(_editCharacteristic,    SIGNAL(clicked()), this, SLOT(sEditCharass()));
  connect(_editUse,  		  SIGNAL(clicked()), this, SLOT(sEditUse()));
  connect(_newCharacteristic,     SIGNAL(clicked()), this, SLOT(sNewCharass()));
  connect(_save,	          SIGNAL(clicked()), this, SLOT(sSave()));
  connect(_uses, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*)), this, SLOT(sPopulateUsesMenu(QMenu*)));
  connect(_uses, SIGNAL(valid(bool)), this, SLOT(sHandleValidUse(bool)));
  connect(_viewUse,	          SIGNAL(clicked()), this, SLOT(sViewUse()));
  connect(omfgThis,        SIGNAL(vendorsUpdated()), this, SLOT(sFillList()));
  connect(omfgThis,      SIGNAL(prospectsUpdated()), this, SLOT(sFillList()));
  connect(omfgThis,     SIGNAL(warehousesUpdated()), this, SLOT(sFillList()));
  connect(omfgThis, SIGNAL(crmAccountsUpdated(int)), this, SLOT(sFillList()));
  connect(omfgThis, SIGNAL(customersUpdated(int,bool)), this, SLOT(sFillList()));

  _charass->addColumn(tr("Characteristic"), _itemColumn, Qt::AlignLeft );
  _charass->addColumn(tr("Value"),          -1,          Qt::AlignLeft );

  _uses->addColumn(tr("Used by"),         100, Qt::AlignLeft  );
  _uses->addColumn(tr("Number"), _orderColumn, Qt::AlignLeft  );
  _uses->addColumn(tr("Name"),	           -1, Qt::AlignLeft  );
  _uses->addColumn(tr("Role"),	           -1, Qt::AlignLeft  );
  _uses->addColumn(tr("Active"),    _ynColumn, Qt::AlignCenter);

  _activeCache = false;
}
示例#2
0
/*
 *  Constructs a lotSerialRegistration as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 */
lotSerialRegistration::lotSerialRegistration(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  _lsregid = -1;

  // signals and slots connections
  connect(_save,	SIGNAL(clicked()),              this, SLOT(sSave()));
  connect(_soldDate,    SIGNAL(newDate(const QDate&)),  this, SLOT(sDateUpdated()));
  connect(_crmacct,     SIGNAL(newId(int)),             this, SLOT(sSetSoCustId()));
  connect(_so,          SIGNAL(newId(int)),             this, SLOT(sSetSoId()));
  connect(_deleteChar,  SIGNAL(clicked()),              this, SLOT(sDeleteCharass()));
  connect(_editChar,    SIGNAL(clicked()),              this, SLOT(sEditCharass()));
  connect(_newChar,     SIGNAL(clicked()),              this, SLOT(sNewCharass()));
  
  _charass->addColumn(tr("Characteristic"), _itemColumn, Qt::AlignLeft );
  _charass->addColumn(tr("Value"),          -1,          Qt::AlignLeft );
 
  _lotSerial->setStrict(true);
  _cntct->setAccountVisible(FALSE);
  _cntct->setActiveVisible(FALSE);

  _so->setType(cSoReleased);

  _qty->setValidator(omfgThis->qtyVal());
  
  resize(minimumSize());
}
lotSerialRegistration::lotSerialRegistration(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  _lsregid = -1;

  connect(_buttonBox,	SIGNAL(accepted()),              this, SLOT(sSave()));
  connect(_soldDate,    SIGNAL(newDate(const QDate&)),  this, SLOT(sDateUpdated()));
  connect(_crmacct,     SIGNAL(newId(int)),             this, SLOT(sSetSoCustId()));
  connect(_so,          SIGNAL(newId(int,QString)),     this, SLOT(sSetSoId()));
  connect(_deleteChar,  SIGNAL(clicked()),              this, SLOT(sDeleteCharass()));
  connect(_editChar,    SIGNAL(clicked()),              this, SLOT(sEditCharass()));
  connect(_newChar,     SIGNAL(clicked()),              this, SLOT(sNewCharass()));
  
  _charass->addColumn(tr("Characteristic"), _itemColumn, Qt::AlignLeft, true, "char_name" );
  _charass->addColumn(tr("Value"),          -1,          Qt::AlignLeft, true, "charass_value" );
 
  _lotSerial->setStrict(true);
  _shipment->setStrict(true);

  _so->setAllowedTypes(OrderLineEdit::Sales);

  _qty->setValidator(omfgThis->qtyVal());
  
  adjustSize();
}
示例#4
0
lotSerial::lotSerial(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
    setupUi(this);

    connect(_save, SIGNAL(clicked()), this, SLOT(sSave()));
    connect(_lotSerial, SIGNAL(valid(bool)), this, SLOT(populate()));
    connect(_notes, SIGNAL(textChanged()), this, SLOT(sChanged()));
    connect(_deleteChar,  SIGNAL(clicked()), this, SLOT(sDeleteCharass()));
    connect(_editChar,    SIGNAL(clicked()), this, SLOT(sEditCharass()));
    connect(_newChar,     SIGNAL(clicked()), this, SLOT(sNewCharass()));
    connect(_deleteReg,  SIGNAL(clicked()), this, SLOT(sDeleteReg()));
    connect(_editReg,    SIGNAL(clicked()), this, SLOT(sEditReg()));
    connect(_newReg,     SIGNAL(clicked()), this, SLOT(sNewReg()));

    
    _charass->addColumn(tr("Characteristic"), _itemColumn, Qt::AlignLeft, true, "char_name" );
    _charass->addColumn(tr("Value"),          -1,          Qt::AlignLeft, true, "charass_value" );
    
    _reg->addColumn(tr("Number")      ,        _orderColumn,  Qt::AlignLeft, true, "lsreg_number" );
    _reg->addColumn(tr("CRM Account#"),        _itemColumn,  Qt::AlignLeft, true, "crmacct_number" );
    _reg->addColumn(tr("Name"        ),	      -1,   Qt::AlignLeft, true, "crmacct_name" );
    _reg->addColumn(tr("First Name"  ),        80,  Qt::AlignLeft, true, "cntct_first_name" );
    _reg->addColumn(tr("Last Name"   ),        80,  Qt::AlignLeft, true, "cntct_last_name" );
    _reg->addColumn(tr("Phone"       ),        80,  Qt::AlignLeft, true, "cntct_phone" );
  
    _changed=false;
}
示例#5
0
employee::employee(QWidget* parent, const char * name, Qt::WindowFlags fl)
    : XDialog(parent, name, fl)
{
  setupUi(this);

  connect(_attachGroup,   SIGNAL(clicked()), this, SLOT(sAttachGroup()));
  connect(_code,  SIGNAL(editingFinished()), this, SLOT(sHandleButtons()));
  connect(_deleteCharass, SIGNAL(clicked()), this, SLOT(sDeleteCharass()));
  connect(_detachGroup,   SIGNAL(clicked()), this, SLOT(sDetachGroup()));
  connect(_editCharass,   SIGNAL(clicked()), this, SLOT(sEditCharass()));
  connect(_editGroup,     SIGNAL(clicked()), this, SLOT(sEditGroup()));
  connect(_newCharass,    SIGNAL(clicked()), this, SLOT(sNewCharass()));
  connect(_salesrepButton,SIGNAL(clicked()), this, SLOT(sSalesrep()));
  connect(_save,          SIGNAL(clicked()), this, SLOT(sSave()));
  connect(_userButton,    SIGNAL(clicked()), this, SLOT(sUser()));
  connect(_viewGroup,     SIGNAL(clicked()), this, SLOT(sViewGroup()));

  _charass->addColumn(tr("Characteristic"), _itemColumn, Qt::AlignLeft, true, "char_name");
  _charass->addColumn(tr("Value"),          -1,          Qt::AlignLeft, true, "charass_value");

  _groups->addColumn(tr("Name"), _itemColumn, Qt::AlignLeft, true, "empgrp_name");
  _groups->addColumn(tr("Description"),   -1, Qt::AlignLeft, true, "empgrp_descrip");

  q.prepare("SELECT curr_abbr FROM curr_symbol WHERE (curr_id=baseCurrId());");
  q.exec();
  if (q.first())
    _currabbr = q.value("curr_abbr").toString();
  if (q.lastError().type() != QSqlError::NoError)
  {
    systemError(this, q.lastError().databaseText(), __FILE__, __LINE__);
    return;
  }

  _createUsers = false;
  q.exec("SELECT userCanCreateUsers(CURRENT_USER) AS enabled;");
  if (q.first())
    _createUsers = q.value("enabled").toBool();
  else if (q.lastError().type() != QSqlError::NoError)
    systemError(this, q.lastError().databaseText(), __FILE__, __LINE__);

  if (_privileges->check("MaintainSalesReps") ||
      _privileges->check("ViewSalesReps"))
    connect(_salesrep, SIGNAL(toggled(bool)), _salesrepButton, SLOT(setEnabled(bool)));
  if (_privileges->check("MaintainUsers"))
    connect(_user, SIGNAL(toggled(bool)), _userButton, SLOT(setEnabled(bool)));

  _per->append(-1,   "",           "");
  _per->append(0, tr("Hour"),      "Hour");
  _per->append(1, tr("Day"),       "Day");
  _per->append(2, tr("Week"),      "Week");
  _per->append(3, tr("Bi-Weekly"), "Biweek");
  _per->append(4, tr("Year"),      "Year");

  _comments->setId(-1);

  _empid = -1;
  _mode = cView;
  _origmode = cView;
}
示例#6
0
contact::contact(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  connect(_close,		  SIGNAL(clicked()), this, SLOT(sClose()));
  connect(_deleteCharacteristic,  SIGNAL(clicked()), this, SLOT(sDeleteCharass()));
  connect(_detachUse,		  SIGNAL(clicked()), this, SLOT(sDetachUse()));
  connect(_editCharacteristic,    SIGNAL(clicked()), this, SLOT(sEditCharass()));
  connect(_editUse,  		  SIGNAL(clicked()), this, SLOT(sEditUse()));
  connect(_newCharacteristic,     SIGNAL(clicked()), this, SLOT(sNewCharass()));
  connect(_save,	          SIGNAL(clicked()), this, SLOT(sSave()));
  connect(_uses, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*)), this, SLOT(sPopulateUsesMenu(QMenu*)));
  connect(_uses, SIGNAL(valid(bool)), this, SLOT(sHandleValidUse(bool)));
  connect(_viewUse,	          SIGNAL(clicked()), this, SLOT(sViewUse()));
  connect(omfgThis,        SIGNAL(vendorsUpdated()), this, SLOT(sFillList()));
  connect(omfgThis,      SIGNAL(prospectsUpdated()), this, SLOT(sFillList()));
  connect(omfgThis,     SIGNAL(warehousesUpdated()), this, SLOT(sFillList()));
  connect(omfgThis, SIGNAL(crmAccountsUpdated(int)), this, SLOT(sFillList()));
  connect(omfgThis, SIGNAL(customersUpdated(int,bool)), this, SLOT(sFillList())); 
  connect(_crmAccount, SIGNAL(newId(int)), _contact, SLOT(setSearchAcct(int)));

  _charass->addColumn(tr("Characteristic"), _itemColumn, Qt::AlignLeft, true, "char_name");
  _charass->addColumn(tr("Value"),          -1,          Qt::AlignLeft, true, "charass_value");

  _uses->addColumn(tr("Used by"),         100, Qt::AlignLeft, true, "type");
  _uses->addColumn(tr("Number"), _orderColumn, Qt::AlignLeft, true, "number");
  _uses->addColumn(tr("Name"),	           -1, Qt::AlignLeft, true, "name");
  _uses->addColumn(tr("Role"),	           -1, Qt::AlignLeft, true, "role");
  _uses->addColumn(tr("Active"),    _ynColumn, Qt::AlignCenter,true, "active");

  _activeCache = false;

  _contact->setMinimalLayout(false);
  _contact->setAccountVisible(false);
  _contact->setInitialsVisible(false);
  _contact->setActiveVisible(false);
  _contact->setOwnerVisible(false);
  _contact->setListVisible(false);

  if(!_privileges->check("EditOwner")) _owner->setEnabled(false);
}
示例#7
0
employee::employee(QWidget* parent, const char * name, Qt::WindowFlags fl)
    : XDialog(parent, name, fl)
{
  setupUi(this);

  connect(_attachGroup,   SIGNAL(clicked()), this, SLOT(sAttachGroup()));
  connect(_code,  SIGNAL(editingFinished()), this, SLOT(sHandleButtons()));
  connect(_crmacct,       SIGNAL(clicked()), this, SLOT(sCrmAccount()));
  connect(_deleteCharass, SIGNAL(clicked()), this, SLOT(sDeleteCharass()));
  connect(_detachGroup,   SIGNAL(clicked()), this, SLOT(sDetachGroup()));
  connect(_editCharass,   SIGNAL(clicked()), this, SLOT(sEditCharass()));
  connect(_editGroup,     SIGNAL(clicked()), this, SLOT(sEditGroup()));
  connect(_newCharass,    SIGNAL(clicked()), this, SLOT(sNewCharass()));
  connect(_save,          SIGNAL(clicked()), this, SLOT(sSave()));
  connect(_viewGroup,     SIGNAL(clicked()), this, SLOT(sViewGroup()));

  XSqlQuery xtmfg;
  xtmfg.exec("SELECT pkghead_name FROM pkghead WHERE pkghead_name='xtmfg'");
  if (xtmfg.first())
  {
    _shift->setEnabled(true);
    _shift->setVisible(true);
    shiftLit->setVisible(true);
  } else {
    _shift->setEnabled(false);
    _shift->setVisible(false);
    shiftLit->setVisible(false);
  }

  _charass->addColumn(tr("Characteristic"), _itemColumn, Qt::AlignLeft, true, "char_name");
  _charass->addColumn(tr("Value"),          -1,          Qt::AlignLeft, true, "charass_value");

  _groups->addColumn(tr("Name"), _itemColumn, Qt::AlignLeft, true, "empgrp_name");
  _groups->addColumn(tr("Description"),   -1, Qt::AlignLeft, true, "empgrp_descrip");

  _wagetype->setAllowNull(false);
  _wagetype->append(0, tr("Hourly"),      "H");
  _wagetype->append(1, tr("Salaried"),    "S");

  _per->setAllowNull(false);
  _per->append(0, tr("Hour"),      "H");
  _per->append(1, tr("Day"),       "D");
  _per->append(2, tr("Week"),      "W");
  _per->append(3, tr("Bi-Weekly"), "BW");
  _per->append(4, tr("Month"),     "M");
  _per->append(5, tr("Year"),      "Y");

  _per->setAllowNull(false);
  _perExt->append(0, tr("Hour"),      "H");
  _perExt->append(1, tr("Day"),       "D");
  _perExt->append(2, tr("Week"),      "W");
  _perExt->append(3, tr("Bi-Weekly"), "BW");
  _perExt->append(4, tr("Month"),     "M");
  _perExt->append(4, tr("Year"),      "Y");

  _comments->setId(-1);
  _comments->setReadOnly(true);

  _crmacctid  = -1;
  _empid      = -1;
  _NumberGen  = -1;
  _mode     = cView;
  _origmode = cView;
}