Change paasword form
i am developing a windows application. for which i have to make a change password form. i am using MS-access as my database. my table name is tbluserlogin and the fields are: userId, userRole, userStatus, userPwd, userConpwd.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Project
{
public partial class frmchangepassword : Form
{
public frmchangepassword()
{
InitializeComponent();
}
int userId;
string userName;
int userStatus;
string userRole;
string userPwd;
string userConPwd;
public void clearfields()
{
txtnewpwd.Text = "";
txtoldpwd.Text = "";
txtconfirmpwd.Text = "";
txtoldpwd.Focus();
}
private void frmchangepassword_Load(object sender, EventArgs e)
{
GetValue();
}
private void GetValue()
{
ConnectionClass l_ConnectionClass = new ConnectionClass();
DataSet l_changepwd = l_ConnectionClass.FetchDataInDataSet("select * from tbluserlogin where userName = '" + txtusername.Text.ToLower().Trim() + "' and userPwd = '" + txtpwd.Text.Trim() + "'");
}
private void btnupdate_Click(object sender, EventArgs e)
{
}
}
}
please help me out with this.
Danatas GerviPosted Sep 8, 2009, 12:27 PM
Example (correct it if something wrong):
1 User presses button "Change Password".
2 Form rises
3 On the form is old password data.
4 User changes the name and password.
5 User press on button "save"
6 Form closes, but before to do this - saves changes in DB...
:-)