本文整理汇总了Java中com.openbravo.data.gui.MessageInf.SGN_WARNING属性的典型用法代码示例。如果您正苦于以下问题:Java MessageInf.SGN_WARNING属性的具体用法?Java MessageInf.SGN_WARNING怎么用?Java MessageInf.SGN_WARNING使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.openbravo.data.gui.MessageInf
的用法示例。
在下文中一共展示了MessageInf.SGN_WARNING属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: btnCustomerActionPerformed
private void btnCustomerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCustomerActionPerformed
JCustomerFinder finder = JCustomerFinder.getCustomerFinder(this, dlCustomers);
finder.search(ticket.getCustomer());
finder.setVisible(true);
try {
ticket.setCustomer(finder.getSelectedCustomer() == null
? null
: dlSales.loadCustomerExt(finder.getSelectedCustomer().getId()));
} catch (BasicException e) {
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotfindcustomer"), e);
msg.show(this);
}
// The ticket name
m_jTicketId.setText(ticket.getName(ticketext));
refreshTicketTaxes();
// refresh the receipt....
setTicket(ticket, ticketext);
}
示例2: btnCustomerActionPerformed
private void btnCustomerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCustomerActionPerformed
JCustomerFinder finder = JCustomerFinder.getCustomerFinder(this, dlCustomers);
finder.search(m_oTicket.getCustomer());
finder.setVisible(true);
try {
m_oTicket.setCustomer(finder.getSelectedCustomer() == null
? null
: dlSales.loadCustomerExt(finder.getSelectedCustomer().getId()));
} catch (BasicException e) {
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotfindcustomer"), e);
msg.show(this);
}
refreshTicket();
}
示例3: jEditAttributesActionPerformed
private void jEditAttributesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jEditAttributesActionPerformed
int i = m_ticketlines.getSelectedIndex();
if (i < 0) {
Toolkit.getDefaultToolkit().beep(); // no line selected
} else {
try {
TicketLineInfo line = m_oTicket.getLine(i);
JProductAttEdit attedit = JProductAttEdit.getAttributesEditor(this, m_App.getSession());
attedit.editAttributes(line.getProductAttSetId(), line.getProductAttSetInstId());
attedit.setVisible(true);
if (attedit.isOK()) {
// The user pressed OK
line.setProductAttSetInstId(attedit.getAttributeSetInst());
line.setProductAttSetInstDesc(attedit.getAttributeSetInstDescription());
paintTicketLine(i, line);
}
} catch (BasicException ex) {
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotfindattributes"), ex);
msg.show(this);
}
}
}
示例4: actionPerformed
public void actionPerformed(ActionEvent evt) {
// String sPassword = m_actionuser.getPassword();
if (m_actionuser.authenticate()) {
// p'adentro directo, no tiene password
openAppView(m_actionuser);
} else {
// comprobemos la clave antes de entrar...
String sPassword = JPasswordDialog.showEditPassword(JRootApp.this,
AppLocal.getIntString("Label.Password"),
m_actionuser.getName(),
m_actionuser.getIcon());
if (sPassword != null) {
if (m_actionuser.authenticate(sPassword)) {
openAppView(m_actionuser);
} else {
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.BadPassword"));
msg.show(JRootApp.this);
}
}
}
}
示例5: processKey
private void processKey(char c) {
if (c == '\n') {
AppUser user = null;
try {
user = m_dlSystem.findPeopleByCard(inputtext.toString());
} catch (BasicException e) {
e.printStackTrace();
}
if (user == null) {
// user not found
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.nocard"));
msg.show(this);
} else {
openAppView(user);
}
inputtext = new StringBuffer();
} else {
inputtext.append(c);
}
}
示例6: btnCheckOutActionPerformed
private void btnCheckOutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCheckOutActionPerformed
try {
boolean isOnBreak = dlpresencemanagement.IsOnBreak(app.getAppUserView().getUser().getId());
if (isOnBreak) {
dlpresencemanagement.EndBreak(app.getAppUserView().getUser().getId());
message.setText(app.getAppUserView().getUser().getName()+" "+AppLocal.getIntString("message.breakoverandcheckedout")+" "+Formats.TIMESTAMP.formatValue(new Date()));
} else {
message.setText(app.getAppUserView().getUser().getName()+" "+AppLocal.getIntString("message.checkedout")+" "+Formats.TIMESTAMP.formatValue(new Date()));
}
dlpresencemanagement.CheckOut(app.getAppUserView().getUser().getId());
} catch (BasicException ex) {
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotcheckout"));
msg.show(this);
}
CheckOutAction();
}
示例7: jEditAttributesActionPerformed
private void jEditAttributesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jEditAttributesActionPerformed
int i = m_invlines.getSelectedRow();
if (i < 0) {
Toolkit.getDefaultToolkit().beep(); // no line selected
} else {
try {
InventoryLine line = m_invlines.getLine(i);
JProductAttEdit attedit = JProductAttEdit.getAttributesEditor(this, m_App.getSession());
attedit.editAttributes(line.getProductAttSetId(), line.getProductAttSetInstId());
attedit.setVisible(true);
if (attedit.isOK()) {
// The user pressed OK
line.setProductAttSetInstId(attedit.getAttributeSetInst());
line.setProductAttSetInstDesc(attedit.getAttributeSetInstDescription());
m_invlines.setLine(i, line);
}
} catch (BasicException ex) {
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotfindattributes"), ex);
msg.show(this);
}
}
}
示例8: btnCheckInActionPerformed
private void btnCheckInActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCheckInActionPerformed
try {
boolean isOnBreak = dlpresencemanagement.IsOnBreak(app.getAppUserView().getUser().getId());
if (isOnBreak) {
dlpresencemanagement.EndBreak(app.getAppUserView().getUser().getId());
message.setText(app.getAppUserView().getUser().getName()+AppLocal.getIntString("message.breakoverandcheckedin")+" "+Formats.TIMESTAMP.formatValue(new Date()));
} else {
dlpresencemanagement.CheckIn(app.getAppUserView().getUser().getId());
message.setText(app.getAppUserView().getUser().getName()+" "+AppLocal.getIntString("message.checkedin")+" "+Formats.TIMESTAMP.formatValue(new Date()));
}
} catch (BasicException ex) {
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotcheckin"));
msg.show(this);
}
CheckInAction();
}
示例9: btnEmployeeActionPerformed
private void btnEmployeeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEmployeeActionPerformed
JEmployeeFinder finder = JEmployeeFinder.getEmployeeFinder(this, dlPresenceManagement);
finder.search(null);
finder.setVisible(true);
try {
m_jEmployeeName.setText(finder.getSelectedEmployee() == null
? null
: dlPresenceManagement.loadEmployeeExt(finder.getSelectedEmployee().getId()).toString());
m_employeeid = finder.getSelectedEmployee() == null
? null
:finder.getSelectedEmployee().getId();
} catch (BasicException e) {
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotfindemployee"), e);
msg.show(this);
}
}
示例10: btnEndDateActionPerformed
private void btnEndDateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEndDateActionPerformed
Date date;
try {
date = (Date) Formats.TIMESTAMP.parseValue(m_jEndDate.getText());
} catch (BasicException e) {
date = null;
}
date = JCalendarDialog.showCalendarTimeHours(this, date);
if (date != null) {
if (IsValidEndDate(date)) {
m_jEndDate.setText(Formats.TIMESTAMP.formatValue(date));
} else {
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.invalidenddate"));
msg.show(this);
}
}
}
示例11: processKey
private void processKey(char c) {
if ((c == '\n') || (c =='?')) {
AppUser user = null;
try {
user = m_dlSystem.findPeopleByCard(inputtext.toString());
} catch (BasicException e) {
}
if (user == null) {
// user not found
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.nocard"));
msg.show(this);
} else {
openAppView(user);
}
inputtext = new StringBuilder();
} else {
inputtext.append(c);
}
}
示例12: btnStartDateActionPerformed
private void btnStartDateActionPerformed(java.awt.event.ActionEvent evt) {
Date date;
try {
date = (Date) Formats.TIMESTAMP.parseValue(m_jStartDate.getText());
} catch (BasicException e) {
date = null;
}
date = JCalendarDialog.showCalendarTimeHours(this, date);
if (date != null) {
if (IsValidStartDate(date)) {
m_jStartDate.setText(Formats.TIMESTAMP.formatValue(date));
} else {
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.invalidstartdate"));
msg.show(this);
}
}
}
示例13: btnDownloadProductsActionPerformed
private void btnDownloadProductsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDownloadProductsActionPerformed
// Ejecutamos la descarga...
DeviceScanner s = m_App.getDeviceScanner();
try {
s.connectDevice();
s.startDownloadProduct();
ProductDownloaded p = s.recieveProduct();
while (p != null) {
incProductByCode(p.getCode(), p.getQuantity());
p = s.recieveProduct();
}
// MessageInf msg = new MessageInf(MessageInf.SGN_SUCCESS, "Se ha subido con exito la lista de productos al ScanPal.");
// msg.show(this);
} catch (DeviceScannerException e) {
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.scannerfail2"), e);
msg.show(this);
} finally {
s.disconnectDevice();
}
}
示例14: actionPerformed
@Override
public void actionPerformed(ActionEvent evt) {
// String sPassword = m_actionuser.getPassword();
if (m_actionuser.authenticate()) {
// p'adentro directo, no tiene password
openAppView(m_actionuser);
} else {
// comprobemos la clave antes de entrar...
String sPassword = JPasswordDialog.showEditPassword(JRootApp.this,
AppLocal.getIntString("Label.Password"),
m_actionuser.getName(),
m_actionuser.getIcon());
if (sPassword != null) {
if (m_actionuser.authenticate(sPassword)) {
openAppView(m_actionuser);
} else {
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.BadPassword"));
msg.show(JRootApp.this);
}
}
}
}
示例15: evalScript
private Object evalScript(ScriptObject scr, String resource, ScriptArg... args) {
// resource here is guaratied to be not null
try {
scr.setSelectedIndex(m_ticketlines.getSelectedIndex());
return scr.evalScript(dlSystem.getResourceAsXML(resource), args);
} catch (ScriptException e) {
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotexecute"), e);
msg.show(this);
return msg;
}
}