| | |
| | | using Gs.DevApp.DevFrm.Rpt; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Gs.DevApp.UserControl; |
| | |
| | | }, lbGuid); |
| | | getPageList(1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | this.ucBtnPrint1.btnDesignClick += (s, e) => |
| | | { |
| | | ucBtnPrint1.rptParameter = "rpt_Arrival{}"; |
| | | }; |
| | | this.ucBtnPrint1.btnReportClick += (s, e) => |
| | | this.ucBtnPrint1.btnPrintClick += (s, e) => |
| | | { |
| | | string rowGuid = lbMxGuid.Text.Trim(); |
| | | ucBtnPrint1.guidKey = rowGuid; |
| | | if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim())) |
| | | if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_iCount_1.Text.Trim(), txt_yuliang_1.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印条码张数!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请输入正确的条码数量!"); |
| | | txt_iCount_1.Focus(); |
| | | this.ucBtnPrint1.rptParameter = "return false"; |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim())) |
| | | if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_psnQty_1.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印条码数量!"); |
| | | txt_psnQty_1.Focus(); |
| | |
| | | } |
| | | this.ucBtnPrint1.rptParameter = "rpt_Arrival{" + lbMxGuid.Text.Trim() |
| | | + "," + "" |
| | | + "," + Gs.DevApp.ToolBox.UtilityHelper.PrintYuLiang(radOut).ToString() |
| | | + "," + Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(txt_yuliang_1.Text.Trim()) |
| | | + "," + txt_iCount_1.Text.Trim() |
| | | + "," + txt_psnQty_1.Text.Trim() |
| | | + "}"; |
| | | txt_iCount_1.Text = ""; |
| | | txt_psnQty_1.Text = ""; |
| | | }; |
| | | this.ucBtnPrint1.btnAllClick += (s, e) => |
| | | { |
| | | string rowGuid = lbMxGuid.Text.Trim(); |
| | | SelectDeleteBar frm = new SelectDeleteBar(rowGuid, "采购入库"); |
| | | string strCodeList = ""; |
| | | frm.UpdateParent += (ss, ee) => |
| | | { |
| | | strCodeList = ee.StringSingle; |
| | | }; |
| | | frm.ShowDialog(); |
| | | if (string.IsNullOrEmpty(strCodeList)) |
| | | return; |
| | | try |
| | | { |
| | | string rptParameter = "rpt_Arrival{" |
| | | + "100" |
| | | + "," + "" |
| | | + "," + "" |
| | | + "," + "" |
| | | + "," + "" |
| | | + "," + strCodeList |
| | | + "}"; |
| | | using (Form rpt = new RptPreview(rowGuid, rptParameter)) |
| | | { |
| | | rpt.ShowDialog(); |
| | | } |
| | | frm.Close(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.ShowError(ex.Message); |
| | | } |
| | | }; |
| | | gvMx1.FocusedRowChanged += GvMx1_FocusedRowChanged; |
| | | //自动计算打印量 |
| | | txt_psnQty_1.TextChanged += (s, e) => |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.PrintJiSuan(txt_psnQty_1, txt_iCount_1, txt_kQty.Text.Trim(), radOut); |
| | | Gs.DevApp.ToolBox.UtilityHelper.PrintJiSuan(txt_psnQty_1, txt_iCount_1, txt_kQty.Text.Trim(), radOut, txt_yuliang_1); |
| | | }; |
| | | radOut.SelectedIndexChanged += (s, e) => |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.PrintAuto(txt_psnQty_1, txt_iCount_1, radOut); |
| | | Gs.DevApp.ToolBox.UtilityHelper.PrintAuto(txt_psnQty_1, txt_iCount_1, radOut, txt_yuliang_1); |
| | | }; |
| | | } |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | |
| | | txtQuantity.Text = row["quantity"].ToString();//本次收货总量 |
| | | txt_yQty.Text = row["yQty"].ToString();//已打印总量 |
| | | txt_kQty.Text = row["kQty"].ToString(); //可打印总量 |
| | | txt_psnQty_1.Text = row["mrtmsl"].ToString(); //默认每张条码数量 |
| | | } |
| | | else |
| | | { |
| | |
| | | /// <param name="pageSize">每页几条</param> |
| | | private void getPageList(int curPage) |
| | | { |
| | | var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | gcMain1.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", |
| | | "asc", "", _sbSqlWhere.ToString()); |
| | | var json = JsonConvert.SerializeObject(pgq); |
| | |
| | | } |
| | | } |
| | | |
| | | private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) |
| | | { |
| | | var rowhandle = gvMx2.FocusedRowHandle; |
| | | if (rowhandle < 0) |
| | | return; |
| | | if (e.Button.Index == 0) |
| | | { |
| | | var dr = gvMx2.GetDataRow(rowhandle); |
| | | var mxGuid = dr["guid"].ToString(); |
| | | if (!MsgHelper.AskQuestion("你选择了1条数据,确定删除吗?")) |
| | | return; |
| | | var _obj = new |
| | | { |
| | | mxGuid = mxGuid, |
| | | inType = "dhtm" |
| | | }; |
| | | try |
| | | { |
| | | var strJson = UtilityHelper.HttpPost("", |
| | | _webServiceName + "DeleteBarcode", |
| | | JsonConvert.SerializeObject(_obj)); |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | if (_rtn.rtnCode > 0) getModel(lbGuid.Text); |
| | | } |
| | | MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |