From bc993ff127b084e6411d61e6e7577d3d264c027b Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期六, 14 十二月 2024 17:21:30 +0800
Subject: [PATCH] 1
---
DevApp/Gs.DevApp/DevFrm/Sys/Frm_PrintInfo.cs | 29 +++++++++++++++++++++--------
1 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/Sys/Frm_PrintInfo.cs b/DevApp/Gs.DevApp/DevFrm/Sys/Frm_PrintInfo.cs
index 2ae8ef1..56f3a00 100644
--- a/DevApp/Gs.DevApp/DevFrm/Sys/Frm_PrintInfo.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Sys/Frm_PrintInfo.cs
@@ -6,6 +6,7 @@
using System;
using System.Collections.Generic;
using System.Data;
+using System.Net;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -90,6 +91,7 @@
private void ToolBarMenu1_btnEscClick(object sender, EventArgs e)
{
UtilityHelper.JumpToTab(xtraTabControl1, 0);
+ getPageList(pageBar1.CurrentPage);
}
/// <summary>
@@ -100,7 +102,7 @@
private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e)
{
string rowGuid = "", rowName = "";
- (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_printNo, gridView1);
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_printNo, gridView1);
if (string.IsNullOrEmpty(rowGuid))
{
ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
@@ -157,7 +159,7 @@
private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e)
{
string rowGuid = "", rowName = "";
- (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_printNo, gridView1);
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_printNo, gridView1);
if (string.IsNullOrEmpty(rowGuid))
{
ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
@@ -194,21 +196,32 @@
if (string.IsNullOrEmpty(txt_ip.Text.Trim()))
{
Gs.DevApp.ToolBox.MsgHelper.Warning("IP涓嶈兘涓虹┖锛�");
- txt_printNo.Focus();
+ txt_ip.Focus();
return;
}
if (string.IsNullOrEmpty(txt_port.Text.Trim()))
{
Gs.DevApp.ToolBox.MsgHelper.Warning("绔彛涓嶈兘涓虹┖锛�");
- txt_printNo.Focus();
+ txt_port.Focus();
+ return;
+ }
+ try
+ {
+ IPAddress.Parse(txt_ip.Text);
+ }
+ catch
+ {
+ txt_ip.Text = "";
+ MessageBox.Show("璇疯緭鍏ユ纭殑IP鍦板潃");
+ txt_ip.Focus();
return;
}
var _obj = new PrintInfo
{
Guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓
- PrintNo= txt_printNo.Text.Trim(),
+ PrintNo = txt_printNo.Text.Trim(),
Ip = txt_ip.Text.Trim(),
- Port= txt_port.Text.Trim(),
+ Port = txt_port.Text.Trim(),
Remark = txt_remark.Text.Trim(),
};
try
@@ -234,7 +247,7 @@
/// </summary>
/// <param name="curPage">绗嚑椤�</param>
/// <param name="pageSize">姣忛〉鍑犳潯</param>
- private void getPageList(int curPage)
+ private void getPageList(int curPage)
{
var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "a.print_no",
@@ -242,7 +255,7 @@
var json = JsonConvert.SerializeObject(pgq);
try
{
- var strReturn = UtilityHelper.HttpPost("",
+ var strReturn = UtilityHelper.HttpPost("",
_webServiceName + "GetListPage", json);
var dd = UtilityHelper.ReturnToTablePage(strReturn);
if (dd.rtnCode > 0)
--
Gitblit v1.9.3