| | |
| | | toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick; |
| | | toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; |
| | | toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; |
| | | |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "checkStatus", ""); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "checkStatus", "", (value) => |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); |
| | | }); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) => |
| | | { |
| | | getModel(value); |
| | | }, (value) => |
| | | { |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | }); |
| | | getPageList(1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); |
| | | |
| | | } |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns); |
| | | Task.Delay(100); |
| | | getPageList(1); |
| | | } |
| | | /// <summary> |
| | | /// 双击事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void GcMain_MouseDoubleClick(object sender, MouseEventArgs e) |
| | | { |
| | | var rowGuid = |
| | | UtilityHelper.GetCurrentDoubleRow(gridView1, |
| | | e, "guid"); |
| | | if (!string.IsNullOrEmpty(rowGuid)) |
| | | getModel(rowGuid, false, 999); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnEscClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 1); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) |
| | | { |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | getModel(lbGuid.Text.Trim(), false, 999); |
| | | getModel(lbGuid.Text.Trim()); |
| | | else |
| | | { |
| | | _filterList.Clear(); |
| | |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | getModel(rowGuid, true, 1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); |
| | | UtilityHelper.ChangeEnableByControl(panel1.Controls, true); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | lbGuid.Text = _rtn.rtnData; |
| | | toolBarMenu1.isSetBtn = true; |
| | | getModel(lbGuid.Text, false, 1); |
| | | getModel(lbGuid.Text); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | } |
| | | } |
| | | |
| | | private void getModel(string strGuid, bool isEdit, int tabIdx) |
| | | 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; |
| | | } |
| | | |
| | | UtilityHelper.JumpToTab(xtraTabControl1, tabIdx); |
| | | var _obj = new |
| | | { |
| | | guid = strGuid //主建 |
| | |
| | | JsonConvert.SerializeObject(lst)); |
| | | var _rtn = |
| | | UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) getModel(lbGuid.Text, true, 1); |
| | | if (_rtn.rtnCode > 0) getModel(lbGuid.Text); |
| | | |
| | | MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | } |
| | |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | getModel(lbGuid.Text.Trim(), false, 999); |
| | | getModel(lbGuid.Text.Trim()); |
| | | else |
| | | getPageList(1); |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | this.toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1; |
| | | this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick; |
| | | this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; |
| | | |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1); |
| | | getPageList(1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, "", "", (value) => |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); |
| | | }); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) => |
| | | { |
| | | getModel(value); |
| | | }, (value) => |
| | | { |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | }); |
| | | txt_pid.EditChanged += (s, e) => |
| | | { |
| | | txt_typeMemo.Text = this.txt_pid.GetMemo(); |
| | |
| | | await Task.Delay(100); |
| | | getPageList(1); |
| | | } |
| | | /// <summary> |
| | | /// 双击事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void GcMain_MouseDoubleClick(object sender, MouseEventArgs e) |
| | | { |
| | | string rowGuid = Gs.DevApp.ToolBox.UtilityHelper.GetCurrentDoubleRow(gridView1, e, "guid"); |
| | | if (!string.IsNullOrEmpty(rowGuid)) |
| | | getModel(rowGuid, false, 999); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 分页事件 |
| | | /// </summary> |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnEscClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 1); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1); |
| | | if (xtraTabControl1.SelectedTabPageIndex == 0) |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | else |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2); |
| | | } |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | } |
| | |
| | | private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) |
| | | { |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | getModel(lbGuid.Text.Trim(), false, 999); |
| | | getModel(lbGuid.Text.Trim()); |
| | | else |
| | | { |
| | | _filterList.Clear(); |
| | |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | getModel(rowGuid, true, 1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); |
| | | UtilityHelper.ChangeEnableByControl(panel1.Controls, true); |
| | | } |
| | | /// <summary> |
| | | /// 新增事件 |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnAddClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 1); |
| | | lbGuid.Text = ""; |
| | | UtilityHelper.CleanValueByControl(this.panel1.Controls, true); |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4); |
| | | UtilityHelper.CleanValueByControl(panel1.Controls, true); |
| | | |
| | | } |
| | | /// <summary> |
| | |
| | | /// <param name="strGuid">主键</param> |
| | | /// <param name="isEdit">是否可编辑</param> |
| | | /// <param name="tabIdx">选项卡序号</param> |
| | | private void getModel(string strGuid, bool isEdit, int tabIdx) |
| | | private void getModel(string strGuid) |
| | | { |
| | | bool isEdit = false; |
| | | if (toolBarMenu1.currentAction == "add") return; |
| | | if (toolBarMenu1.currentAction == "edit") isEdit = true; |
| | | if (string.IsNullOrEmpty(strGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | UtilityHelper.JumpToTab(xtraTabControl1, tabIdx); |
| | | var _obj = new |
| | | { |
| | | guid = strGuid,//主建 |
| | |
| | | dynamic dy = _rtn.rtnData; |
| | | lbGuid.Text = strGuid; |
| | | UtilityHelper.SetValueByObj(this.panel1.Controls, dy, isEdit); |
| | | |
| | | } |
| | | else |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | |
| | | this.toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1; |
| | | this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick; |
| | | this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; |
| | | |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, "", "", (value) => |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); |
| | | }); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) => |
| | | { |
| | | getModel(value); |
| | | }, (value) => |
| | | { |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | }); |
| | | getPageList(1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | } |
| | |
| | | await Task.Delay(100); |
| | | getPageList(1); |
| | | } |
| | | /// <summary> |
| | | /// 双击事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void GcMain_MouseDoubleClick(object sender, MouseEventArgs e) |
| | | { |
| | | string rowGuid = Gs.DevApp.ToolBox.UtilityHelper.GetCurrentDoubleRow(gridView1, e, "guid"); |
| | | if (!string.IsNullOrEmpty(rowGuid)) |
| | | getModel(rowGuid, false, 999); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 分页事件 |
| | | /// </summary> |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnEscClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 1); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1); |
| | | if (xtraTabControl1.SelectedTabPageIndex == 0) |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | else |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2); |
| | | } |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | } |
| | |
| | | private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) |
| | | { |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | getModel(lbGuid.Text.Trim(), false, 999); |
| | | getModel(lbGuid.Text.Trim()); |
| | | else |
| | | { |
| | | _filterList.Clear(); |
| | |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | getModel(rowGuid, true, 1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); |
| | | UtilityHelper.ChangeEnableByControl(panel1.Controls, true); |
| | | } |
| | | /// <summary> |
| | | /// 新增事件 |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnAddClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 1); |
| | | lbGuid.Text = ""; |
| | | UtilityHelper.CleanValueByControl(this.panel1.Controls, true); |
| | | |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4); |
| | | UtilityHelper.CleanValueByControl(panel1.Controls, true); |
| | | } |
| | | /// <summary> |
| | | /// 保存事件 |
| | |
| | | /// <param name="pageSize">每页几条</param> |
| | | private void getPageList(int curPage) |
| | | { |
| | | |
| | | var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "a.type_no", |
| | | "asc", "", _sbSqlWhere.ToString()); |
| | |
| | | /// <param name="strGuid">主键</param> |
| | | /// <param name="isEdit">是否可编辑</param> |
| | | /// <param name="tabIdx">选项卡序号</param> |
| | | private void getModel(string strGuid, bool isEdit, int tabIdx) |
| | | private void getModel(string strGuid) |
| | | { |
| | | bool isEdit = false; |
| | | if (toolBarMenu1.currentAction == "add") return; |
| | | if (toolBarMenu1.currentAction == "edit") isEdit = true; |
| | | if (string.IsNullOrEmpty(strGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | UtilityHelper.JumpToTab(xtraTabControl1, tabIdx); |
| | | var _obj = new |
| | | { |
| | | guid = strGuid,//主建 |
| | |
| | | toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; |
| | | toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; |
| | | toolBarMenu1.btnPiZhunClick += ToolBarMenu1_btnPiZhunClick; |
| | | |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "foneChecked", ""); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "foneChecked", "", (value) => |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); |
| | | }); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) => |
| | | { |
| | | getModel(value); |
| | | }, (value) => |
| | | { |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | }); |
| | | getPageList(1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2); |
| | | } |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1); |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | } |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | } |
| | |
| | | lbGuid, txt_sampleSizeNo, gridView1); |
| | | toolBarMenu1.guidKey = rowGuid; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 双击事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void GcMain_MouseDoubleClick(object sender, MouseEventArgs e) |
| | | { |
| | | string rowGuid = Gs.DevApp.ToolBox.UtilityHelper.GetCurrentDoubleRow(gridView1, e, "guid"); |
| | | if (!string.IsNullOrEmpty(rowGuid)) |
| | | getModel(rowGuid, false, 999); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 分页事件 |
| | | /// </summary> |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnEscClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 1); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1); |
| | | if (xtraTabControl1.SelectedTabPageIndex == 0) |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | else |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2); |
| | | } |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | } |
| | |
| | | private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) |
| | | { |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | getModel(lbGuid.Text.Trim(), false, 999); |
| | | getModel(lbGuid.Text.Trim()); |
| | | else |
| | | { |
| | | _filterList.Clear(); |
| | |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | getModel(rowGuid, true, 1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); |
| | | UtilityHelper.ChangeEnableByControl(panel1.Controls, true); |
| | | } |
| | | /// <summary> |
| | | /// 新增事件 |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnAddClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 1); |
| | | lbGuid.Text = ""; |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4); |
| | | List<GridView> gridViews = new List<GridView>(); |
| | | gridViews.Add(gvMx1); |
| | | gridViews.Add(gvMx2); |
| | |
| | | UtilityHelper.SetDefaultTable(gcMx2, gvMx2); |
| | | txt_createDate.Text = DateTime.Now.ToString("G"); |
| | | txt_fversion.Text = "1"; |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 保存事件 |
| | |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | private void getModel(string strGuid, bool isEdit, int tabIdx) |
| | | private void getModel(string strGuid) |
| | | { |
| | | bool isEdit = false; |
| | | if (toolBarMenu1.currentAction == "add") return; |
| | | if (toolBarMenu1.currentAction == "edit") isEdit = true; |
| | | if (string.IsNullOrEmpty(strGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | UtilityHelper.JumpToTab(xtraTabControl1, tabIdx); |
| | | var _obj = new |
| | | { |
| | | guid = strGuid,//主建 |
| | |
| | | JsonConvert.SerializeObject(lst)); |
| | | var _rtn = |
| | | UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) getModel(lbGuid.Text, true, 1); |
| | | if (_rtn.rtnCode > 0) getModel(lbGuid.Text); |
| | | |
| | | MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | } |
| | |
| | | JsonConvert.SerializeObject(lst)); |
| | | var _rtn = |
| | | UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) getModel(lbGuid.Text, true, 1); |
| | | if (_rtn.rtnCode > 0) getModel(lbGuid.Text); |
| | | |
| | | MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | } |
| | |
| | | // toolBarMenu1 |
| | | // |
| | | this.toolBarMenu1.chkParameter = "MES_SYS_LOOKUP_TYPES,check_date,check_status,check_by"; |
| | | this.toolBarMenu1.currentAction = null; |
| | | this.toolBarMenu1.Dock = System.Windows.Forms.DockStyle.Top; |
| | | this.toolBarMenu1.guidKey = null; |
| | | this.toolBarMenu1.isSetBtn = false; |
| | |
| | | // |
| | | this.gridColumn1.Caption = "审核时间"; |
| | | this.gridColumn1.FieldName = "checkDate"; |
| | | this.gridColumn1.MinWidth = 25; |
| | | this.gridColumn1.MinWidth = 250; |
| | | this.gridColumn1.Name = "gridColumn1"; |
| | | this.gridColumn1.OptionsColumn.AllowEdit = false; |
| | | this.gridColumn1.Visible = true; |
| | | this.gridColumn1.VisibleIndex = 4; |
| | | this.gridColumn1.Width = 94; |
| | | this.gridColumn1.Width = 250; |
| | | // |
| | | // xtraTabControl1 |
| | | // |
| | |
| | | this.xtraTabPage2.Controls.Add(this.tabMx); |
| | | this.xtraTabPage2.Controls.Add(this.panel1); |
| | | this.xtraTabPage2.Name = "xtraTabPage2"; |
| | | |
| | | this.xtraTabPage2.Size = new System.Drawing.Size(1126, 570); |
| | | this.xtraTabPage2.Text = "数据详细"; |
| | | // |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | using DevExpress.RichEdit.Export; |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraEditors.Controls; |
| | | using DevExpress.XtraGrid.Views.Base.ViewInfo; |
| | | using DevExpress.XtraGrid.Views.Grid; |
| | | using Gs.DevApp.DevFrm.QC.Models; |
| | | using Gs.DevApp.Entity; |
| | |
| | | toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick; |
| | | toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; |
| | | toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; |
| | | |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "checkStatus", ""); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "checkStatus", "", (value) => |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); |
| | | }); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) => |
| | | { |
| | | getModel(value); |
| | | }, (value) => |
| | | { |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | }); |
| | | getPageList(1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); |
| | | } |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | |
| | | Task.Delay(100); |
| | | getPageList(1); |
| | | } |
| | | /// <summary> |
| | | /// 双击事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void GcMain_MouseDoubleClick(object sender, MouseEventArgs e) |
| | | { |
| | | var rowGuid = |
| | | UtilityHelper.GetCurrentDoubleRow(gridView1, |
| | | e, "guid"); |
| | | if (!string.IsNullOrEmpty(rowGuid)) |
| | | getModel(rowGuid, false, 999); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 分页事件 |
| | | /// </summary> |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnEscClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 1); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) |
| | | { |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | getModel(lbGuid.Text.Trim(), false, 999); |
| | | getModel(lbGuid.Text.Trim()); |
| | | else |
| | | getPageList(1); |
| | | } |
| | |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | getModel(rowGuid, true, 1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); |
| | | UtilityHelper.ChangeEnableByControl(panel1.Controls, true); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | } |
| | | } |
| | | |
| | | private void getModel(string strGuid, bool isEdit, int tabIdx) |
| | | 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; |
| | | } |
| | | |
| | | UtilityHelper.JumpToTab(xtraTabControl1, tabIdx); |
| | | var _obj = new |
| | | { |
| | | guid = strGuid //主建 |
| | |
| | | JsonConvert.SerializeObject(lst)); |
| | | var _rtn = |
| | | UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) getModel(lbGuid.Text, true, 1); |
| | | if (_rtn.rtnCode > 0) getModel(lbGuid.Text); |
| | | |
| | | MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | } |
| | |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | getModel(lbGuid.Text.Trim(), false, 999); |
| | | getModel(lbGuid.Text.Trim()); |
| | | else |
| | | getPageList(1); |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; |
| | | toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; |
| | | toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; |
| | | toolBarMenu1.btnReportClick += ToolBarMenu1_btnReportClick; |
| | | toolBarMenu1.btnDesignClick += ToolBarMenu1_btnDesignClick; |
| | | //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; |
| | | this.ucBtnPrint1.btnDesignClick += (s, e) => |
| | | { |
| | | ucBtnPrint1.rptParameter = "rpt_Qtrk{}"; |
| | | }; |
| | | this.ucBtnPrint1.btnReportClick += (s, e) => |
| | | { |
| | | ucBtnPrint1.guidKey = ""; |
| | | string rowGuid = lbMxGuid.Text.Trim(); |
| | | ucBtnPrint1.guidKey = rowGuid; |
| | | if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印条码张数!"); |
| | | txt_iCount_1.Focus(); |
| | | this.ucBtnPrint1.rptParameter = "return false"; |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印条码数量!"); |
| | | txt_psnQty_1.Focus(); |
| | | this.ucBtnPrint1.rptParameter = "return false"; |
| | | return; |
| | | } |
| | | if (lbMxGuid.Text.Trim().Length < 10) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印的行!"); |
| | | this.ucBtnPrint1.rptParameter = "return false"; |
| | | return; |
| | | } |
| | | this.ucBtnPrint1.rptParameter = "rpt_Qtrk{" + lbMxGuid.Text.Trim() |
| | | + "," + "" |
| | | + "," + "" |
| | | + "," + txt_iCount_1.Text.Trim() |
| | | + "," + txt_psnQty_1.Text.Trim() |
| | | + "}"; |
| | | }; |
| | | } |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | |
| | | |
| | | |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns); |
| | | Task.Delay(100); |
| | | Task.Delay(100); |
| | | getPageList(1); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 分页事件 |
| | | /// </summary> |
| | |
| | | } |
| | | private void ToolBarMenu1_btnDesignClick(object sender, EventArgs e) |
| | | { |
| | | toolBarMenu1.guidKey = ""; |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, |
| | | lbGuid, txt_qtck, gridView1); |
| | | toolBarMenu1.guidKey = rowGuid; |
| | | toolBarMenu1.rptParameter = "rpt_Qtrk{}"; |
| | | |
| | | } |
| | | private void ToolBarMenu1_btnReportClick(object sender, EventArgs e) |
| | | { |
| | | toolBarMenu1.guidKey = ""; |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, |
| | | lbGuid, txt_qtck, gridView1); |
| | | toolBarMenu1.guidKey = rowGuid; |
| | | if (xtraTabControl1.SelectedTabPageIndex == 0) |
| | | { |
| | | getModel(rowGuid); |
| | | this.toolBarMenu1.rptParameter = "return false"; |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印条码张数!"); |
| | | txt_iCount_1.Focus(); |
| | | this.toolBarMenu1.rptParameter = "return false"; |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印条码数量!"); |
| | | txt_psnQty_1.Focus(); |
| | | this.toolBarMenu1.rptParameter = "return false"; |
| | | return; |
| | | } |
| | | if (lbMxGuid.Text.Trim().Length < 10) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印的行!"); |
| | | this.toolBarMenu1.rptParameter = "return false"; |
| | | return; |
| | | } |
| | | this.toolBarMenu1.rptParameter = "rpt_Qtrk{" + lbMxGuid.Text.Trim() |
| | | + "," + "" |
| | | + "," + "" |
| | | + "," + txt_iCount_1.Text.Trim() |
| | | + "," + txt_psnQty_1.Text.Trim() |
| | | + "}"; |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | /// <param name="curPage">第几页</param> |
| | | /// <param name="pageSize">每页几条</param> |
| | | private void getPageList(int curPage) |
| | | private void getPageList(int curPage) |
| | | { |
| | | |
| | | |
| | | var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "qt001", "asc", "", _sbSqlWhere.ToString()); |
| | | string json = JsonConvert.SerializeObject(pgq); |
| | |
| | | { |
| | | ToolBox.MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | |
| | | |
| | | } |
| | | private void getModel(string strGuid) |
| | | { |
| | |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnChkClick(object sender, EventArgs e) |
| | | private void ToolBarMenu1_btnChkClick(object sender, EventArgs e) |
| | | { |
| | | _toolCk(1); |
| | | } |
| | |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | /// <exception cref="NotImplementedException"></exception> |
| | | private void ToolBarMenu1_btnFChkClick(object sender, EventArgs e) |
| | | private void ToolBarMenu1_btnFChkClick(object sender, EventArgs e) |
| | | { |
| | | _toolCk(0); |
| | | } |
| | |
| | | /// 工具条事件 |
| | | /// </summary> |
| | | /// <param name="inFieldValue"></param> |
| | | private void _toolCk(int _inFieldValue) |
| | | private void _toolCk(int _inFieldValue) |
| | | { |
| | | string strMsg = ""; |
| | | switch (_inFieldValue) |
| | |
| | | } |
| | | if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定" + strMsg + "吗?")) |
| | | return; |
| | | |
| | | |
| | | var _obj = new |
| | | { |
| | | guid = rowGuid, |
| | |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | private void GcMx1_MouseClick(object sender, MouseEventArgs e) |
| | |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | return; |
| | | lbMxGuid.Text = rowGuid; |
| | | toolBarMenu1.guidKey = rowGuid; |
| | | ucBtnPrint1.guidKey = rowGuid; |
| | | var info = gvMx1.CalcHitInfo(e.Location); |
| | | var view = info.View; |
| | | var row = view.GetDataRow(info.RowHandle); |
| | |
| | | this.labelControl11 = new DevExpress.XtraEditors.LabelControl(); |
| | | this.lbGuid = new System.Windows.Forms.Label(); |
| | | this.picCheckBox = new System.Windows.Forms.PictureBox(); |
| | | this.ucBtnPrint1 = new Gs.DevApp.UserControl.UcBtnPrint(); |
| | | this.tabMxPage1.SuspendLayout(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.gcMx1)).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.gvMx1)).BeginInit(); |
| | |
| | | // |
| | | // panelMx1 |
| | | // |
| | | this.panelMx1.Controls.Add(this.ucBtnPrint1); |
| | | this.panelMx1.Controls.Add(this.lbMxGuid); |
| | | this.panelMx1.Controls.Add(this.txt_iCount_1); |
| | | this.panelMx1.Controls.Add(this.labelControl14); |
| | |
| | | // |
| | | // lbMxGuid |
| | | // |
| | | this.lbMxGuid.Location = new System.Drawing.Point(552, 75); |
| | | this.lbMxGuid.Location = new System.Drawing.Point(821, 14); |
| | | this.lbMxGuid.Name = "lbMxGuid"; |
| | | this.lbMxGuid.Size = new System.Drawing.Size(58, 18); |
| | | this.lbMxGuid.TabIndex = 229; |
| | |
| | | this.picCheckBox.TabStop = false; |
| | | this.picCheckBox.Visible = false; |
| | | // |
| | | // ucBtnPrint1 |
| | | // |
| | | this.ucBtnPrint1.guidKey = null; |
| | | this.ucBtnPrint1.Location = new System.Drawing.Point(543, 59); |
| | | this.ucBtnPrint1.Name = "ucBtnPrint1"; |
| | | this.ucBtnPrint1.rptParameter = null; |
| | | this.ucBtnPrint1.Size = new System.Drawing.Size(218, 41); |
| | | this.ucBtnPrint1.TabIndex = 231; |
| | | // |
| | | // Frm_MesItemTbl |
| | | // |
| | | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F); |
| | |
| | | private DevExpress.XtraGrid.Columns.GridColumn gvMxDel; |
| | | private DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit repositoryItemButtonEdit1; |
| | | private System.Windows.Forms.PictureBox picCheckBox; |
| | | private UserControl.UcBtnPrint ucBtnPrint1; |
| | | } |
| | | } |
| | |
| | | this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; |
| | | toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; |
| | | toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; |
| | | toolBarMenu1.btnReportClick += ToolBarMenu1_btnReportClick; |
| | | toolBarMenu1.btnDesignClick += ToolBarMenu1_btnDesignClick; |
| | | //toolBarMenu1.btnReportClick += ToolBarMenu1_btnReportClick; |
| | | //toolBarMenu1.btnDesignClick += ToolBarMenu1_btnDesignClick; |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "tbl013", "", (value) => |
| | | { |
| | |
| | | }; |
| | | |
| | | gcMx1.MouseClick += GcMx1_MouseClick; |
| | | this.ucBtnPrint1.btnDesignClick += (s, e) => |
| | | { |
| | | ucBtnPrint1.rptParameter = "rpt_SCTL{}"; |
| | | }; |
| | | this.ucBtnPrint1.btnReportClick += (s, e) => |
| | | { |
| | | ucBtnPrint1.guidKey = ""; |
| | | string rowGuid = lbMxGuid.Text.Trim(); |
| | | ucBtnPrint1.guidKey = rowGuid; |
| | | if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印条码张数!"); |
| | | txt_iCount_1.Focus(); |
| | | this.ucBtnPrint1.rptParameter = "return false"; |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印条码数量!"); |
| | | txt_psnQty_1.Focus(); |
| | | this.ucBtnPrint1.rptParameter = "return false"; |
| | | return; |
| | | } |
| | | if (lbMxGuid.Text.Trim().Length < 10) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印的行!"); |
| | | this.ucBtnPrint1.rptParameter = "return false"; |
| | | return; |
| | | } |
| | | this.ucBtnPrint1.rptParameter = "rpt_SCTL{" + lbMxGuid.Text.Trim() |
| | | + "," + "" |
| | | + "," + "" |
| | | + "," + txt_iCount_1.Text.Trim() |
| | | + "," + txt_psnQty_1.Text.Trim() |
| | | + "}"; |
| | | }; |
| | | } |
| | | private async void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | |
| | | this.txt_createBy = new DevExpress.XtraEditors.TextEdit(); |
| | | this.lb_billNo = new DevExpress.XtraEditors.LabelControl(); |
| | | this.txt_billNo = new DevExpress.XtraEditors.TextEdit(); |
| | | this.ucBtnPrint1 = new Gs.DevApp.UserControl.UcBtnPrint(); |
| | | this.tabMxPage2.SuspendLayout(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.gcMx2)).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.gvMx2)).BeginInit(); |
| | |
| | | // |
| | | // panelMx1 |
| | | // |
| | | this.panelMx1.Controls.Add(this.ucBtnPrint1); |
| | | this.panelMx1.Controls.Add(this.lbMxGuid); |
| | | this.panelMx1.Controls.Add(this.txt_iCount_1); |
| | | this.panelMx1.Controls.Add(this.labelControl14); |
| | |
| | | this.txt_billNo.Size = new System.Drawing.Size(215, 28); |
| | | this.txt_billNo.TabIndex = 211; |
| | | // |
| | | // ucBtnPrint1 |
| | | // |
| | | this.ucBtnPrint1.guidKey = null; |
| | | this.ucBtnPrint1.Location = new System.Drawing.Point(543, 59); |
| | | this.ucBtnPrint1.Name = "ucBtnPrint1"; |
| | | this.ucBtnPrint1.rptParameter = null; |
| | | this.ucBtnPrint1.Size = new System.Drawing.Size(218, 41); |
| | | this.ucBtnPrint1.TabIndex = 232; |
| | | // |
| | | // Frm_ArrivalBarcode |
| | | // |
| | | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F); |
| | |
| | | private DevExpress.XtraGrid.Columns.GridColumn gridColumn6; |
| | | private DevExpress.XtraEditors.LabelControl lbMxGuid; |
| | | private DevExpress.XtraGrid.Columns.GridColumn gridColumn10; |
| | | private UserControl.UcBtnPrint ucBtnPrint1; |
| | | } |
| | | } |
| | |
| | | InitializeComponent(); |
| | | this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick; |
| | | this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; |
| | | toolBarMenu1.btnReportClick += ToolBarMenu1_btnReportClick; |
| | | toolBarMenu1.btnDesignClick += ToolBarMenu1_btnDesignClick; |
| | | //toolBarMenu1.btnReportClick += ToolBarMenu1_btnReportClick; |
| | | //toolBarMenu1.btnDesignClick += ToolBarMenu1_btnDesignClick; |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, "", "", (value) => |
| | |
| | | txtSupplierId.Text = this.txt_suppId.GetId(); |
| | | }; |
| | | gcMx1.MouseClick += GcMx1_MouseClick; |
| | | this.ucBtnPrint1.btnDesignClick += (s, e) => |
| | | { |
| | | ucBtnPrint1.rptParameter = "rpt_Arrival{}"; |
| | | }; |
| | | this.ucBtnPrint1.btnReportClick += (s, e) => |
| | | { |
| | | ucBtnPrint1.guidKey = ""; |
| | | string rowGuid = lbMxGuid.Text.Trim(); |
| | | ucBtnPrint1.guidKey = rowGuid; |
| | | if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印条码张数!"); |
| | | txt_iCount_1.Focus(); |
| | | this.ucBtnPrint1.rptParameter = "return false"; |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印条码数量!"); |
| | | txt_psnQty_1.Focus(); |
| | | this.ucBtnPrint1.rptParameter = "return false"; |
| | | return; |
| | | } |
| | | if (lbMxGuid.Text.Trim().Length < 10) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印的行!"); |
| | | this.ucBtnPrint1.rptParameter = "return false"; |
| | | return; |
| | | } |
| | | this.ucBtnPrint1.rptParameter = "rpt_Arrival{" + lbMxGuid.Text.Trim() |
| | | + "," + "" |
| | | + "," + "" |
| | | + "," + txt_iCount_1.Text.Trim() |
| | | + "," + txt_psnQty_1.Text.Trim() |
| | | + "}"; |
| | | }; |
| | | } |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | |
| | | /// </summary> |
| | | private void InitializeComponent() |
| | | { |
| | | this.btnPrint = new DevExpress.XtraEditors.SimpleButton(); |
| | | this.btnReport = new DevExpress.XtraEditors.SimpleButton(); |
| | | this.btnDesign = new DevExpress.XtraEditors.SimpleButton(); |
| | | this.SuspendLayout(); |
| | | // |
| | | // btnPrint |
| | | // btnReport |
| | | // |
| | | this.btnPrint.ImageOptions.Image = global::Gs.DevApp.Properties.Resources.printernetwork_16x16; |
| | | this.btnPrint.Location = new System.Drawing.Point(115, 4); |
| | | this.btnPrint.Name = "btnPrint"; |
| | | this.btnPrint.Size = new System.Drawing.Size(94, 29); |
| | | this.btnPrint.TabIndex = 3; |
| | | this.btnPrint.Text = "确定打印"; |
| | | this.btnReport.ImageOptions.Image = global::Gs.DevApp.Properties.Resources.printernetwork_16x16; |
| | | this.btnReport.Location = new System.Drawing.Point(115, 4); |
| | | this.btnReport.Name = "btnReport"; |
| | | this.btnReport.Size = new System.Drawing.Size(94, 29); |
| | | this.btnReport.TabIndex = 3; |
| | | this.btnReport.Text = "确定打印"; |
| | | // |
| | | // btnDesign |
| | | // |
| | |
| | | this.btnDesign.Name = "btnDesign"; |
| | | this.btnDesign.Size = new System.Drawing.Size(94, 29); |
| | | this.btnDesign.TabIndex = 2; |
| | | this.btnDesign.Text = "模板设置"; |
| | | this.btnDesign.Text = "打印设计"; |
| | | // |
| | | // UcBtnPrint |
| | | // |
| | | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F); |
| | | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
| | | this.Controls.Add(this.btnPrint); |
| | | this.Controls.Add(this.btnReport); |
| | | this.Controls.Add(this.btnDesign); |
| | | this.Name = "UcBtnPrint"; |
| | | this.Size = new System.Drawing.Size(214, 36); |
| | |
| | | |
| | | #endregion |
| | | |
| | | private DevExpress.XtraEditors.SimpleButton btnPrint; |
| | | private DevExpress.XtraEditors.SimpleButton btnReport; |
| | | private DevExpress.XtraEditors.SimpleButton btnDesign; |
| | | } |
| | | } |
| | |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.Utils.VisualEffects; |
| | | using DevExpress.XtraBars; |
| | | using DevExpress.XtraEditors; |
| | | using Gs.DevApp.DevFrm.Rpt; |
| | | using Gs.DevApp.DevFrm.Sys; |
| | | using Gs.DevApp.ToolBox; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | |
| | | public UcBtnPrint() |
| | | { |
| | | InitializeComponent(); |
| | | btnReport.Click += BtnReport_ItemClick; |
| | | btnDesign.Click += BtnDesign_ItemClick; |
| | | |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 关键字,一般是主键 |
| | | /// </summary> |
| | | public string guidKey { get; set; } |
| | | /// <summary> |
| | | /// 报表,在数据库中要唯一,如:存储过程名{入参1名|入参值,入参2名|入参值} |
| | | /// </summary> |
| | | public string rptParameter { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 设置报表 |
| | | /// </summary> |
| | | public event EventHandler btnDesignClick; |
| | | |
| | | /// <summary> |
| | | /// 报表 |
| | | /// </summary> |
| | | public event EventHandler btnReportClick; |
| | | |
| | | private void BtnReport_ItemClick(object sender, EventArgs e) |
| | | { |
| | | if (btnReportClick != null) |
| | | btnReportClick(this, e); |
| | | else |
| | | return; |
| | | |
| | | if (rptParameter == "return false") |
| | | return; |
| | | if (string.IsNullOrEmpty(rptParameter)) |
| | | { |
| | | MsgHelper.ShowError("没有指定报表参数,请联系技术开发人员!"); |
| | | return; |
| | | } |
| | | var _bl = false; |
| | | _bl = _ckRptService(); |
| | | if (_bl) |
| | | { |
| | | var frm = new RptPreview(guidKey, rptParameter); |
| | | frm.ShowDialog(); |
| | | return; |
| | | } |
| | | |
| | | MsgHelper.ShowError("没有设计模板,请先设计模板!"); |
| | | } |
| | | |
| | | private void BtnDesign_ItemClick(object sender, EventArgs e) |
| | | { |
| | | if (btnDesignClick != null) |
| | | btnDesignClick(this, e); |
| | | else |
| | | return; |
| | | |
| | | if (string.IsNullOrEmpty(rptParameter)) |
| | | { |
| | | MsgHelper.ShowError("没有指定报表参数,请联系技术开发人员!"); |
| | | return; |
| | | } |
| | | var _bl = false; |
| | | _bl = _ckRptService(); |
| | | //如果已经有模板了,直接打开设置模板 |
| | | if (_bl) |
| | | { |
| | | var frm = new EasyRptDesign(guidKey, rptParameter); |
| | | frm.ShowDialog(); |
| | | return; |
| | | } |
| | | //否则向导设计模板 |
| | | var rptWizard = new ShowRptWizard(guidKey, rptParameter); |
| | | rptWizard.ShowDialog(); |
| | | } |
| | | private bool _ckRptService() |
| | | { |
| | | try |
| | | { |
| | | var _obj = new |
| | | { |
| | | guid = guidKey, |
| | | rptParameter, |
| | | isDesign = 1 |
| | | }; |
| | | var strJson = UtilityHelper.HttpPost("", "Report/GetRptData", |
| | | JsonConvert.SerializeObject(_obj)); |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) return true; |
| | | return false; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | } |
| | | } |