private void btnPrint_Click(object sender, EventArgs e) { string message = null; int result = printLabelsBll.PrintLabel(this.txtCode.Text.Trim(), ref message); if (result == 0) { MessageBox.Show(@"打印失败!", @"提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } if (message != null) { MessageBox.Show(message, @"提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public int PrintLabels(string code, ref string message) { return(printLabelsBll.PrintLabel(code, ref message)); }