iqc
lu
2025-04-21 c3ebc2116abc274eb2220e7a24c4ca03acad3a1d
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmAql1.cs
@@ -2,13 +2,11 @@
using Gs.DevApp.DevFrm.QC.Models;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Gs.DevApp.UserControl;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Gs.DevApp.DevFrm.QC
@@ -56,7 +54,6 @@
            this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
            toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
            toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
            toolBarMenu1.btnPiZhunClick += ToolBarMenu1_btnPiZhunClick;
            this.toolBarMenu1.getXmlConfig();
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2);
@@ -74,41 +71,7 @@
            getPageList(1);
            pageBar1.PagerEvent += PageBar1_PagerEvent;
        }
        /// <summary>
        /// 批准
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolBarMenu1_btnPiZhunClick(object sender, EventArgs e)
        {
            string rowGuid, rowName;
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                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)
                {
                    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());
                }
            }
            catch (Exception ex)
            {
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
            }
        }
        /// <summary>
        ///     反审核
@@ -140,7 +103,7 @@
        {
            getPageList(curPage);
        }
        /// <summary>
        /// 取消事件
        /// </summary>
@@ -177,10 +140,11 @@
                if (_rtn.rtnCode > 0)
                {
                    if (xtraTabControl1.SelectedTabPageIndex == 0)
                    { }
                    {
                        getPageList(this.pageBar1.CurrentPage);
                    }
                    else
                        Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2);
                    getPageList(this.pageBar1.CurrentPage);
                }
                ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
            }
@@ -420,7 +384,7 @@
        /// <param name="pageSize">每页几条</param>
        private void getPageList(int curPage)
        {
            var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
            gcMain1.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
            PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString());
            string json = JsonConvert.SerializeObject(pgq);
            try
@@ -492,7 +456,7 @@
                        gcMx1.BindingContext = new BindingContext();
                        gcMx1.DataSource = dt;
                        gcMx1.ForceInitialize();
                        gvMx1.BestFitColumns();
                        //gvMx1.BestFitColumns();
                    }
                    else
                    {
@@ -508,7 +472,7 @@
                        gcMx2.BindingContext = new BindingContext();
                        gcMx2.DataSource = dt1;
                        gcMx2.ForceInitialize();
                        gvMx2.BestFitColumns();
                        // gvMx2.BestFitColumns();
                    }
                    else
                    {