private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { if (StaticData.Config.userLptPrint == "1") { LPTPrinter lptPrinter = new LPTPrinter(); lptPrinter.printOrder(new OrderModel()); } else { PrintOrder printOrder = new PrintOrder(); printOrder.ShowDialog(); printOrder.Dispose(); } }
public static void printOrder(OrderModel order) { order = getOrderDetail(order); if (StaticData.Config.isPrint == "1") { if (StaticData.Config.userLptPrint == "1") { LPTPrinter lptPrinter = new LPTPrinter(); lptPrinter.printOrder(order); } else { PrintOrder printOrder = new PrintOrder(order); printOrder.Show(); printOrder.print(); } } }