| | |
| | | { |
| | | InitializeComponent(); |
| | | strType = _strType; |
| | | |
| | | } |
| | | protected override void OnCreateControl() |
| | | { |
| | |
| | | toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; |
| | | toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; |
| | | toolBarMenu1.btnPiZhunClick += ToolBarMenu1_btnPiZhunClick; |
| | | //iqc的样品数量默认5,否则1 |
| | | decimal _dfValue = 1; |
| | | if (strType == "iqc") |
| | | _dfValue = 5; |
| | | this.gvMx1.InitNewRow += (s, e) => { |
| | | this.gvMx1.SetRowCellValue(e.RowHandle, "ypsl", _dfValue); |
| | | int newIndex = gvMx1.DataRowCount + 1; |
| | | this.gvMx1.SetRowCellValue(e.RowHandle, "forder", newIndex); |
| | | }; |
| | | this.toolBarMenu1.getXmlConfig(); |
| | | Form parentForm = this.FindForm(); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); |
| | |
| | | }, (value) => |
| | | { |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | }); |
| | | }, lbGuid); |
| | | getPageList(1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | _setIno(); |
| | |
| | | frm.ShowDialog(); |
| | | }; |
| | | btnSave.Click += BtnSave_Click; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); |
| | | _filterList= Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); |
| | | Task.Delay(100); |
| | | getPageList(1); |
| | | } |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e) |
| | | { |
| | | Form parentForm; |
| | | if (this.Parent is Form) |
| | | parentForm = this.Parent as Form; |
| | | else |
| | | parentForm = this.Parent.Parent as Form; |
| | | |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | var frm = new ShowFilter(gridView1.Columns, _filterList); |
| | | var frm = new ShowFilter(gridView1.Columns, _filterList, parentForm.GetType().FullName); |
| | | frm.UpdateParent += Frm_UpdateParent; |
| | | frm.ShowDialog(); |
| | | } |
| | |
| | | MsgHelper.ShowError("接受水平不能为空!"); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(row["ypsl"].ToString())) |
| | | { |
| | | MsgHelper.ShowError("样品数量平不能为空!"); |
| | | return; |
| | | } |
| | | string _Fstand = row["Fstand"].ToString(); |
| | | string _FupAllow = row["FupAllow"].ToString(); |
| | | string _FdownAllow = row["FdownAllow"].ToString(); |
| | |
| | | Memo = row["memo"].ToString(), |
| | | FupAllow = Gs.DevApp.ToolBox.UtilityHelper.GetDecimal(row["FupAllow"].ToString()), |
| | | FdownAllow = Gs.DevApp.ToolBox.UtilityHelper.GetDecimal(row["FdownAllow"].ToString()), |
| | | |
| | | ypsl = Gs.DevApp.ToolBox.UtilityHelper.GetDecimal(row["ypsl"].ToString()), |
| | | }); |
| | | } |
| | | } |
| | |
| | | gridViews.Add(gvMx1); |
| | | gridViews.Add(gridView2); |
| | | UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false, gridViews); |
| | | toolBarMenu1.currentAction = ""; |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | { |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | gcMain1.DataSource = dt; |
| | | gcMain1.ForceInitialize(); |
| | | gridView1.BestFitColumns(); |
| | | gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1); |
| | | |
| | | } |
| | | else |
| | | UtilityHelper.SetDefaultTable(gcMain1, gridView1); |