/[H6]/UserEditDialog.cpp
ViewVC logotype

Diff of /UserEditDialog.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 9 by torben, Wed Aug 30 21:57:57 2006 UTC revision 61 by torben, Mon Oct 22 13:01:08 2007 UTC
# Line 1  Line 1 
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"
# Line 59  BOOL UserEditDialog::OnInitDialog() Line 60  BOOL UserEditDialog::OnInitDialog()
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
# Line 77  void UserEditDialog::OnBnClickedOk() Line 78  void UserEditDialog::OnBnClickedOk()
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");

Legend:
Removed from v.9  
changed lines
  Added in v.61

  ViewVC Help
Powered by ViewVC 1.1.20