提交当前本机整理版本

This commit is contained in:
cyf
2026-07-02 10:11:39 +00:00
parent c10a5d64c7
commit aacefa24f8
822 changed files with 196665 additions and 14263 deletions
+36 -1
View File
@@ -74,4 +74,39 @@ namespace Lskj.PubBill
}
bool Is
bool IsDigitsOnly(string input)
{
foreach (char c in input)
{
if (!char.IsDigit(c))
return false;
}
return true;
}
private void txtEdit_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
string text = this.txtEdit.Text;
if (string.IsNullOrWhiteSpace(text)) return;
if (!this.IsDigitsOnly(text))
{
MessageUtil.Show("请输入数字");
}
if (int.Parse(text) > 0)
{
this.Quantity = int.Parse(text);
this.Close();
this.DialogResult = System.Windows.Forms.DialogResult.OK;
}
else
{
MessageUtil.Show("请检查输入数量");
}
}
}
}
}