| | |
| | | public Frm_MesQmAql1() |
| | | { |
| | | InitializeComponent(); |
| | | object[] _objAry = { "A", |
| | | "B", |
| | | "C", |
| | | "D", |
| | | "E", |
| | | "F", |
| | | "G", |
| | | "H", |
| | | "I", |
| | | "J", |
| | | "K", |
| | | "L", |
| | | "M", |
| | | "N", |
| | | "O", |
| | | "P", |
| | | "Q", |
| | | "R", |
| | | "S", |
| | | "T"}; |
| | | this.repositoryItemComboBox1.Items.AddRange(_objAry); |
| | | this.repositoryItemComboBox2.Items.AddRange(_objAry); |
| | | this.repositoryItemComboBox3.Items.AddRange(_objAry); |
| | | this.repositoryItemComboBox4.Items.AddRange(_objAry); |
| | | this.repositoryItemComboBox5.Items.AddRange(_objAry); |
| | | this.repositoryItemComboBox6.Items.AddRange(_objAry); |
| | | this.repositoryItemComboBox7.Items.AddRange(_objAry); |
| | | this.repositoryItemComboBox8.Items.AddRange(_objAry); |
| | | this.toolBarMenu1.btnAddClick += ToolBarMenu1_btnAddClick; |
| | | this.toolBarMenu1.btnEdtClick += ToolBarMenu1_btnEdtClick; |
| | | this.toolBarMenu1.btnSaveClick += ToolBarMenu1_btnSaveClick; |
| | |
| | | toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; |
| | | toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; |
| | | toolBarMenu1.btnPiZhunClick += ToolBarMenu1_btnPiZhunClick; |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "foneChecked", "", (value) => |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(this.GetType().FullName, gvMx1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(this.GetType().FullName,gvMx2); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(this.GetType().FullName,gridView1,picCheckBox, this, "foneChecked", "", (value) => |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); |
| | | }); |
| | |
| | | { |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, |
| | | lbGuid, txt_sampleSizeNo, gridView1); |
| | | lbGuid, txt_sampleSizeNo, gridView1, "sampleSizeNo"); |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", _webServiceName + "Approval", JsonConvert.SerializeObject(rowGuid)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | { |
| | | getModel(lbGuid.Text.Trim()); |
| | | } |
| | | int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid); |
| | | gridView1.FocusedRowHandle = rowHandle; |
| | | gridView1.SetFocusedRowCellValue("ftwoChecked", true); |
| | | gridView1.SetFocusedRowCellValue("isenabled", true); |
| | | gridView1.SetFocusedRowCellValue("ftwoCheckor", "已批准"); |
| | | gridView1.SetFocusedRowCellValue("ftwoCheckdate", DateTime.Now.ToString()); |
| | | } |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e) |
| | | { |
| | | string rowGuid = "", rowName = ""; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_sampleSizeNo, gridView1); |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_sampleSizeNo, gridView1, "sampleSizeNo"); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | |
| | | { |
| | | var row = gvMx1.GetDataRow(i); |
| | | if (row != null) |
| | | { |
| | | if (string.IsNullOrEmpty(row["LotFrom"].ToString())) |
| | | { |
| | | MsgHelper.ShowError("批量开始不能为空!"); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(row["LotTo"].ToString())) |
| | | { |
| | | MsgHelper.ShowError("批量结束不能为空!"); |
| | | return; |
| | | } |
| | | qmaql2.Add(new MesQmAql2 |
| | | { |
| | | Guid = UtilityHelper.ToGuid(row["Guid"].ToString()), |
| | |
| | | FlevelIii = row["FlevelIii"].ToString(), |
| | | Memo = row["Memo"].ToString() |
| | | }); |
| | | } |
| | | } |
| | | var qmaql3 = new List<MesQmAql3>(); |
| | | for (var i = 0; i < gvMx2.DataRowCount; i++) |
| | | { |
| | | var row = gvMx2.GetDataRow(i); |
| | | if (row != null) |
| | | { |
| | | if (string.IsNullOrEmpty(row["FsampleSizeWord"].ToString())) |
| | | { |
| | | MsgHelper.ShowError("样本大小不能为空!"); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(row["SampleSizeWord"].ToString())) |
| | | { |
| | | MsgHelper.ShowError("样本字码不能为空!"); |
| | | return; |
| | | } |
| | | qmaql3.Add(new MesQmAql3 |
| | | { |
| | | Guid = UtilityHelper.ToGuid(row["Guid"].ToString()), |
| | |
| | | Aql1000 = Convert.ToInt32(row["Aql1000"].ToString()), |
| | | Memo = row["Memo"].ToString() |
| | | }); |
| | | } |
| | | } |
| | | if (qmaql2.Count <= 0) |
| | | { |
| | |
| | | gridViews.Add(gvMx1); |
| | | gridViews.Add(gvMx2); |
| | | UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false, gridViews); |
| | | toolBarMenu1.currentAction = ""; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | { |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | gridView1.BestFitColumns(); |
| | | } |
| | | else |
| | | UtilityHelper.SetDefaultTable(gcMain, gridView1); |
| | |
| | | gcMx1.BindingContext = new BindingContext(); |
| | | gcMx1.DataSource = dt; |
| | | gcMx1.ForceInitialize(); |
| | | gvMx1.BestFitColumns(); |
| | | } |
| | | else |
| | | { |
| | |
| | | gcMx2.BindingContext = new BindingContext(); |
| | | gcMx2.DataSource = dt1; |
| | | gcMx2.ForceInitialize(); |
| | | gvMx2.BestFitColumns(); |
| | | } |
| | | else |
| | | { |
| | |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | { |
| | | getModel(lbGuid.Text.Trim()); |
| | | else |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | } |
| | | int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid); |
| | | gridView1.FocusedRowHandle = rowHandle; |
| | | UtilityHelper.SetCheckIco(gridView1, "foneChecked", "foneCheckor", "foneCheckdate", picCheckBox, this, _inFieldValue.ToString()); |
| | | } |
| | | } |
| | | catch (Exception ex) |