void customerInformation(QWidget* parent, int pCustid) { ParameterList params; params.append("cust_id", pCustid); if (_privileges->check("ViewCustomerMasters")) params.append("mode","edit"); else params.append("mode","view"); QWidget * w = parent; while(w && !w->isWindow()) w = w->parentWidget(); if(w && w->isModal()) { params.append("modal"); customer * newdlg = new customer(w, 0, Qt::Window); newdlg->set(params); omfgThis->handleNewWindow(newdlg); } else { customer * newdlg = new customer(); newdlg->set(params); omfgThis->handleNewWindow(newdlg); } }
void crmacctInformation(QWidget* parent, int pid) { ParameterList params; params.append("crmacct_id", pid); if (_privileges->check("MaintainCRMAccounts")) params.append("mode", "edit"); else if (_privileges->check("ViewCRMAccounts")) params.append("mode", "view"); else return; QWidget *w = parent; while (w && !w->isWindow()) w = w->parentWidget(); if (w && w->isModal()) { params.append("modal"); crmaccount * newdlg = new crmaccount(w); newdlg->set(params); omfgThis->handleNewWindow(newdlg); } else { crmaccount* newdlg = new crmaccount(); newdlg->set(params); omfgThis->handleNewWindow(newdlg); } }
void customerInformation(QWidget* parent, int pCustid) { ParameterList params; params.append("cust_id", pCustid); QWidget * w = parent; while(w && !w->isWindow()) w = w->parentWidget(); if(w && w->isModal()) { params.append("modal"); dspCustomerInformation * newdlg = new dspCustomerInformation(w, Qt::Window); newdlg->set(params); omfgThis->handleNewWindow(newdlg); } else { dspCustomerInformation * newdlg = new dspCustomerInformation(); newdlg->set(params); omfgThis->handleNewWindow(newdlg); } }