From 2b0bc7f13cf57e1c383a0547f3057e944de7ab7a Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期二, 10 十二月 2024 10:36:30 +0800
Subject: [PATCH] 111
---
DevApp/Gs.DevApp/DevFrm/Sys/Frm_PrintInfo.cs | 28 ++++++++++++++++++++--------
1 files changed, 20 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..42c9cf9 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;
@@ -100,7 +101,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 +158,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 +195,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 +246,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 +254,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