52 lines
1.4 KiB
C#
52 lines
1.4 KiB
C#
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;
|
|
using SOH.Kernel;
|
|
using SOH.BLL;
|
|
using EAS.Services;
|
|
|
|
namespace SOH.BasicSettings
|
|
{
|
|
[ModuleAttribute(ModuleID = "E4CF2B32-0483-4D6C-B950-AC5CAF9CE566", ModuleName = "密码修改")]
|
|
public partial class UpdatePass : SOH.Window.baseChildForm
|
|
{
|
|
public UpdatePass()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void UpdatePass_Load(object sender, EventArgs e)
|
|
{
|
|
lbusername.Text = LoginUser.username;
|
|
}
|
|
|
|
private void button1_Click(object sender, EventArgs e)
|
|
{
|
|
if (tbnewpass1.Text == tbnewpass2.Text)
|
|
{
|
|
|
|
|
|
var service = ServiceContainer.GetService<It_czygl>();
|
|
switch (service.UpdatePass(lbusername.Text, tboldpass.Text, tbnewpass1.Text).State)
|
|
{
|
|
case 1:
|
|
MessageBox.Show("原密码错误!");
|
|
break;
|
|
case 2:
|
|
MessageBox.Show("密码修改成功!");
|
|
break;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
MessageBox.Show("两次密码输入不相同!请核对后再修改密码。");
|
|
}
|
|
}
|
|
}
|
|
}
|