I have to do a form for new user in my project
I do not know what is wrong with it !!!! this is the method
private void NewUserMethod()
{
try
{
NewUserTbl newUserTbl = new NewUserTbl();
newUserTbl.FName = txtFName.Text;
newUserTbl.LName = txtLName.Text;
newUserTbl.UserName = txtUserName.Text;
newUserTbl.NewPassword = txtPass.Text;
newUserTbl.ConfirmPassword = txtAgainPass.Text;
txtFName.Text = "";
txtLName.Text = "";
txtUserName.Text = "";
txtPass.Text = "";
txtAgainPass.Text = "";
if (txtPass == txtAgainPass)
{
DB_Admin.NewUserTbls.InsertOnSubmit(newUserTbl);
DB_Admin.SubmitChanges();
MessageBox.Show("new user created");
}
else
{
MessageBox.Show("Wrong Password");
}
}
catch(Exception)
{
MessageBox.Show("You entered wrong data");
}
I need help I'm new at c# programming!!!!
Aucun commentaire:
Enregistrer un commentaire