| | |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraGrid.Views.Base.ViewInfo; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Gs.DevApp.UserControl; |
| | |
| | | this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; |
| | | toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; |
| | | toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; |
| | | //toolBarMenu1.btnReportClick += ToolBarMenu1_btnReportClick; |
| | | //toolBarMenu1.btnDesignClick += ToolBarMenu1_btnDesignClick; |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "qt015", "", (value) => |
| | | { |
| | |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | gcMx1.MouseClick += GcMx1_MouseClick; |
| | | gvMx1.FocusedRowChanged += GvMx1_FocusedRowChanged; |
| | | this.ucBtnPrint1.btnDesignClick += (s, e) => |
| | | { |
| | | ucBtnPrint1.rptParameter = "rpt_Qtrk{}"; |
| | |
| | | + "}"; |
| | | }; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns); |
| | |
| | | _filterList = e.FilterList; |
| | | getPageList(1); |
| | | } |
| | | private void ToolBarMenu1_btnDesignClick(object sender, EventArgs e) |
| | | { |
| | | |
| | | } |
| | | private void ToolBarMenu1_btnReportClick(object sender, EventArgs e) |
| | | { |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 取消事件 |
| | | /// </summary> |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | private void GcMx1_MouseClick(object sender, MouseEventArgs e) |
| | | |
| | | private void GvMx1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e) |
| | | { |
| | | string rowGuid = Gs.DevApp.ToolBox.UtilityHelper.GetCurrentDoubleRow(gvMx1, e, "guid"); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | return; |
| | | lbMxGuid.Text = rowGuid; |
| | | ucBtnPrint1.guidKey = rowGuid; |
| | | var info = gvMx1.CalcHitInfo(e.Location); |
| | | var view = info.View; |
| | | var row = view.GetDataRow(info.RowHandle); |
| | | txtWlid.Text = row["itemId"].ToString(); |
| | | txtWlgg.Text = row["qd004"].ToString(); |
| | | txtWlmc.Text = row["qd003"].ToString(); |
| | | txtQuantity.Text = row["qd007"].ToString();//申请总量 |
| | | txtYdy.Text = row["YDYNUM"].ToString();//已打印总量 |
| | | kyPrtQty.Text = row["KDYNUM"].ToString();//可打印总量 |
| | | if (e.FocusedRowHandle >= 0) |
| | | { |
| | | DataRow row = gvMx1.GetDataRow(e.FocusedRowHandle); |
| | | lbMxGuid.Text = row["guid"].ToString(); |
| | | ucBtnPrint1.guidKey = row["guid"].ToString(); |
| | | txtWlid.Text = row["itemId"].ToString(); |
| | | txtWlgg.Text = row["qd004"].ToString(); |
| | | txtWlmc.Text = row["qd003"].ToString(); |
| | | txtQuantity.Text = row["qd007"].ToString();//申请总量 |
| | | txtYdy.Text = row["YDYNUM"].ToString();//已打印总量 |
| | | kyPrtQty.Text = row["KDYNUM"].ToString();//可打印总量 |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 移出条码 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void repositoryItemButtonEdit2_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); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |