Upload to server
uploading
This commit is contained in:
43
patientman/PatientMan/Forms/frmChangePass.cs
Normal file
43
patientman/PatientMan/Forms/frmChangePass.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml;
|
||||
|
||||
namespace PatientMan.Forms
|
||||
{
|
||||
public partial class frmChangePass : PatientMan.BasicForms.frmCommon
|
||||
{
|
||||
public frmChangePass()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void Cancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void OK_Click(object sender, EventArgs e)
|
||||
{
|
||||
if ((this.Password.Text != this.RePassword.Text) || (this.Password.Text.Length==0) || (this.RePassword.Text.Length==0))
|
||||
{
|
||||
MessageBox.Show("The input values are not the same or empty","Change Password",MessageBoxButtons.OK);
|
||||
}else
|
||||
{
|
||||
string savePassword= common.MD5Hash(Password.Text);
|
||||
var doc = new XmlDocument();
|
||||
string SettingsPath = Application.StartupPath + @"\Settings.fhi";
|
||||
|
||||
doc.Load(SettingsPath);
|
||||
doc.GetElementsByTagName("Password")[0].InnerText = savePassword;
|
||||
doc.Save(SettingsPath);
|
||||
(new frmShowSaveInfo()).Show();
|
||||
this.Close();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user