49 lines
1.5 KiB
C#
49 lines
1.5 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.ComponentModel;
|
|||
|
using System.Data;
|
|||
|
using System.Drawing;
|
|||
|
using System.Text;
|
|||
|
using System.Linq;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using System.Windows.Forms;
|
|||
|
using DevExpress.XtraEditors;
|
|||
|
using UI.Framework.Forms;
|
|||
|
|
|||
|
namespace Grant.Framework
|
|||
|
{
|
|||
|
public partial class ReplaceAuthorizeForm : BaseForm
|
|||
|
{
|
|||
|
public string cardname1 = string.Empty;
|
|||
|
public string cardname2 = string.Empty;
|
|||
|
|
|||
|
public ReplaceAuthorizeForm(string cardname)
|
|||
|
{
|
|||
|
InitializeComponent();
|
|||
|
textEdit1.Text = cardname;
|
|||
|
}
|
|||
|
|
|||
|
private void simpleButton2_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
this.DialogResult = DialogResult.No;
|
|||
|
}
|
|||
|
|
|||
|
private void simpleButton1_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
try
|
|||
|
{
|
|||
|
if (string.IsNullOrWhiteSpace(textEdit1.Text)) throw new Exception("对不起,原授权账号不能为空");
|
|||
|
if (string.IsNullOrWhiteSpace(textEdit2.Text)) throw new Exception("对不起,新授权账号不能为空");
|
|||
|
if (textEdit1.Text.Trim() == textEdit2.Text.Trim()) throw new Exception("对不起,更换授权时,两个参数不能一致");
|
|||
|
cardname1 = textEdit1.Text.Trim();
|
|||
|
cardname2 = textEdit2.Text.Trim();
|
|||
|
|
|||
|
this.DialogResult = DialogResult.OK;
|
|||
|
}
|
|||
|
catch (Exception ex)
|
|||
|
{
|
|||
|
ShowError(ex);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|