AutoPackage/AutoPekage/frmStmpServer.cs
2017-02-05 15:30:23 +08:00

36 lines
1.0 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace AutoPekage
{
public partial class frmStmpServer : Form
{
public frmStmpServer()
{
InitializeComponent();
}
private void btnOK_Click(object sender, EventArgs e)
{
if (LiteDbHelper.GetAllStmpServer().Where(x => x.Stmp == txtStmpAddr.Text || x.ServerName == txtServerName.Text).Count() > 0)
{
MessageBox.Show("stmp地址或发信服务器名字已经存在请检查!", "自动打包", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
LiteDbHelper.AddStmpServer(txtServerName.Text, txtStmpAddr.Text);
this.DialogResult = DialogResult.OK;
}
private void btnCencel_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
}
}
}