本文整理汇总了Java中com.openbravo.pos.ticket.TicketInfo类的典型用法代码示例。如果您正苦于以下问题:Java TicketInfo类的具体用法?Java TicketInfo怎么用?Java TicketInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TicketInfo类属于com.openbravo.pos.ticket包,在下文中一共展示了TicketInfo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: initTicket
import com.openbravo.pos.ticket.TicketInfo; //导入依赖的package包/类
public void initTicket(String id) {
Connection con = null;
PreparedStatement ps = null;
ResultSet rs = null;
String sqlStr = "INSERT INTO SHAREDTICKETS (ID, NAME,CONTENT) VALUES (?, ?, ?)";
TicketInfo ticket = new TicketInfo();
try {
//get connection
con = getConnection();
//prepare statement
ps = con.prepareStatement(sqlStr);
ps.setString(1, id);
ps.setString(2, ticket.getName());
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream(bytes);
out.writeObject(ticket);
ps.setBytes(3, bytes.toByteArray());
//execute
ps.executeUpdate();
} catch (Exception ex) {
Logger.getLogger(TicketDAO.class.getName()).log(Level.SEVERE, null, ex);
}
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:25,代码来源:TicketDAO.java
示例2: updateTicket
import com.openbravo.pos.ticket.TicketInfo; //导入依赖的package包/类
public void updateTicket(String ticketId, TicketInfo ticket) {
Connection con = null;
PreparedStatement ps = null;
ResultSet rs = null;
String sqlStr = "UPDATE SHAREDTICKETS SET CONTENT = ? WHERE ID = ?";
try {
//get connection
con = getConnection();
//prepare statement
ps = con.prepareStatement(sqlStr);
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream(bytes);
out.writeObject(ticket);
ps.setBytes(1, bytes.toByteArray());
ps.setString(2, ticketId);
//execute
ps.executeUpdate();
} catch (Exception ex) {
Logger.getLogger(TicketDAO.class.getName()).log(Level.SEVERE, null, ex);
}
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:22,代码来源:TicketDAO.java
示例3: insertTicket
import com.openbravo.pos.ticket.TicketInfo; //导入依赖的package包/类
public void insertTicket(TicketInfo ticket) {
Connection con = null;
PreparedStatement ps = null;
String sqlStr = "INSERT INTO SHAREDTICKETS (ID, NAME, CONTENT) VALUES (?, ?, ?)";
try {
//get connection
con = getConnection();
//prepare statement
ps = con.prepareStatement(sqlStr);
ps.setString(1, ticket.getM_sId());
ps.setString(2, ticket.getName());
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream(bytes);
out.writeObject(ticket);
ps.setBytes(3, bytes.toByteArray());
//execute
ps.executeUpdate();
} catch (Exception ex) {
Logger.getLogger(TicketDAO.class.getName()).log(Level.SEVERE, null, ex);
}
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:25,代码来源:TicketDAO.java
示例4: m_jRefundActionPerformed
import com.openbravo.pos.ticket.TicketInfo; //导入依赖的package包/类
private void m_jRefundActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jRefundActionPerformed
java.util.List aRefundLines = new ArrayList();
for(int i = 0; i < m_ticket.getLinesCount(); i++) {
TicketLineInfo newline = new TicketLineInfo(m_ticket.getLine(i));
aRefundLines.add(newline);
}
m_ticketCopy = null;
m_TicketsBagTicketBag.showRefund();
m_panelticketedit.showRefundLines(aRefundLines);
TicketInfo refundticket = new TicketInfo();
refundticket.setTicketType(TicketInfo.RECEIPT_REFUND);
refundticket.setCustomer(m_ticket.getCustomer());
refundticket.setPayments(m_ticket.getPayments());
m_panelticketedit.setActiveTicket(refundticket, null);
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:21,代码来源:JTicketsBagTicket.java
示例5: setTicket
import com.openbravo.pos.ticket.TicketInfo; //导入依赖的package包/类
public void setTicket(TicketInfo ticket, Object ticketext) {
this.ticket = ticket;
this.ticketext = ticketext;
// The ticket name
m_jTicketId.setText(ticket.getName(ticketext));
ticketlines.clearTicketLines();
for (int i = 0; i < ticket.getLinesCount(); i++) {
ticketlines.addTicketLine(ticket.getLine(i));
}
if (ticket.getLinesCount() > 0) {
ticketlines.setSelectedIndex(0);
}
printTotals();
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:21,代码来源:SimpleReceipt.java
示例6: setActiveTicket
import com.openbravo.pos.ticket.TicketInfo; //导入依赖的package包/类
public void setActiveTicket(TicketInfo oTicket, Object oTicketExt) {
m_oTicket = oTicket;
m_oTicketExt = oTicketExt;
if (m_oTicket != null) {
// Asign preeliminary properties to the receipt
m_oTicket.setUser(m_App.getAppUserView().getUser().getUserInfo());
m_oTicket.setActiveCash(m_App.getActiveCashIndex());
m_oTicket.setDate(new Date()); // Set the edition date.
}
executeEvent(m_oTicket, m_oTicketExt, "ticket.show");
refreshTicket();
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:17,代码来源:JPanelTicket.java
示例7: btnSplitActionPerformed
import com.openbravo.pos.ticket.TicketInfo; //导入依赖的package包/类
private void btnSplitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSplitActionPerformed
if (m_oTicket.getLinesCount() > 0) {
ReceiptSplit splitdialog = ReceiptSplit.getDialog(this, dlSystem.getResourceAsXML("Ticket.Line"), dlSales, dlCustomers, taxeslogic);
TicketInfo ticket1 = m_oTicket.copyTicket();
TicketInfo ticket2 = new TicketInfo();
ticket2.setCustomer(m_oTicket.getCustomer());
if (splitdialog.showDialog(ticket1, ticket2, m_oTicketExt)) {
if (closeTicket(ticket2, m_oTicketExt)) { // already checked that number of lines > 0
setActiveTicket(ticket1, m_oTicketExt);// set result ticket
}
}
}
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:18,代码来源:JPanelTicket.java
示例8: m_jRefundActionPerformed
import com.openbravo.pos.ticket.TicketInfo; //导入依赖的package包/类
private void m_jRefundActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jRefundActionPerformed
java.util.List aRefundLines = new ArrayList();
for(int i = 0; i < m_ticket.getLinesCount(); i++) {
TicketLineInfo newline = new TicketLineInfo(m_ticket.getLine(i));
aRefundLines.add(newline);
}
m_ticketCopy = null;
m_TicketsBagTicketBag.showRefund();
m_panelticketedit.showRefundLines(aRefundLines);
TicketInfo refundticket = new TicketInfo();
refundticket.setTicketType(TicketInfo.RECEIPT_REFUND);
refundticket.setCustomer(m_ticket.getCustomer());
refundticket.setPayments(m_ticket.getPayments());
// Indicate that this a ticket in edit mode
refundticket.setOldTicket(true);
m_panelticketedit.setActiveTicket(refundticket, null);
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:22,代码来源:JTicketsBagTicket.java
示例9: setTicket
import com.openbravo.pos.ticket.TicketInfo; //导入依赖的package包/类
/**
*
* @param ticket
* @param ticketext
*/
public void setTicket(TicketInfo ticket, Object ticketext) {
this.ticket = ticket;
this.ticketext = ticketext;
// The ticket name
m_jTicketId.setText(ticket.getName(ticketext));
ticketlines.clearTicketLines();
for (int i = 0; i < ticket.getLinesCount(); i++) {
ticketlines.addTicketLine(ticket.getLine(i));
}
if (ticket.getLinesCount() > 0) {
ticketlines.setSelectedIndex(0);
}
printTotals();
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:26,代码来源:SimpleReceipt.java
示例10: saveCurrentTicket
import com.openbravo.pos.ticket.TicketInfo; //导入依赖的package包/类
private void saveCurrentTicket() {
// Thanks Ibastavd & sunnytang 2012/2013 - Mod JG 23 Jul 13
// save current ticket, if exists,
if (m_sCurrentTicket != null) {
try {
dlReceipts.insertSharedTicket(m_sCurrentTicket, m_panelticket.getActiveTicket(),m_panelticket.getActiveTicket().getPickupId());
m_jListTickets.setText("*");
TicketInfo l = dlReceipts.getSharedTicket(m_sCurrentTicket);
if(l.getLinesCount() == 0) {
// throw new BasicException(AppLocal.getIntString("message.nullticket"));
// }else{
dlReceipts.deleteSharedTicket(m_sCurrentTicket);
}
} catch (BasicException e) {
new MessageInf(e).show(this);
}
}
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:19,代码来源:JTicketsBagShared.java
示例11: setActiveTicket
import com.openbravo.pos.ticket.TicketInfo; //导入依赖的package包/类
private void setActiveTicket(String id) throws BasicException{
// BEGIN TRANSACTION
TicketInfo ticket = dlReceipts.getSharedTicket(id);
if (ticket == null) {
m_jListTickets.setText("");
// Does it exist
throw new BasicException(AppLocal.getIntString("message.noticket"));
} else {
dlReceipts.getPickupId(id);
Integer pickUp = dlReceipts.getPickupId(id);
dlReceipts.deleteSharedTicket(id);
m_sCurrentTicket = id;
m_panelticket.setActiveTicket(ticket, null);
ticket.setPickupId(pickUp);
}
// END TRANSACTION
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:20,代码来源:JTicketsBagShared.java
示例12: btnSplitActionPerformed
import com.openbravo.pos.ticket.TicketInfo; //导入依赖的package包/类
private void btnSplitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSplitActionPerformed
if (m_oTicket.getLinesCount() > 0) {
ReceiptSplit splitdialog = ReceiptSplit.getDialog(this, dlSystem.getResourceAsXML("Ticket.Line"), dlSales, dlCustomers, taxeslogic);
TicketInfo ticket1 = m_oTicket.copyTicket();
TicketInfo ticket2 = new TicketInfo();
ticket2.setCustomer(m_oTicket.getCustomer());
if (splitdialog.showDialog(ticket1, ticket2, m_oTicketExt)) {
if (closeTicket(ticket2, m_oTicketExt)) { // already checked that number of lines > 0
setActiveTicket(ticket1, m_oTicketExt);// set result ticket
// maybe look at returning to table set up after splitting the bill
}
}
}
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:21,代码来源:JPanelTicket.java
示例13: updateSharedTicket
import com.openbravo.pos.ticket.TicketInfo; //导入依赖的package包/类
/**
*
* @param id
* @param ticket
* @param pickupid
* @throws BasicException
*/
public final void updateSharedTicket(final String id, final TicketInfo ticket, int pickupid) throws BasicException {
Object[] values = new Object[] {
id,
ticket.getName(),
ticket,
pickupid
};
Datas[] datas = new Datas[] {
Datas.STRING,
Datas.STRING,
Datas.SERIALIZABLE,
Datas.INT
};
new PreparedSentence(s
, "UPDATE SHAREDTICKETS SET "
+ "NAME = ?, "
+ "CONTENT = ?, "
+ "PICKUPID = ? "
+ "WHERE ID = ?"
, new SerializerWriteBasicExt(datas, new int[] {1, 2, 3, 0})).exec(values);
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:30,代码来源:DataLogicReceipts.java
示例14: insertSharedTicket
import com.openbravo.pos.ticket.TicketInfo; //导入依赖的package包/类
/**
*
* @param id
* @param ticket
* @param pickupid
* @throws BasicException
*/
public final void insertSharedTicket(final String id, final TicketInfo ticket, int pickupid) throws BasicException {
Object[] values = new Object[] {
id,
ticket.getName(),
ticket, pickupid,
ticket.getUser()
};
Datas[] datas;
datas = new Datas[] {
Datas.STRING,
Datas.STRING,
Datas.SERIALIZABLE,
Datas.INT
};
new PreparedSentence(s
, "INSERT INTO SHAREDTICKETS ("
+ "ID, "
+ "NAME, "
+ "CONTENT, "
+ "PICKUPID) "
+ "VALUES (?, ?, ?, ?)"
, new SerializerWriteBasicExt(datas, new int[] {0, 1, 2, 3})).exec(values);
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:32,代码来源:DataLogicReceipts.java
示例15: setActiveTicket
import com.openbravo.pos.ticket.TicketInfo; //导入依赖的package包/类
private void setActiveTicket(String id) throws BasicException {
currentTicket = panelticket.getActiveTicket().getId();
// save current ticket
// if (currentTicket != null) {
// try {
// dataLogicReceipts.insertSharedTicket(currentTicket, panelticket.getActiveTicket());
// } catch (BasicException e) {
// new MessageInf(e).show(this);
// }
// }
// set ticket
// BEGIN TRANSACTION
TicketInfo ticket = dataLogicReceipts.getSharedTicket(id);
if (ticket == null) {
// Does not exists ???
throw new BasicException(AppLocal.getIntString("message.noticket"));
} else {
dataLogicReceipts.deleteSharedTicket(id);
currentTicket = id;
panelticket.setActiveTicket(ticket, null);
fireTicketSelectionChanged(ticket.getId());
}
// END TRANSACTION
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:27,代码来源:OrderCustomerList.java
示例16: saveCurrentTicket
import com.openbravo.pos.ticket.TicketInfo; //导入依赖的package包/类
private void saveCurrentTicket() {
// Thanks Ibastavd & sunnytang 2012/2013 - Mod JG 23 Jul 13
// save current ticket, if exists,
if (m_sCurrentTicket != null) {
try {
dlReceipts.insertSharedTicket(m_sCurrentTicket, m_panelticket.getActiveTicket(),m_panelticket.getActiveTicket().getPickupId());
TicketInfo l = dlReceipts.getSharedTicket(m_sCurrentTicket);
if(l.getLinesCount() == 0) {
// throw new BasicException(AppLocal.getIntString("message.nullticket"));
// }else{
dlReceipts.deleteSharedTicket(m_sCurrentTicket);
}
} catch (BasicException e) {
new MessageInf(e).show(this);
}
}
}
开发者ID:sbandur84,项目名称:micro-Blagajna,代码行数:18,代码来源:JTicketsBagShared.java
示例17: newTicket
import com.openbravo.pos.ticket.TicketInfo; //导入依赖的package包/类
private void newTicket() {
saveCurrentTicket();
TicketInfo ticket = new TicketInfo();
m_sCurrentTicket = UUID.randomUUID().toString(); // m_fmtid.format(ticket.getId());
m_panelticket.setActiveTicket(ticket, null);
// edit seba ------------ ticken name and open tickets display
int numtickets = 0;
try{numtickets= dlReceipts.getSharedTicketList().size();}
catch(BasicException e){};
setTicketSelectButtonName(
java.util.ResourceBundle.getBundle("pos_messages").getString("text.opentickets")
+": "
+Integer.toString(numtickets)
+" | "
+m_panelticket.getActiveTicket().getName()
); // edit seba ----------------------------------------------------
}
开发者ID:sbandur84,项目名称:micro-Blagajna,代码行数:24,代码来源:JTicketsBagShared.java
示例18: printTicket
import com.openbravo.pos.ticket.TicketInfo; //导入依赖的package包/类
/**
*
* @param sIn
* @param ticket
* @throws TicketPrinterException
*/
public void printTicket(String sIn, TicketInfo ticket) throws TicketPrinterException {
// cUser=ticket.getUser().getName();
cUser=ticket.getName();
ticketId=Integer.toString(ticket.getTicketId());
pickupId=Integer.toString(ticket.getPickupId());
if (ticket.getTicketId()==0){
ticketId="No Sale";
}
if (ticket.getPickupId()==0){
pickupId="No PickupId";
}
printTicket(new StringReader(sIn));
}
开发者ID:sbandur84,项目名称:micro-Blagajna,代码行数:23,代码来源:TicketParser.java
示例19: m_jRefundActionPerformed
import com.openbravo.pos.ticket.TicketInfo; //导入依赖的package包/类
private void m_jRefundActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jRefundActionPerformed
java.util.List aRefundLines = new ArrayList();
for (int i = 0; i < m_ticket.getLinesCount(); i++) {
TicketLineInfo newline = new TicketLineInfo(m_ticket.getLine(i));
aRefundLines.add(newline);
}
m_ticketCopy = null;
m_TicketsBagTicketBag.showRefund();
m_panelticketedit.showRefundLines(aRefundLines);
TicketInfo refundticket = new TicketInfo();
refundticket.setTicketType(TicketInfo.RECEIPT_REFUND);
refundticket.setCustomer(m_ticket.getCustomer());
refundticket.setPayments(m_ticket.getPayments());
m_panelticketedit.setActiveTicket(refundticket, null);
}
开发者ID:nordpos,项目名称:nordpos,代码行数:21,代码来源:JTicketsBagTicket.java
示例20: setActiveTicket
import com.openbravo.pos.ticket.TicketInfo; //导入依赖的package包/类
@Override
public void setActiveTicket(TicketInfo oTicket, Object oTicketExt) {
m_oTicket = oTicket;
m_oTicketExt = oTicketExt;
if (m_oTicket != null) {
// Asign preeliminary properties to the receipt
m_oTicket.setUser(m_App.getAppUserView().getUser().getUserInfo());
m_oTicket.setActiveCash(m_App.getActiveCashIndex());
m_oTicket.setDate(new Date()); // Set the edition date.
}
executeEvent(m_oTicket, m_oTicketExt, "ticket.show");
refreshTicket();
}
开发者ID:nordpos,项目名称:nordpos,代码行数:18,代码来源:JPanelTicket.java
注:本文中的com.openbravo.pos.ticket.TicketInfo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论