From 72394a31b491cb19fc67b479dde1eaed68bc0288 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期四, 08 五月 2025 07:42:54 +0800
Subject: [PATCH] 打印
---
DevApp/Gs.DevApp/UserControl/ShowLogcs.cs | 43 ++++++++++++-------------------------------
1 files changed, 12 insertions(+), 31 deletions(-)
diff --git a/DevApp/Gs.DevApp/UserControl/ShowLogcs.cs b/DevApp/Gs.DevApp/UserControl/ShowLogcs.cs
index 8c20122..5eb1ec0 100644
--- a/DevApp/Gs.DevApp/UserControl/ShowLogcs.cs
+++ b/DevApp/Gs.DevApp/UserControl/ShowLogcs.cs
@@ -1,43 +1,28 @@
-锘縰sing DevExpress.XtraEditors;
-using Gs.DevApp.Entity;
+锘縰sing Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Newtonsoft.Json;
using System;
-using System.Collections.Generic;
-using System.ComponentModel;
using System.Data;
-using System.Drawing;
-using System.Linq;
using System.Text;
-using System.Threading.Tasks;
using System.Windows.Forms;
namespace Gs.DevApp.UserControl
{
public partial class ShowLogcs : DevExpress.XtraEditors.XtraForm
{
- public ShowLogcs()
+
+ public string guidKey;
+ public ShowLogcs(string _guidKey)
{
+ this.guidKey = _guidKey;
InitializeComponent();
- getPageList(1, UtilityHelper.GetPageSize());
- pageBar1.PagerEvent += PageBar1_PagerEvent;
- gridView1.IndicatorWidth = 50;
- gridView1.CustomDrawRowIndicator += (s, e) =>
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, null, "", (value) =>
{
- if (e.Info.IsRowIndicator && e.RowHandle >= 0)
- e.Info.DisplayText = (e.RowHandle + 1).ToString();
- };
+
+ }, null, false);
+ getPageList(1, UtilityHelper.GetPageSize());
}
- /// <summary>
- /// 鍒嗛〉浜嬩欢
- /// </summary>
- /// <param name="curPage"></param>
- /// <param name="pageSize"></param>
- private void PageBar1_PagerEvent(int curPage, int pageSize)
- {
- getPageList(curPage, pageSize);
- }
/// <summary>
/// </summary>
@@ -46,7 +31,8 @@
private void getPageList(int curPage, int pageSize)
{
var _sbSqlWhere = new StringBuilder();
- var pgq = new PageQueryModel(curPage, pageSize, "OPERATION_TIME",
+ _sbSqlWhere.Append(" and ABT_GUID='" + this.guidKey + "'");
+ var pgq = new PageQueryModel(curPage, 999999, "OPERATION_TIME",
"desc", "", _sbSqlWhere.ToString());
var json = JsonConvert.SerializeObject(pgq);
try
@@ -60,12 +46,7 @@
gcMain.BindingContext = new BindingContext();
gcMain.DataSource = dt;
gcMain.ForceInitialize();
- int dddd = dd.rtnData.pages;//鎬婚〉
- pageBar1.TotalPages = dddd;
- pageBar1.RecordCount = dd.rtnData.total;//璁板綍鎬绘暟
- pageBar1.CurrentPage = curPage;//褰撳墠椤�
- pageBar1.RowsCount = pageSize;//姣忛〉鏄剧ず
- pageBar1.setTxt();
+ gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1);
}
else
{
--
Gitblit v1.9.3