| | |
| | | this.toolBarMenu1.getXmlConfig(); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, this, "", "", (value) => |
| | | { |
| | | |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); |
| | | }); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) => |
| | | { |
| | | getModel(value); |
| | | }, (value) => |
| | | { |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | }); |
| | | },lbGuid); |
| | | getPageList(1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | |
| | | |
| | | //这是仓库标识卡,仅仅打印 |
| | | this.ucBtnPrint101.SetPlButton(false); |
| | | this.ucBtnPrint101.btnPrintClick += (s, e) => |
| | | { |
| | | _print101(); |
| | | }; |
| | | } |
| | | private async void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | |
| | | gcMain1.DataSource = dt; |
| | | gcMain1.ForceInitialize(); |
| | | gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1); |
| | | |
| | | } |
| | | else |
| | | UtilityHelper.SetDefaultTable(gcMain1, gridView1); |
| | |
| | | ToolBox.MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | private void getModel(string strGuid) |
| | | { |
| | | bool isEdit = false; |
| | | if (toolBarMenu1.currentAction == "add") return; |
| | | if (toolBarMenu1.currentAction == "edit") isEdit = true; |
| | | if (string.IsNullOrEmpty(strGuid)) |
| | | { |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | var _obj = new |
| | | { |
| | | guid = strGuid //主建 |
| | | }; |
| | | try |
| | | { |
| | | var strJson = UtilityHelper.HttpPost("", |
| | | _webServiceName + "GetModel", |
| | | JsonConvert.SerializeObject(_obj)); |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | var dy = _rtn.rtnData; |
| | | lbGuid.Text = strGuid; |
| | | UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit); |
| | | } |
| | | else |
| | | { |
| | | MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 这是仓库 |
| | | /// </summary> |
| | | private void _print101() |
| | | { |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, |
| | | lbGuid, txt_itemBarcode, gridView1); |
| | | ucBtnPrint101.guidKey = rowGuid; |
| | | if (rowGuid.Length < 36) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择你要打印的行!"); |
| | | this.ucBtnPrint101.rptParameter = "return false"; |
| | | return; |
| | | } |
| | | this.ucBtnPrint101.rptParameter = "rpt_cktm{" |
| | | + "" |
| | | + "," + "" |
| | | + "," + "" |
| | | + "," + "" |
| | | + "," + "" |
| | | + "}"; |
| | | } |
| | | } |
| | | } |