基线 SVN r240
SVN-Revision: r240
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
using Lskj.Control;
|
||||
using Lskj.Core;
|
||||
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 Lskj.PubPdfSign
|
||||
{
|
||||
public partial class FrmAdd : BaseForm
|
||||
{
|
||||
public FrmAdd()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.Load += OnFrmAddLoad;
|
||||
}
|
||||
/// <summary>
|
||||
/// 初始化控件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void OnFrmAddLoad(object sender, EventArgs e)
|
||||
{
|
||||
this.btn_Ok.Click += OnBtnOkClick;
|
||||
this.btn_Cancel.Click += OnBtnCancelClick;
|
||||
}
|
||||
/// <summary>
|
||||
/// 取消
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void OnBtnCancelClick(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
this.Close();
|
||||
}
|
||||
/// <summary>
|
||||
/// 确定
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void OnBtnOkClick(object sender, EventArgs e)
|
||||
{
|
||||
string selectSql = $"select id from P_SignTempTable where versionName = '{VersionName}'";
|
||||
string id = SqlHelper.ExecuteScalar(selectSql) + "";
|
||||
if (string.IsNullOrWhiteSpace(VersionName))
|
||||
{
|
||||
MessageUtil.Show("版本名称不能为空");
|
||||
return;
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(id))
|
||||
{
|
||||
MessageUtil.Show("该版本名称已存在,请重新输入");
|
||||
return;
|
||||
}
|
||||
DialogResult = DialogResult.OK;
|
||||
this.Close();
|
||||
}
|
||||
/// <summary>
|
||||
/// 文件名
|
||||
/// </summary>
|
||||
public string FileName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.txt_FileName.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.txt_FileName.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 文件版本
|
||||
/// </summary>
|
||||
public string VersionName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.txt_VersionName.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.txt_VersionName.Text = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user