lu
2025-02-18 92c92d9bfb4431a8e2f4b8ac494547d50ea3a7f6
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmAql1.cs
@@ -20,6 +20,34 @@
        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;
@@ -30,9 +58,9 @@
            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);
            });
@@ -61,16 +89,25 @@
        {
            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)
            {
@@ -150,7 +187,7 @@
        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("请先选择你要操作的行!");
@@ -279,6 +316,17 @@
                {
                    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()),
@@ -293,12 +341,24 @@
                            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()),
@@ -322,6 +382,7 @@
                            Aql1000 = Convert.ToInt32(row["Aql1000"].ToString()),
                            Memo = row["Memo"].ToString()
                        });
                    }
                }
                if (qmaql2.Count <= 0)
                {
@@ -360,6 +421,7 @@
                        gridViews.Add(gvMx1);
                        gridViews.Add(gvMx2);
                        UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false, gridViews);
                        toolBarMenu1.currentAction = "";
                    }
                }
                catch (Exception ex)
@@ -398,6 +460,7 @@
                    {
                        gcMain.DataSource = dt;
                        gcMain.ForceInitialize();
                        gridView1.BestFitColumns();
                    }
                    else
                        UtilityHelper.SetDefaultTable(gcMain, gridView1);
@@ -455,6 +518,7 @@
                        gcMx1.BindingContext = new BindingContext();
                        gcMx1.DataSource = dt;
                        gcMx1.ForceInitialize();
                        gvMx1.BestFitColumns();
                    }
                    else
                    {
@@ -470,6 +534,7 @@
                        gcMx2.BindingContext = new BindingContext();
                        gcMx2.DataSource = dt1;
                        gcMx2.ForceInitialize();
                        gvMx2.BestFitColumns();
                    }
                    else
                    {
@@ -605,9 +670,12 @@
                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)