| | |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.PrintAuto(txt_psnQty_1, txt_iCount_1, radOut, txt_yuliang_1); |
| | | }; |
| | | //全部打印 |
| | | ucBtnPrintAll1.btnPrintClick += (s, e) => |
| | | { |
| | | this.ucBtnPrintAll1.rptType = ""; |
| | | this.ucBtnPrintAll1.mxList = null; |
| | | if (string.IsNullOrEmpty(lbGuid.Text.Trim())) |
| | | { |
| | | MsgHelper.ShowError("提示:打印前请先保存单据!"); |
| | | return; |
| | | } |
| | | getModel(lbGuid.Text.Trim()); |
| | | List<dynamic> lst = new List<dynamic>(); |
| | | DataTable dt = (DataTable)gcMx1.DataSource; |
| | | foreach (DataRow row in dt.Rows) |
| | | { |
| | | string guid = row["guid"].ToString(); |
| | | string psnQty = row["kdy"].ToString(); |
| | | if (string.IsNullOrEmpty(psnQty)) |
| | | { |
| | | continue; |
| | | } |
| | | if (psnQty == "0") |
| | | { |
| | | continue; |
| | | } |
| | | lst.Add(new |
| | | { |
| | | guid = guid, |
| | | kdy = psnQty, |
| | | }); |
| | | } |
| | | if (lst.Count <= 0) |
| | | { |
| | | MsgHelper.ShowError("提示:暂无可打印的物料!"); |
| | | return; |
| | | } |
| | | this.ucBtnPrintAll1.rptType = "rpt_SCTL"; |
| | | this.ucBtnPrintAll1.mxList = lst; |
| | | }; |
| | | #endregion |
| | | |
| | | } |