From b64afc41b00ee686583661f1f969d2f65d1c239e Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期五, 27 六月 2025 11:07:21 +0800
Subject: [PATCH] 打印
---
DevApp/Gs.DevApp/DevFrm/Sys/EasyRptEdtShow.cs | 23 +++++++++--
DevApp/Gs.DevApp/DevFrm/Sys/EasyRptEdt.Designer.cs | 42 ++------------------
DevApp/Gs.DevApp/UserControl/SelectCgMx.cs | 1
DevApp/Gs.DevApp/App.config | 4 +-
DevApp/Gs.DevApp/DevFrm/Sys/EasyRptEdt.cs | 18 +++++++-
5 files changed, 41 insertions(+), 47 deletions(-)
diff --git a/DevApp/Gs.DevApp/App.config b/DevApp/Gs.DevApp/App.config
index 3d80851..f77fd81 100644
--- a/DevApp/Gs.DevApp/App.config
+++ b/DevApp/Gs.DevApp/App.config
@@ -28,9 +28,9 @@
</assemblyBinding>
</runtime>
<appSettings>
- <add key="WebApiUrl" value="http://localhost:5263/" />
+ <!--<add key="WebApiUrl" value="http://localhost:5263/" />-->
<!--<add key="WebApiUrl" value="http://192.168.1.145:8081/" />-->
- <!--<add key="WebApiUrl" value="http://192.168.1.145:81/" />-->
+ <add key="WebApiUrl" value="http://192.168.1.145:81/" />
<add key="LogPath" value="logs" />
<add key="ProductName" value="G-MES V2.0" />
<add key="PageSize" value="50" />
diff --git a/DevApp/Gs.DevApp/DevFrm/Sys/EasyRptEdt.Designer.cs b/DevApp/Gs.DevApp/DevFrm/Sys/EasyRptEdt.Designer.cs
index debb4ba..cc19f7e 100644
--- a/DevApp/Gs.DevApp/DevFrm/Sys/EasyRptEdt.Designer.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Sys/EasyRptEdt.Designer.cs
@@ -28,65 +28,33 @@
/// </summary>
private void InitializeComponent()
{
- this.splitMx1 = new DevExpress.XtraEditors.SplitContainerControl();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
- ((System.ComponentModel.ISupportInitialize)(this.splitMx1)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.splitMx1.Panel1)).BeginInit();
- this.splitMx1.Panel1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.splitMx1.Panel2)).BeginInit();
- this.splitMx1.SuspendLayout();
this.SuspendLayout();
- //
- // splitMx1
- //
- this.splitMx1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.splitMx1.Horizontal = false;
- this.splitMx1.Location = new System.Drawing.Point(0, 0);
- this.splitMx1.Name = "splitMx1";
- //
- // splitMx1.Panel1
- //
- this.splitMx1.Panel1.Controls.Add(this.flowLayoutPanel1);
- this.splitMx1.Panel1.Text = "Panel1";
- //
- // splitMx1.Panel2
- //
- this.splitMx1.Panel2.Text = "Panel2";
- this.splitMx1.ShowSplitGlyph = DevExpress.Utils.DefaultBoolean.True;
- this.splitMx1.Size = new System.Drawing.Size(918, 623);
- this.splitMx1.SplitterPosition = 593;
- this.splitMx1.TabIndex = 0;
//
// flowLayoutPanel1
//
+ this.flowLayoutPanel1.AutoScroll = true;
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
- this.flowLayoutPanel1.Padding = new System.Windows.Forms.Padding(100);
- this.flowLayoutPanel1.Size = new System.Drawing.Size(918, 593);
+ this.flowLayoutPanel1.Padding = new System.Windows.Forms.Padding(100, 0, 100, 100);
+ this.flowLayoutPanel1.Size = new System.Drawing.Size(1049, 787);
this.flowLayoutPanel1.TabIndex = 1;
//
// EasyRptEdt
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(918, 623);
- this.Controls.Add(this.splitMx1);
+ this.ClientSize = new System.Drawing.Size(1049, 787);
+ this.Controls.Add(this.flowLayoutPanel1);
this.Name = "EasyRptEdt";
this.Text = "鎵撳嵃妯℃澘";
- ((System.ComponentModel.ISupportInitialize)(this.splitMx1.Panel1)).EndInit();
- this.splitMx1.Panel1.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.splitMx1.Panel2)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.splitMx1)).EndInit();
- this.splitMx1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
-
- private DevExpress.XtraEditors.SplitContainerControl splitMx1;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
}
}
\ No newline at end of file
diff --git a/DevApp/Gs.DevApp/DevFrm/Sys/EasyRptEdt.cs b/DevApp/Gs.DevApp/DevFrm/Sys/EasyRptEdt.cs
index d64cda6..662bd38 100644
--- a/DevApp/Gs.DevApp/DevFrm/Sys/EasyRptEdt.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Sys/EasyRptEdt.cs
@@ -4,7 +4,9 @@
using Gs.DevApp.UserControl;
using Newtonsoft.Json;
using System;
+using System.Collections.Generic;
using System.Data;
+using System.Windows.Forms;
namespace Gs.DevApp.DevFrm.Sys
{
@@ -18,6 +20,7 @@
private void GetList()
{
+ this.flowLayoutPanel1.Controls.Clear();
var _obj = new
{
keyType = ""
@@ -32,10 +35,15 @@
foreach (DataRow row in dt.Rows)
{
SimpleButton btn = new DevExpress.XtraEditors.SimpleButton();
- btn.ImageOptions.Image = global::Gs.DevApp.Properties.Resources.printarea_32x32;
+ if (row["reportType"].ToString().StartsWith("瀹㈡埛妯℃澘"))
+ {
+ btn.ImageOptions.Image = global::Gs.DevApp.Properties.Resources.user_32x32;
+ }
+ else
+ btn.ImageOptions.Image = global::Gs.DevApp.Properties.Resources.printarea_32x32;
btn.ImageOptions.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.TopCenter;
btn.Name = Guid.NewGuid().ToString();
- btn.Size = new System.Drawing.Size(150, 150);
+ btn.Size = new System.Drawing.Size(170, 170);
btn.TabIndex = 1;
btn.Text = row["reportType"].ToString() + "\n" + row["reportName"].ToString();
btn.Margin = new System.Windows.Forms.Padding(20);
@@ -56,12 +64,16 @@
btn2.Click += (s, e) =>
{
EasyRptEdtShow frm = new EasyRptEdtShow();
+ frm.UpdateParent += (ss, ee) =>
+ {
+ GetList();
+ };
frm.ShowDialog();
};
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
diff --git a/DevApp/Gs.DevApp/DevFrm/Sys/EasyRptEdtShow.cs b/DevApp/Gs.DevApp/DevFrm/Sys/EasyRptEdtShow.cs
index 14121fc..839bf19 100644
--- a/DevApp/Gs.DevApp/DevFrm/Sys/EasyRptEdtShow.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Sys/EasyRptEdtShow.cs
@@ -18,7 +18,14 @@
}, null, false);
getPageList(1, 999999);
btnSave.Click += BtnSave_Click;
+ this.FormClosed += EasyRptEdtShow_FormClosed;
}
+
+ private void EasyRptEdtShow_FormClosed(object sender, FormClosedEventArgs e)
+ {
+ UpdateParent?.Invoke(this, new UpdateParentEventArgs { StringSingle = "1" });
+ }
+
/// <summary>
/// 澧炲姞
/// </summary>
@@ -43,6 +50,7 @@
if (_rtn.rtnCode > 0)
{
MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
+ txt_reportName.Text = "";
getPageList(1, 999999);
}
else
@@ -108,19 +116,19 @@
return;
var _obj = new
{
- suppId = mxGuid,
- joinType = -1,
+ guid = mxGuid,
};
try
{
var strJson = UtilityHelper.HttpPost("",
- "Report/" + "SrmJoin",
+ "Report/" + "DeleteModel",
JsonConvert.SerializeObject(_obj));
var _rtn = UtilityHelper.ReturnToDynamic(strJson);
if (_rtn.rtnCode > 0)
{
MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
- getPageList(1, 999999);
+ getPageList(1, 999999);
+
}
else
MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
@@ -131,5 +139,12 @@
}
}
}
+
+
+ /// <summary>
+ /// 閫夋嫨鍚庣殑鍥炶皟浜嬩欢
+ /// </summary>
+ public event EventHandler<UpdateParentEventArgs> UpdateParent;
+
}
}
\ No newline at end of file
diff --git a/DevApp/Gs.DevApp/UserControl/SelectCgMx.cs b/DevApp/Gs.DevApp/UserControl/SelectCgMx.cs
index 75bd7df..60ab5b4 100644
--- a/DevApp/Gs.DevApp/UserControl/SelectCgMx.cs
+++ b/DevApp/Gs.DevApp/UserControl/SelectCgMx.cs
@@ -59,7 +59,6 @@
getPageList(1);
getPageListSrm(1);
};
-
/////////
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView2, null, null, null, "", null, null, false);
getPageListSrm(1);
--
Gitblit v1.9.3