| | |
| | | xtraTabControl2.SelectedPageChanged += XtraTabControl2_SelectedPageChanged; |
| | | gvMx1.FocusedRowChanged += GvMx1_FocusedRowChanged; |
| | | btnIpt.Click += BtnIpt_Click; |
| | | |
| | | this.ucBtnPrint1.btnDesignClick += (s, e) => |
| | | { |
| | | ucBtnPrint1.rptParameter = "rpt_SCTL{}"; |
| | | }; |
| | | this.ucBtnPrint1.btnReportClick += (s, e) => |
| | | { |
| | | ucBtnPrint1.guidKey = ""; |
| | | string rowGuid = txt_aboutGuid.Text.Trim(); |
| | | ucBtnPrint1.guidKey = rowGuid; |
| | | if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_iCount_1.Text.Trim(), txt_yuliang_1.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请输入正确的条码数量!"); |
| | | txt_iCount_1.Focus(); |
| | | this.ucBtnPrint1.rptParameter = "return false"; |
| | | return; |
| | | } |
| | | if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_psnQty_1.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印条码数量!"); |
| | | txt_psnQty_1.Focus(); |
| | | this.ucBtnPrint1.rptParameter = "return false"; |
| | | return; |
| | | } |
| | | if (rowGuid.Length < 10) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印的行!"); |
| | | this.ucBtnPrint1.rptParameter = "return false"; |
| | | return; |
| | | } |
| | | this.ucBtnPrint1.rptParameter = "rpt_SCTL{" + rowGuid.Trim() |
| | | + "," + "" |
| | | + "," + Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(txt_yuliang_1.Text.Trim()) |
| | | + "," + txt_iCount_1.Text.Trim() |
| | | + "," + txt_psnQty_1.Text.Trim() |
| | | + "}"; |
| | | }; |
| | | |
| | | //自动计算打印量 |
| | | txt_psnQty_1.TextChanged += (s, e) => |
| | | { |
| | | 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, txt_yuliang_1); |
| | | }; |
| | | } |
| | | |
| | | |
| | |
| | | gvList.Add(gvMx1); |
| | | UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit, gvList); |
| | | setEable(isEdit); |
| | | txtQuantity.Text = dy["fbatchQty"].ToString(); |
| | | txt_kQty.Text = dy["kdy"].ToString(); |
| | | txtYdy.Text = dy["ydy"].ToString(); |
| | | txt_psnQty_1.Text = dy["fbatchQty"].ToString(); |
| | | JObject _job = JObject.Parse(strJson); |
| | | JArray array = new JArray(); |
| | | foreach (var a in _job["rtnData"]["list5"]) |
| | |
| | | gvMx1.FocusedRowHandle = rowHandle + 1; |
| | | } |
| | | // MessageBox.Show(rowHandle.ToString() + "**" + guid5); |
| | | } |
| | | else |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1); |
| | | } |
| | | |
| | | |
| | | JArray array8 = new JArray(); |
| | | foreach (var a in _job["rtnData"]["barCodeList"]) |
| | | { |
| | | array8.Add(a); |
| | | } |
| | | DataTable dt8 = JsonConvert.DeserializeObject<DataTable>(array8.ToString()); |
| | | if (dt8.Rows.Count > 0) |
| | | { |
| | | gcMx8.DataSource = null; |
| | | gcMx8.BindingContext = new BindingContext(); |
| | | gcMx8.DataSource = dt8; |
| | | gcMx8.ForceInitialize(); |
| | | gvMx8.BestFitColumns(); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx8); |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 移出条码 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void repDelCard_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("", |
| | | "VArrivalBarcodeManager/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); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |