| | |
| | | // 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 = 180; |
| | | this.gridColumn1.Name = "gridColumn1"; |
| | | this.gridColumn1.OptionsColumn.AllowEdit = false; |
| | | this.gridColumn1.Visible = true; |
| | | this.gridColumn1.VisibleIndex = 4; |
| | | this.gridColumn1.Width = 94; |
| | | this.gridColumn1.Width = 180; |
| | | // |
| | | // 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 = "数据详细"; |
| | | // |
| | |
| | | this.lb_modify1Flag = new DevExpress.XtraEditors.LabelControl(); |
| | | this.lb_lotNo = new DevExpress.XtraEditors.LabelControl(); |
| | | this.txt_lotNo = new DevExpress.XtraEditors.TextEdit(); |
| | | this.picCheckBox = new System.Windows.Forms.PictureBox(); |
| | | this.tabMxPage1.SuspendLayout(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1)).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel1)).BeginInit(); |
| | |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_itemModel.Properties)).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_itemNo.Properties)).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_lotNo.Properties)).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.picCheckBox)).BeginInit(); |
| | | this.SuspendLayout(); |
| | | // |
| | | // tabMxPage1 |
| | |
| | | // toolBarMenu1 |
| | | // |
| | | this.toolBarMenu1.chkParameter = "0,0,0,0,000chk_iqc_detect01_submit"; |
| | | this.toolBarMenu1.currentAction = null; |
| | | this.toolBarMenu1.Dock = System.Windows.Forms.DockStyle.Top; |
| | | this.toolBarMenu1.guidKey = null; |
| | | this.toolBarMenu1.isSetBtn = false; |
| | |
| | | this.xtraTabPage2.Controls.Add(this.xtraTabControl2); |
| | | this.xtraTabPage2.Controls.Add(this.panel1); |
| | | this.xtraTabPage2.Name = "xtraTabPage2"; |
| | | |
| | | this.xtraTabPage2.Size = new System.Drawing.Size(1342, 688); |
| | | this.xtraTabPage2.Text = "数据详细"; |
| | | // |
| | |
| | | this.txt_lotNo.Size = new System.Drawing.Size(150, 28); |
| | | this.txt_lotNo.TabIndex = 262; |
| | | // |
| | | // picCheckBox |
| | | // |
| | | this.picCheckBox.Image = global::Gs.DevApp.Properties.Resources.ico_noCheck; |
| | | this.picCheckBox.Location = new System.Drawing.Point(921, 42); |
| | | this.picCheckBox.Name = "picCheckBox"; |
| | | this.picCheckBox.Size = new System.Drawing.Size(100, 50); |
| | | this.picCheckBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; |
| | | this.picCheckBox.TabIndex = 6; |
| | | this.picCheckBox.TabStop = false; |
| | | this.picCheckBox.Visible = false; |
| | | // |
| | | // Frm_MesQaItemsDetect01 |
| | | // |
| | | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F); |
| | | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
| | | this.ClientSize = new System.Drawing.Size(1344, 800); |
| | | this.Controls.Add(this.picCheckBox); |
| | | this.Controls.Add(this.xtraTabControl1); |
| | | this.Controls.Add(this.toolBarMenu1); |
| | | this.Name = "Frm_MesQaItemsDetect01"; |
| | | this.Text = "来料检验申请"; |
| | | this.tabMxPage1.ResumeLayout(false); |
| | | ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel1)).EndInit(); |
| | | this.splitContainerControl1.Panel1.ResumeLayout(false); |
| | |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_itemModel.Properties)).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_itemNo.Properties)).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_lotNo.Properties)).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.picCheckBox)).EndInit(); |
| | | this.ResumeLayout(false); |
| | | |
| | | } |
| | |
| | | private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand17; |
| | | private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand24; |
| | | private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand25; |
| | | private System.Windows.Forms.PictureBox picCheckBox; |
| | | } |
| | | } |
| | |
| | | using DevExpress.Utils.About; |
| | | using DevExpress.XtraGrid.Views.Grid.ViewInfo; |
| | | using DevExpress.XtraRichEdit.Model; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Gs.DevApp.UserControl; |
| | | using MES.Service.Modes; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Configuration; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Net; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | |
| | | this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; |
| | | toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick; |
| | | toolBarMenu1.btnJianYanClick += ToolBarMenu1_btnJianYanClick; |
| | | |
| | | gcMx1.MouseClick += GcMx1_MouseClick; |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx3); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "modify1FlagTxt", "", (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; |
| | | txt_itemId.EditChanged += (s, e) => |
| | |
| | | this.btnLoad.Click += BtnLoad_Click; |
| | | ucUpFile1.UpChanged += UcUpFile1_UpChanged; |
| | | xtraTabControl2.SelectedPageChanged += XtraTabControl2_SelectedPageChanged; |
| | | |
| | | } |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | getModel(lbGuid.Text.Trim(), false, 999); |
| | | getModel(lbGuid.Text.Trim()); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | txtJianYan.Text = ""; |
| | | getModel(lbGuid.Text.Trim(), false, 999); |
| | | getModel(lbGuid.Text.Trim()); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | } |
| | | } |
| | | |
| | | /// <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> |
| | |
| | | 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) |
| | |
| | | /// <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<DevExpress.XtraGrid.Views.Grid.GridView> gridViews = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | gridViews.Add(gvMx1); |
| | | gridViews.Add(gvMx2); |
| | |
| | | /// <param name="pageSize">每页几条</param> |
| | | private void getPageList(int curPage) |
| | | { |
| | | |
| | | var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString()); |
| | | string json = JsonConvert.SerializeObject(pgq); |
| | |
| | | } |
| | | |
| | | } |
| | | 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 |
| | | // |
| | | this.toolBarMenu1.chkParameter = "1,1,1,1,000chk_iqc_detect01_check"; |
| | | this.toolBarMenu1.currentAction = null; |
| | | this.toolBarMenu1.Dock = System.Windows.Forms.DockStyle.Top; |
| | | this.toolBarMenu1.guidKey = null; |
| | | this.toolBarMenu1.isSetBtn = false; |
| | |
| | | this.xtraTabPage2.Controls.Add(this.xtraTabControl2); |
| | | this.xtraTabPage2.Controls.Add(this.panel1); |
| | | this.xtraTabPage2.Name = "xtraTabPage2"; |
| | | |
| | | this.xtraTabPage2.Size = new System.Drawing.Size(1342, 688); |
| | | this.xtraTabPage2.Text = "数据详细"; |
| | | // |
| | |
| | | this.toolBarMenu1.btnCaiGouFchkClick += ToolBarMenu1_btnCaiGouFchkClick; |
| | | this.toolBarMenu1.btnBoHuiClick += ToolBarMenu1_btnBoHuiClick; |
| | | toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick; |
| | | |
| | | gcMx1.MouseClick += GcMx1_MouseClick; |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx3); |
| | | 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; |
| | | //初始化物料选择和各种下拉 |
| | |
| | | return; |
| | | getList12(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> |
| | | /// 保存事件 |
| | |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | getModel(rowGuid, true, 1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); |
| | | UtilityHelper.ChangeEnableByControl(panel1.Controls, true); |
| | | } |
| | | /// <summary> |
| | | /// 驳回 |
| | |
| | | /// <param name="pageSize">每页几条</param> |
| | | private void getPageList(int curPage) |
| | | { |
| | | |
| | | var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString()); |
| | | string json = JsonConvert.SerializeObject(pgq); |
| | |
| | | } |
| | | |
| | | } |
| | | 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,//主建 |
| | |
| | | this.gv_suppNo.OptionsColumn.AllowEdit = false; |
| | | this.gv_suppNo.Tag = "query_a.SUPP_NO"; |
| | | this.gv_suppNo.Visible = true; |
| | | this.gv_suppNo.VisibleIndex = 4; |
| | | this.gv_suppNo.VisibleIndex = 5; |
| | | this.gv_suppNo.Width = 94; |
| | | // |
| | | // lb_itemId |
| | |
| | | this.gv_itemId.OptionsColumn.AllowEdit = false; |
| | | this.gv_itemId.Tag = "query_a.ITEM_ID"; |
| | | this.gv_itemId.Visible = true; |
| | | this.gv_itemId.VisibleIndex = 1; |
| | | this.gv_itemId.VisibleIndex = 2; |
| | | this.gv_itemId.Width = 94; |
| | | // |
| | | // lb_status |
| | |
| | | this.gv_status.Tag = "query_a.STATUS"; |
| | | this.gv_status.UnboundDataType = typeof(bool); |
| | | this.gv_status.Visible = true; |
| | | this.gv_status.VisibleIndex = 10; |
| | | this.gv_status.VisibleIndex = 1; |
| | | this.gv_status.Width = 94; |
| | | // |
| | | // lb_checkDate |
| | |
| | | this.gv_lastupdateDate.AppearanceCell.Options.UseFont = true; |
| | | this.gv_lastupdateDate.Caption = "最后更新时间"; |
| | | this.gv_lastupdateDate.FieldName = "lastupdateDate"; |
| | | this.gv_lastupdateDate.MinWidth = 120; |
| | | this.gv_lastupdateDate.MinWidth = 180; |
| | | this.gv_lastupdateDate.Name = "gv_lastupdateDate"; |
| | | this.gv_lastupdateDate.OptionsColumn.AllowEdit = false; |
| | | this.gv_lastupdateDate.Tag = "query_a.LASTUPDATE_DATE"; |
| | | this.gv_lastupdateDate.Visible = true; |
| | | this.gv_lastupdateDate.VisibleIndex = 9; |
| | | this.gv_lastupdateDate.Width = 120; |
| | | this.gv_lastupdateDate.VisibleIndex = 10; |
| | | this.gv_lastupdateDate.Width = 180; |
| | | // |
| | | // lb_lastupdateBy |
| | | // |
| | |
| | | this.gv_lastupdateBy.OptionsColumn.AllowEdit = false; |
| | | this.gv_lastupdateBy.Tag = "query_a.LASTUPDATE_BY"; |
| | | this.gv_lastupdateBy.Visible = true; |
| | | this.gv_lastupdateBy.VisibleIndex = 8; |
| | | this.gv_lastupdateBy.VisibleIndex = 9; |
| | | this.gv_lastupdateBy.Width = 94; |
| | | // |
| | | // gv_createDate |
| | |
| | | this.gv_createDate.AppearanceCell.Options.UseFont = true; |
| | | this.gv_createDate.Caption = "创建时间"; |
| | | this.gv_createDate.FieldName = "createDate"; |
| | | this.gv_createDate.MinWidth = 120; |
| | | this.gv_createDate.MinWidth = 180; |
| | | this.gv_createDate.Name = "gv_createDate"; |
| | | this.gv_createDate.OptionsColumn.AllowEdit = false; |
| | | this.gv_createDate.Tag = "query_a.CREATE_DATE"; |
| | | this.gv_createDate.Visible = true; |
| | | this.gv_createDate.VisibleIndex = 7; |
| | | this.gv_createDate.Width = 120; |
| | | this.gv_createDate.VisibleIndex = 8; |
| | | this.gv_createDate.Width = 180; |
| | | // |
| | | // gv_createBy |
| | | // |
| | |
| | | this.gv_createBy.OptionsColumn.AllowEdit = false; |
| | | this.gv_createBy.Tag = "query_a.CREATE_BY"; |
| | | this.gv_createBy.Visible = true; |
| | | this.gv_createBy.VisibleIndex = 6; |
| | | this.gv_createBy.VisibleIndex = 7; |
| | | this.gv_createBy.Width = 94; |
| | | // |
| | | // lb_itemNo |
| | |
| | | this.gv_itemNo.OptionsColumn.AllowEdit = false; |
| | | this.gv_itemNo.Tag = "query_a.ITEM_NO"; |
| | | this.gv_itemNo.Visible = true; |
| | | this.gv_itemNo.VisibleIndex = 3; |
| | | this.gv_itemNo.VisibleIndex = 4; |
| | | this.gv_itemNo.Width = 94; |
| | | // |
| | | // toolBarMenu1 |
| | | // |
| | | this.toolBarMenu1.chkParameter = "MES_QA_MJ,CHECK_DATE,STATUS,CHECK_USER"; |
| | | this.toolBarMenu1.currentAction = null; |
| | | this.toolBarMenu1.Dock = System.Windows.Forms.DockStyle.Top; |
| | | this.toolBarMenu1.guidKey = null; |
| | | this.toolBarMenu1.isSetBtn = false; |
| | |
| | | this.gridView1.Appearance.Row.Options.UseFont = true; |
| | | this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { |
| | | this.gridColumn1, |
| | | this.gv_status, |
| | | this.gv_itemId, |
| | | this.gv_itemNo, |
| | | this.gridColumn2, |
| | |
| | | this.gv_createDate, |
| | | this.gv_lastupdateBy, |
| | | this.gv_lastupdateDate, |
| | | this.gv_status, |
| | | this.gv_checkUser, |
| | | this.gv_checkDate}); |
| | | this.gridView1.GridControl = this.gcMain; |
| | |
| | | this.gridColumn2.OptionsColumn.AllowEdit = false; |
| | | this.gridColumn2.Tag = "query_b.item_name"; |
| | | this.gridColumn2.Visible = true; |
| | | this.gridColumn2.VisibleIndex = 2; |
| | | this.gridColumn2.VisibleIndex = 3; |
| | | this.gridColumn2.Width = 125; |
| | | // |
| | | // gridColumn3 |
| | |
| | | this.gridColumn3.OptionsColumn.AllowEdit = false; |
| | | this.gridColumn3.Tag = "d.supp_name"; |
| | | this.gridColumn3.Visible = true; |
| | | this.gridColumn3.VisibleIndex = 5; |
| | | this.gridColumn3.VisibleIndex = 6; |
| | | this.gridColumn3.Width = 125; |
| | | // |
| | | // xtraTabControl1 |
| | |
| | | // |
| | | this.xtraTabPage2.Controls.Add(this.panel1); |
| | | this.xtraTabPage2.Name = "xtraTabPage2"; |
| | | |
| | | this.xtraTabPage2.Size = new System.Drawing.Size(1213, 570); |
| | | this.xtraTabPage2.Text = "数据详细"; |
| | | // |
| | |
| | | this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; |
| | | toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; |
| | | toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; |
| | | |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "status", ""); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "status", "", (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; |
| | | txt_itemId.EditChanged += (s, e) => |
| | |
| | | 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> |
| | |
| | | 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,//主建 |
| | |
| | | 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) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | private void InitializeComponent() |
| | | { |
| | | DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions3 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject9 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject10 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject11 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject12 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions4 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject13 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject14 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject15 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject16 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions2 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject5 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject6 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject7 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject8 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | this.gvMx1pid = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.gvMx1facLevel = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.rptJSSP = new DevExpress.XtraEditors.Repository.RepositoryItemComboBox(); |
| | |
| | | // repositoryItemButtonEdit1 |
| | | // |
| | | this.repositoryItemButtonEdit1.AutoHeight = false; |
| | | editorButtonImageOptions3.Image = global::Gs.DevApp.Properties.Resources.removegroupfooter_16x16; |
| | | editorButtonImageOptions3.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.LeftCenter; |
| | | editorButtonImageOptions1.Image = global::Gs.DevApp.Properties.Resources.removegroupfooter_16x16; |
| | | editorButtonImageOptions1.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.LeftCenter; |
| | | this.repositoryItemButtonEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { |
| | | new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "移除", -1, true, true, false, editorButtonImageOptions3, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject9, serializableAppearanceObject10, serializableAppearanceObject11, serializableAppearanceObject12, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)}); |
| | | new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "移除", -1, true, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)}); |
| | | this.repositoryItemButtonEdit1.Name = "repositoryItemButtonEdit1"; |
| | | this.repositoryItemButtonEdit1.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; |
| | | this.repositoryItemButtonEdit1.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(this.repositoryItemButtonEdit1_ButtonClick); |
| | |
| | | this.gv_isenabled.AppearanceCell.Options.UseFont = true; |
| | | this.gv_isenabled.Caption = "是否可用"; |
| | | this.gv_isenabled.FieldName = "isenabled"; |
| | | this.gv_isenabled.MaxWidth = 50; |
| | | this.gv_isenabled.MinWidth = 50; |
| | | this.gv_isenabled.Name = "gv_isenabled"; |
| | | this.gv_isenabled.OptionsColumn.AllowEdit = false; |
| | | this.gv_isenabled.Tag = "query_a.ISENABLED"; |
| | | this.gv_isenabled.Visible = true; |
| | | this.gv_isenabled.VisibleIndex = 1; |
| | | this.gv_isenabled.Width = 94; |
| | | this.gv_isenabled.Width = 50; |
| | | // |
| | | // lb_fversion |
| | | // |
| | |
| | | this.gv_ftwoChecked.AppearanceCell.Options.UseFont = true; |
| | | this.gv_ftwoChecked.Caption = "批准标记"; |
| | | this.gv_ftwoChecked.FieldName = "ftwoChecked"; |
| | | this.gv_ftwoChecked.MaxWidth = 50; |
| | | this.gv_ftwoChecked.MinWidth = 50; |
| | | this.gv_ftwoChecked.Name = "gv_ftwoChecked"; |
| | | this.gv_ftwoChecked.OptionsColumn.AllowEdit = false; |
| | | this.gv_ftwoChecked.Tag = "query_a.FTWO_CHECKED"; |
| | | this.gv_ftwoChecked.Visible = true; |
| | | this.gv_ftwoChecked.VisibleIndex = 3; |
| | | this.gv_ftwoChecked.Width = 94; |
| | | this.gv_ftwoChecked.Width = 50; |
| | | // |
| | | // lb_foneCheckdate |
| | | // |
| | |
| | | this.gv_foneChecked.AppearanceCell.Options.UseFont = true; |
| | | this.gv_foneChecked.Caption = "审核标记"; |
| | | this.gv_foneChecked.FieldName = "foneChecked"; |
| | | this.gv_foneChecked.MaxWidth = 50; |
| | | this.gv_foneChecked.MinWidth = 50; |
| | | this.gv_foneChecked.Name = "gv_foneChecked"; |
| | | this.gv_foneChecked.OptionsColumn.AllowEdit = false; |
| | | this.gv_foneChecked.Tag = "query_a.FONE_CHECKED"; |
| | | this.gv_foneChecked.Visible = true; |
| | | this.gv_foneChecked.VisibleIndex = 2; |
| | | this.gv_foneChecked.Width = 94; |
| | | this.gv_foneChecked.Width = 50; |
| | | // |
| | | // lb_itemNo |
| | | // |
| | |
| | | // toolBarMenu1 |
| | | // |
| | | this.toolBarMenu1.chkParameter = " 0,0,0,0,000chk_mes_CHECKITEM"; |
| | | this.toolBarMenu1.currentAction = null; |
| | | this.toolBarMenu1.Dock = System.Windows.Forms.DockStyle.Top; |
| | | this.toolBarMenu1.guidKey = null; |
| | | this.toolBarMenu1.isSetBtn = false; |
| | |
| | | this.xtraTabPage2.Controls.Add(this.tabMx); |
| | | this.xtraTabPage2.Controls.Add(this.panel1); |
| | | this.xtraTabPage2.Name = "xtraTabPage2"; |
| | | |
| | | this.xtraTabPage2.Size = new System.Drawing.Size(1127, 570); |
| | | this.xtraTabPage2.Text = "数据详细"; |
| | | // |
| | |
| | | // repositoryItemButtonEdit3 |
| | | // |
| | | this.repositoryItemButtonEdit3.AutoHeight = false; |
| | | editorButtonImageOptions4.Image = global::Gs.DevApp.Properties.Resources.removegroupfooter_16x16; |
| | | editorButtonImageOptions4.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.LeftCenter; |
| | | editorButtonImageOptions2.Image = global::Gs.DevApp.Properties.Resources.removegroupfooter_16x16; |
| | | editorButtonImageOptions2.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.LeftCenter; |
| | | this.repositoryItemButtonEdit3.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { |
| | | new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "移出", -1, true, true, false, editorButtonImageOptions4, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject13, serializableAppearanceObject14, serializableAppearanceObject15, serializableAppearanceObject16, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)}); |
| | | new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "移出", -1, true, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)}); |
| | | this.repositoryItemButtonEdit3.Name = "repositoryItemButtonEdit3"; |
| | | this.repositoryItemButtonEdit3.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; |
| | | this.repositoryItemButtonEdit3.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(this.repositoryItemButtonEdit3_ButtonClick); |
| | |
| | | toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; |
| | | toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; |
| | | toolBarMenu1.btnPiZhunClick += ToolBarMenu1_btnPiZhunClick; |
| | | |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "foneChecked", ""); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); |
| | | 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; |
| | | _setIno(); |
| | | btnSave.Click += BtnSave_Click; |
| | | } |
| | | |
| | | 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> |
| | |
| | | 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); |
| | | |
| | | } |
| | | |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnAddClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 1); |
| | | lbGuid.Text = ""; |
| | | var gridViews = |
| | | new List<GridView>(); |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4); |
| | | var gridViews = new List<GridView>(); |
| | | gridViews.Add(gvMx1); |
| | | UtilityHelper.CleanValueByControl(panel1.Controls, true, |
| | | gridViews); |
| | | UtilityHelper.CleanValueByControl(panel1.Controls, true, gridViews); |
| | | UtilityHelper.SetDefaultTable(gcMx1, gvMx1); |
| | | xtraTabPageCopy.PageEnabled = false; |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | 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); |
| | | xtraTabPageCopy.PageEnabled = !isEdit; |
| | | var _obj = new |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | UtilityHelper.SetDefaultTable(gcMx1, |
| | | gvMx1); |
| | | UtilityHelper.SetDefaultTable(gcMx1,gvMx1); |
| | | } |
| | | UtilityHelper.SetDefaultTable(gridControl2, |
| | | gridView2); |
| | | UtilityHelper.SetDefaultTable(gridControl2, gridView2); |
| | | } |
| | | else |
| | | { |
| | |
| | | if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 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) |
| | |
| | | _webServiceName + "DeleteModelMx", |
| | | 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); |
| | | } |
| | | catch (Exception ex) |