private void EpsonParallelPrinterTest_FormClosing(object sender, FormClosingEventArgs e) { try { config.Pages = Convert.ToInt32(this.txtPrintTotalNum.Text.Trim()); config.Seconds = Convert.ToInt32(this.txtPrintThreadSeconds.Text.Trim()); config.LPT = this.txtHotPort.Text.Trim(); } catch { } RefreshCommand(); FT.Commons.Cache.StaticCacheManager.SaveConfig <ParallelPrinterConfig>(config); helper.Close(); }
private void PrintLabel(string docno) { try { lpt.Open(); string sql = "select box_label_uni" + " from pacsd_pm_box_gen " + " where doc_no ='" + docno + "' " + " and fct_code = '" + PaCSGlobal.LoginUserInfo.Fct_code + "' " + " order by box_label_uni desc"; DataTable dtResult = OracleHelper.ExecuteDataTable(sql); DataView dvTree = new DataView(dtResult); if (dtResult.Rows.Count > 0) { foreach (DataRowView dr in dvTree) { lpt.Write(SetCmdText(dr[0].ToString())); } } lpt.Close(); } catch (Exception PrintLabel) { XtraMessageBox.Show(this, "System error[PrintLabel]: " + PrintLabel.Message); } }