From 37d32d9263f757072a6ff348ae5e99824fab4ef9 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期一, 31 三月 2025 09:52:50 +0800
Subject: [PATCH] 改变了字体大小
---
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Input.cs | 101 +++++++++++++++++++-------------------------------
1 files changed, 39 insertions(+), 62 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Input.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Input.cs
index 66ded33..8cd2a90 100644
--- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Input.cs
+++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Input.cs
@@ -1,23 +1,9 @@
-锘縰sing DevExpress.Utils;
-using DevExpress.Utils.DirectXPaint;
-using DevExpress.XtraGrid.Columns;
-using DevExpress.XtraGrid.Views.Grid;
-using DevExpress.XtraPrinting.Native;
-using DevExpress.XtraRichEdit.Layout;
-using Gs.DevApp.DevFrm.QC;
-using Gs.DevApp.Entity;
+锘縰sing 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.Configuration;
using System.Data;
using System.Drawing;
-using System.Net;
-using System.Threading.Tasks;
-using System.Web.UI.WebControls;
using System.Windows.Forms;
namespace Gs.DevApp.DevFrm.QC
@@ -37,41 +23,40 @@
gvMx1.CustomDrawCell += GvMx1_CustomDrawCell;
}
+ /// <summary>
+ /// 鍒ゆ柇鍗曞厓鏍肩殑缂栬緫鎬�
+ /// </summary>
+ /// <param name="Column"></param>
+ /// <param name="_maxYbs"></param>
+ /// <returns></returns>
+ private bool ckCol(string ColumnName, string _maxYbs)
+ {
+ string _FieldName = ColumnName;
+ if (!_FieldName.Contains("鏍锋湰"))
+ return false;
+ if (_FieldName == "鏍锋湰鏁�")
+ return true;
+ if (string.IsNullOrEmpty(_maxYbs))
+ return false;
+ string _seqYb = _FieldName.Replace("鏍锋湰", "");
+ if (int.Parse(_seqYb) > int.Parse(_maxYbs))
+ return false;
+ return true;
+ }
+
private void GvMx1_CustomDrawCell(object sender, DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs e)
{
- // 鍒ゆ柇鍗曞厓鏍兼槸鍚︾鍚堟潯浠� && e.CellValue.ToString() == "YourCondition"
- bool _bl = false;
- string _FieldName = e.Column.FieldName;
- //if (e.Column.FieldName == "鏍锋湰鏁�")
- //{
- // _bl = true;
- //}
- //e.Appearance.BackColor = Color.LightBlue; // 璁剧疆鑳屾櫙鑹�
- if (_FieldName.Contains("鏍�"))
+ string _maxYbs = (gvMx1.GetRowCellValue(e.RowHandle, "鏍锋湰鏁�").ToString());
+ bool _bl = ckCol(e.Column.FieldName, _maxYbs);
+ if (_bl)
{
- if (_FieldName == "鏍锋湰鏁�")
- _bl = true;
- else
- {
- string _maxYbs = (gvMx1.GetRowCellValue(e.RowHandle, "鏍锋湰鏁�").ToString());
- string _seqYb = _FieldName.Replace("鏍锋湰", "");
- if (int.Parse(_seqYb) > int.Parse(_maxYbs))
- _bl = false;
- else
- _bl = true;
- }
- }
- else
- {
- _bl = false;
- }
- if (_bl) {
- e.Appearance.BackColor = Color.Azure;
+ e.Appearance.BackColor = Color.Azure;
e.Column.MinWidth = 50;
- //e.Appearance.BackColor2 = Color.LightSkyBlue;
}
else
+ {
e.Appearance.BackColor = Color.LightGray;
+ }
}
private void GvMx1_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e)
@@ -106,6 +91,12 @@
if (_rtn.rtnCode > 0)
{
string _strYbNo = _rtn.rtnData.outNo;
+ string _outMsg = _rtn.rtnData.outMsg;
+ string _outSum = _rtn.rtnData.outSum;
+ if (string.IsNullOrEmpty(_outSum)) _outSum = "-1";
+ if (int.Parse(_outSum) < 0) {
+ MessageBox.Show(_outMsg);
+ }
if (_strYbNo == "鏍锋湰鏁�")
getModel();
//lbGuid.Text = _rtn.rtnData.outGuid;
@@ -124,24 +115,10 @@
private void GvMx1_ShowingEditor(object sender, System.ComponentModel.CancelEventArgs e)
{
DevExpress.XtraGrid.Views.Grid.GridView view = sender as DevExpress.XtraGrid.Views.Grid.GridView;
- string _FieldName = view.FocusedColumn.FieldName;
- if (view.FocusedColumn.FieldName.Contains("鏍�"))
- {
- if (_FieldName == "鏍锋湰鏁�")
- e.Cancel = false;
- else
- {
- string _maxYbs = (gvMx1.GetRowCellValue(view.FocusedRowHandle, "鏍锋湰鏁�").ToString());
- string _seqYb = _FieldName.Replace("鏍锋湰", "");
- if (int.Parse(_seqYb) > int.Parse(_maxYbs))
- e.Cancel = true;
- }
- }
- else
- {
+ string _maxYbs = (gvMx1.GetRowCellValue(view.FocusedRowHandle, "鏍锋湰鏁�").ToString());
+ bool _bl = ckCol(view.FocusedColumn.FieldName, _maxYbs);
+ if (!_bl)
e.Cancel = true;
- }
-
}
private void getModel()
@@ -165,13 +142,13 @@
gcMx1.DataSource = dt;
gcMx1.ForceInitialize();
gvMx1.BestFitColumns();
+ gvMx1.Columns["guid"].Visible = false;
+ gvMx1.Columns["parentGuid"].Visible = false;
}
else
{
Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
}
- gvMx1.Columns["guid"].Visible = false;
- gvMx1.Columns["parentGuid"].Visible = false;
}
else
ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
--
Gitblit v1.9.3