| | |
| | | using DevExpress.Utils.MVVM.Services; |
| | | using DevExpress.XtraGrid.Views.Grid; |
| | | using DevExpress.XtraLayout.Customization; |
| | | using Gs.DevApp.DevFrm.Rpt; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Gs.DevApp.UserControl; |
| | |
| | | } |
| | | }; |
| | | |
| | | //这是追溯码 |
| | | //这是打印,这和其它页面是不一样的,不能复制这里 |
| | | this.ucBtnPrint98.SetPlButton(false); |
| | | this.ucBtnPrint98.btnPrintClick += (s, e) => |
| | | { |
| | | _print98(); |
| | | string rowGuid = txt_aboutGuid.Text.Trim(); |
| | | if (rowGuid.Length < 36) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择你要打印的行!"); |
| | | this.ucBtnPrint98.rptParameter = "return false"; |
| | | return; |
| | | } |
| | | SelectDeleteBar frm = new SelectDeleteBar(rowGuid, "追溯码", lbGuid.Text.Trim()); |
| | | string strCodeList = ""; |
| | | frm.UpdateParent += (ss, ee) => |
| | | { |
| | | strCodeList = ee.StringSingle; |
| | | }; |
| | | frm.ShowDialog(); |
| | | if (string.IsNullOrEmpty(strCodeList)) |
| | | return; |
| | | try |
| | | { |
| | | string rptParameter = "rpt_trace{" |
| | | + "100" |
| | | + "," + "" |
| | | + "," + "" |
| | | + "," + "" |
| | | + "," + "" |
| | | + "," + strCodeList |
| | | + "}"; |
| | | using (Form rpt = new RptPreview(rowGuid, rptParameter)) |
| | | { |
| | | rpt.ShowDialog(); |
| | | } |
| | | frm.Close(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.ShowError(ex.Message); |
| | | } |
| | | }; |
| | | |
| | | } |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 这是追溯码 |
| | | /// </summary> |
| | | private void _print98() |
| | | { |
| | | string rowGuid = txt_daa001.Text.Trim(); |
| | | if (rowGuid.Length < 36) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择你要打印的行!"); |
| | | this.ucBtnPrint98.rptParameter = "return false"; |
| | | return; |
| | | } |
| | | if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_iCount_98.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请输入正确的条码数量!"); |
| | | txt_iCount_98.Focus(); |
| | | this.ucBtnPrint98.rptParameter = "return false"; |
| | | return; |
| | | } |
| | | this.ucBtnPrint98.rptParameter = "rpt_trace{" |
| | | + "" |
| | | + "," + txt_printRemark98.Text.Trim() |
| | | + "," + "" |
| | | + "," + txt_iCount_98.Text.Trim() |
| | | + "," + 1 |
| | | + "}"; |
| | | } |
| | | |
| | | } |
| | | } |