1 |
// UserEditDialog.cpp : implementation file |
/* |
2 |
// |
* Developed by Torben H. Nielsen |
3 |
|
*/ |
4 |
|
|
5 |
#include "stdafx.h" |
#include "stdafx.h" |
6 |
#include "h6-udlånssystem.h" |
#include "h6-udlånssystem.h" |
60 |
|
|
61 |
void UserEditDialog::OnBnClickedAdmin() |
void UserEditDialog::OnBnClickedAdmin() |
62 |
{ |
{ |
63 |
if (((CButton*)GetDlgItem(IDC_ADMIN))->GetCheck() == true) { |
if (((CButton*)GetDlgItem(IDC_ADMIN))->GetCheck() == BST_CHECKED) { |
64 |
GetDlgItem(IDC_PASSWORD1)->EnableWindow(true); |
GetDlgItem(IDC_PASSWORD1)->EnableWindow(true); |
65 |
GetDlgItem(IDC_PASSWORD2)->EnableWindow(true); |
GetDlgItem(IDC_PASSWORD2)->EnableWindow(true); |
66 |
} else { //not checked |
} else { //not checked |
78 |
GetDlgItem(IDC_PASSWORD1)->GetWindowText(password1); |
GetDlgItem(IDC_PASSWORD1)->GetWindowText(password1); |
79 |
GetDlgItem(IDC_PASSWORD2)->GetWindowText(password2); |
GetDlgItem(IDC_PASSWORD2)->GetWindowText(password2); |
80 |
|
|
81 |
isAdmin = ((CButton*)GetDlgItem(IDC_ADMIN))->GetCheck(); |
isAdmin = ( ((CButton*)GetDlgItem(IDC_ADMIN))->GetCheck() == BST_CHECKED); |
82 |
|
|
83 |
if (inits == "" || name == "") { |
if (inits == "" || name == "") { |
84 |
MessageBox("You must enter initials and name", "Edit User"); |
MessageBox("You must enter initials and name", "Edit User"); |