Compare commits

...

2 Commits

7 changed files with 169 additions and 162 deletions

View File

@ -103,8 +103,8 @@ namespace INT69DC_7C.Controls
this.labelID.Text = item.ID; this.labelID.Text = item.ID;
this.labelPassword.Text = item.Password; this.labelPassword.Text = item.Password;
this.labelExpireAccountDate.Text = string.Format("{0:yyyy/MM/dd} ~ {1:yyyy/MM/dd}", item.DateRegister, item.DateExpireRegister); this.labelExpireAccountDate.Text = string.Format("{0:yyyy/MM/dd} ~ {1:yyyy/MM/dd}", item.DatePasswordLogin, item.DateIdExpire);
this.labelExpirePasswordDate.Text = string.Format("{0:yyyy/MM/dd} ~ {1:yyyy/MM/dd}", item.DateLogin, item.DateExpireLogin); this.labelExpirePasswordDate.Text = string.Format("{0:yyyy/MM/dd} ~ {1:yyyy/MM/dd}", item.DateIdRegister, item.DatePasswordExpire);
this.labelStatusExpireAccount.Visible = item.IsLockAccount; this.labelStatusExpireAccount.Visible = item.IsLockAccount;
this.labelStatusExpirePassword.Visible = item.IsLockPassword; this.labelStatusExpirePassword.Visible = item.IsLockPassword;
} }

View File

@ -164,20 +164,20 @@ namespace INT69DC_7C.DialogForms
this.ParentForm.SystemConfig.CurrentUser.ID = userInfo.user_id; this.ParentForm.SystemConfig.CurrentUser.ID = userInfo.user_id;
this.ParentForm.SystemConfig.CurrentUser.Password = userInfo.user_pw; this.ParentForm.SystemConfig.CurrentUser.Password = userInfo.user_pw;
this.ParentForm.SystemConfig.CurrentUser.ExpireAccount = userInfo.expire_period_account; this.ParentForm.SystemConfig.CurrentUser.ExpireId = userInfo.id_expire_period;
this.ParentForm.SystemConfig.CurrentUser.ExpirePassword = userInfo.expire_period_pw; this.ParentForm.SystemConfig.CurrentUser.ExpirePassword = userInfo.password_expire_period;
DateTime time = DateTime.ParseExact(userInfo.register_date.GetDateTime(), "yyyyMMddHHmmss", null); DateTime time = DateTime.ParseExact(userInfo.password_login_date.GetDateTime(), "yyyyMMddHHmmss", null);
this.ParentForm.SystemConfig.CurrentUser.DateRegister = time; this.ParentForm.SystemConfig.CurrentUser.DatePasswordLogin = time;
time = DateTime.ParseExact(userInfo.login_date.GetDateTime(), "yyyyMMddHHmmss", null); time = DateTime.ParseExact(userInfo.id_register_date.GetDateTime(), "yyyyMMddHHmmss", null);
this.ParentForm.SystemConfig.CurrentUser.DateLogin = time; this.ParentForm.SystemConfig.CurrentUser.DateIdRegister = time;
time = DateTime.ParseExact(userInfo.expire_account_date.GetDateTime(), "yyyyMMddHHmmss", null); time = DateTime.ParseExact(userInfo.id_expire_date.GetDateTime(), "yyyyMMddHHmmss", null);
this.ParentForm.SystemConfig.CurrentUser.DateExpireRegister = time; this.ParentForm.SystemConfig.CurrentUser.DateIdExpire = time;
time = DateTime.ParseExact(userInfo.expire_register_date.GetDateTime(), "yyyyMMddHHmmss", null); time = DateTime.ParseExact(userInfo.password_expire_date.GetDateTime(), "yyyyMMddHHmmss", null);
this.ParentForm.SystemConfig.CurrentUser.DateExpireLogin = time; this.ParentForm.SystemConfig.CurrentUser.DatePasswordExpire = time;
this.ParentForm.SystemConfig.CurrentUser.IsLockAccount = userInfo.flock_status_account == 0 ? false : true; this.ParentForm.SystemConfig.CurrentUser.IsLockAccount = userInfo.id_flock_status == 0 ? false : true;
this.ParentForm.SystemConfig.CurrentUser.IsLockPassword = userInfo.flock_status_password == 0 ? false : true; this.ParentForm.SystemConfig.CurrentUser.IsLockPassword = userInfo.password_flock_status == 0 ? false : true;
this.ParentForm.SystemConfig.CurrentUser.IsAdmin = userInfo.fadmin == 0 ? false : true; this.ParentForm.SystemConfig.CurrentUser.IsAdmin = userInfo.fadmin == 0 ? false : true;
this.ParentForm.SystemConfig.CurrentUser.ActiveLevel = userInfo.active_level; this.ParentForm.SystemConfig.CurrentUser.ActiveLevel = userInfo.active_level;
#endregion #endregion
@ -271,20 +271,20 @@ namespace INT69DC_7C.DialogForms
this.ParentForm.SystemConfig.CurrentUser.ID = userInfo.user_id; this.ParentForm.SystemConfig.CurrentUser.ID = userInfo.user_id;
this.ParentForm.SystemConfig.CurrentUser.Password = userInfo.user_pw; this.ParentForm.SystemConfig.CurrentUser.Password = userInfo.user_pw;
this.ParentForm.SystemConfig.CurrentUser.ExpireAccount = userInfo.expire_period_account; this.ParentForm.SystemConfig.CurrentUser.ExpireId = userInfo.id_expire_period;
this.ParentForm.SystemConfig.CurrentUser.ExpirePassword = userInfo.expire_period_pw; this.ParentForm.SystemConfig.CurrentUser.ExpirePassword = userInfo.password_expire_period;
DateTime time = DateTime.ParseExact(userInfo.register_date.GetDateTime(), "yyyyMMddHHmmss", null); DateTime time = DateTime.ParseExact(userInfo.password_login_date.GetDateTime(), "yyyyMMddHHmmss", null);
this.ParentForm.SystemConfig.CurrentUser.DateRegister = time; this.ParentForm.SystemConfig.CurrentUser.DatePasswordLogin = time;
time = DateTime.ParseExact(userInfo.login_date.GetDateTime(), "yyyyMMddHHmmss", null); time = DateTime.ParseExact(userInfo.id_register_date.GetDateTime(), "yyyyMMddHHmmss", null);
this.ParentForm.SystemConfig.CurrentUser.DateLogin = time; this.ParentForm.SystemConfig.CurrentUser.DateIdRegister = time;
time = DateTime.ParseExact(userInfo.expire_account_date.GetDateTime(), "yyyyMMddHHmmss", null); time = DateTime.ParseExact(userInfo.id_expire_date.GetDateTime(), "yyyyMMddHHmmss", null);
this.ParentForm.SystemConfig.CurrentUser.DateExpireRegister = time; this.ParentForm.SystemConfig.CurrentUser.DateIdExpire = time;
time = DateTime.ParseExact(userInfo.expire_register_date.GetDateTime(), "yyyyMMddHHmmss", null); time = DateTime.ParseExact(userInfo.password_expire_date.GetDateTime(), "yyyyMMddHHmmss", null);
this.ParentForm.SystemConfig.CurrentUser.DateExpireLogin = time; this.ParentForm.SystemConfig.CurrentUser.DatePasswordExpire = time;
this.ParentForm.SystemConfig.CurrentUser.IsLockAccount = userInfo.flock_status_account == 0 ? false : true; this.ParentForm.SystemConfig.CurrentUser.IsLockAccount = userInfo.id_flock_status == 0 ? false : true;
this.ParentForm.SystemConfig.CurrentUser.IsLockPassword = userInfo.flock_status_password == 0 ? false : true; this.ParentForm.SystemConfig.CurrentUser.IsLockPassword = userInfo.password_flock_status == 0 ? false : true;
this.ParentForm.SystemConfig.CurrentUser.IsAdmin = userInfo.fadmin == 0 ? false : true; this.ParentForm.SystemConfig.CurrentUser.IsAdmin = userInfo.fadmin == 0 ? false : true;
this.ParentForm.SystemConfig.CurrentUser.ActiveLevel = userInfo.active_level; this.ParentForm.SystemConfig.CurrentUser.ActiveLevel = userInfo.active_level;
#endregion #endregion

View File

@ -244,38 +244,38 @@ namespace INT69DC_7C.DialogForms
this.ParentForm.SystemConfig.CurrentUser.ID = user.user_id; this.ParentForm.SystemConfig.CurrentUser.ID = user.user_id;
this.ParentForm.SystemConfig.CurrentUser.Password = user.user_pw; this.ParentForm.SystemConfig.CurrentUser.Password = user.user_pw;
this.ParentForm.SystemConfig.CurrentUser.ExpireAccount = user.expire_period_account; this.ParentForm.SystemConfig.CurrentUser.ExpireId = user.id_expire_period;
this.ParentForm.SystemConfig.CurrentUser.ExpirePassword = user.expire_period_pw; this.ParentForm.SystemConfig.CurrentUser.ExpirePassword = user.password_expire_period;
// console // console
Console.WriteLine(user.register_date.GetDateTime()); Console.WriteLine(user.password_login_date.GetDateTime());
DateTime time = DateTime.ParseExact(user.register_date.GetDateTime(), "yyyyMMddHHmmss", null); DateTime time = DateTime.ParseExact(user.password_login_date.GetDateTime(), "yyyyMMddHHmmss", null);
this.ParentForm.SystemConfig.CurrentUser.DateRegister = time; this.ParentForm.SystemConfig.CurrentUser.DatePasswordLogin = time;
// console // console
Console.WriteLine(user.login_date.GetDateTime()); Console.WriteLine(user.id_register_date.GetDateTime());
time = DateTime.ParseExact(user.login_date.GetDateTime(), "yyyyMMddHHmmss", null); time = DateTime.ParseExact(user.id_register_date.GetDateTime(), "yyyyMMddHHmmss", null);
this.ParentForm.SystemConfig.CurrentUser.DateLogin = time; this.ParentForm.SystemConfig.CurrentUser.DateIdRegister = time;
if (this.ParentForm.SystemConfig.CurrentUser.Group == DataStore.UserGroup.Admin if (this.ParentForm.SystemConfig.CurrentUser.Group == DataStore.UserGroup.Admin
|| this.ParentForm.SystemConfig.CurrentUser.Group == DataStore.UserGroup.Developer) || this.ParentForm.SystemConfig.CurrentUser.Group == DataStore.UserGroup.Developer)
{ {
this.ParentForm.SystemConfig.CurrentUser.DateExpireRegister = DateTime.Now; this.ParentForm.SystemConfig.CurrentUser.DateIdExpire = DateTime.Now;
this.ParentForm.SystemConfig.CurrentUser.DateExpireLogin = DateTime.Now; this.ParentForm.SystemConfig.CurrentUser.DatePasswordExpire = DateTime.Now;
} }
else else
{ {
// console // console
Console.WriteLine(user.expire_account_date.GetDateTime()); Console.WriteLine(user.id_expire_date.GetDateTime());
time = DateTime.ParseExact(user.expire_account_date.GetDateTime(), "yyyyMMddHHmmss", null); time = DateTime.ParseExact(user.id_expire_date.GetDateTime(), "yyyyMMddHHmmss", null);
this.ParentForm.SystemConfig.CurrentUser.DateExpireLogin = time; this.ParentForm.SystemConfig.CurrentUser.DatePasswordExpire = time;
// console // console
Console.WriteLine(user.expire_register_date.GetDateTime()); Console.WriteLine(user.password_expire_date.GetDateTime());
time = DateTime.ParseExact(user.expire_register_date.GetDateTime(), "yyyyMMddHHmmss", null); time = DateTime.ParseExact(user.password_expire_date.GetDateTime(), "yyyyMMddHHmmss", null);
this.ParentForm.SystemConfig.CurrentUser.DateExpireRegister = time; this.ParentForm.SystemConfig.CurrentUser.DateIdExpire = time;
} }
this.ParentForm.SystemConfig.CurrentUser.IsLockAccount = user.flock_status_account == 0 ? false : true; this.ParentForm.SystemConfig.CurrentUser.IsLockAccount = user.id_flock_status == 0 ? false : true;
this.ParentForm.SystemConfig.CurrentUser.IsLockPassword = user.flock_status_password == 0 ? false : true; this.ParentForm.SystemConfig.CurrentUser.IsLockPassword = user.password_flock_status == 0 ? false : true;
if (this.ParentForm.SystemConfig.IsPart11 == true) if (this.ParentForm.SystemConfig.IsPart11 == true)
this.ParentForm.SystemConfig.CurrentUser.IsAdmin = user.fadmin == 0 ? false : true; this.ParentForm.SystemConfig.CurrentUser.IsAdmin = user.fadmin == 0 ? false : true;

View File

@ -956,25 +956,25 @@ namespace INT69DC_7C.Forms
this.ParentForm.SystemConfig.CurrentUser.ID = userInfo.user_id; this.ParentForm.SystemConfig.CurrentUser.ID = userInfo.user_id;
this.ParentForm.SystemConfig.CurrentUser.Password = userInfo.user_pw; this.ParentForm.SystemConfig.CurrentUser.Password = userInfo.user_pw;
this.ParentForm.SystemConfig.CurrentUser.ExpireAccount = userInfo.expire_period_account; this.ParentForm.SystemConfig.CurrentUser.ExpireId = userInfo.id_expire_period;
this.ParentForm.SystemConfig.CurrentUser.ExpirePassword = userInfo.expire_period_pw; this.ParentForm.SystemConfig.CurrentUser.ExpirePassword = userInfo.password_expire_period;
Console.WriteLine(userInfo.register_date.GetDateTime()); Console.WriteLine(userInfo.password_login_date.GetDateTime());
Console.WriteLine(userInfo.login_date.GetDateTime()); Console.WriteLine(userInfo.id_register_date.GetDateTime());
Console.WriteLine(userInfo.expire_account_date.GetDateTime()); Console.WriteLine(userInfo.id_expire_date.GetDateTime());
Console.WriteLine(userInfo.expire_register_date.GetDateTime()); Console.WriteLine(userInfo.password_expire_date.GetDateTime());
DateTime time = DateTime.ParseExact(userInfo.register_date.GetDateTime(), "yyyyMMddHHmmss", null); DateTime time = DateTime.ParseExact(userInfo.password_login_date.GetDateTime(), "yyyyMMddHHmmss", null);
this.ParentForm.SystemConfig.CurrentUser.DateRegister = time; this.ParentForm.SystemConfig.CurrentUser.DatePasswordLogin = time;
time = DateTime.ParseExact(userInfo.login_date.GetDateTime(), "yyyyMMddHHmmss", null); time = DateTime.ParseExact(userInfo.id_register_date.GetDateTime(), "yyyyMMddHHmmss", null);
this.ParentForm.SystemConfig.CurrentUser.DateLogin = time; this.ParentForm.SystemConfig.CurrentUser.DateIdRegister = time;
time = DateTime.ParseExact(userInfo.expire_account_date.GetDateTime(), "yyyyMMddHHmmss", null); time = DateTime.ParseExact(userInfo.id_expire_date.GetDateTime(), "yyyyMMddHHmmss", null);
this.ParentForm.SystemConfig.CurrentUser.DateExpireRegister = time; this.ParentForm.SystemConfig.CurrentUser.DateIdExpire = time;
time = DateTime.ParseExact(userInfo.expire_register_date.GetDateTime(), "yyyyMMddHHmmss", null); time = DateTime.ParseExact(userInfo.password_expire_date.GetDateTime(), "yyyyMMddHHmmss", null);
this.ParentForm.SystemConfig.CurrentUser.DateExpireLogin = time; this.ParentForm.SystemConfig.CurrentUser.DatePasswordExpire = time;
this.ParentForm.SystemConfig.CurrentUser.IsLockAccount = userInfo.flock_status_account == 0 ? false : true; this.ParentForm.SystemConfig.CurrentUser.IsLockAccount = userInfo.id_flock_status == 0 ? false : true;
this.ParentForm.SystemConfig.CurrentUser.IsLockPassword = userInfo.flock_status_password == 0 ? false : true; this.ParentForm.SystemConfig.CurrentUser.IsLockPassword = userInfo.password_flock_status == 0 ? false : true;
this.ParentForm.SystemConfig.CurrentUser.IsAdmin = userInfo.fadmin == 0 ? false : true; this.ParentForm.SystemConfig.CurrentUser.IsAdmin = userInfo.fadmin == 0 ? false : true;
@ -2415,20 +2415,20 @@ namespace INT69DC_7C.Forms
this.ParentForm.SystemConfig.CurrentUser.ID = userInfo.user_id; this.ParentForm.SystemConfig.CurrentUser.ID = userInfo.user_id;
this.ParentForm.SystemConfig.CurrentUser.Password = userInfo.user_pw; this.ParentForm.SystemConfig.CurrentUser.Password = userInfo.user_pw;
this.ParentForm.SystemConfig.CurrentUser.ExpireAccount = userInfo.expire_period_account; this.ParentForm.SystemConfig.CurrentUser.ExpireId = userInfo.id_expire_period;
this.ParentForm.SystemConfig.CurrentUser.ExpirePassword = userInfo.expire_period_pw; this.ParentForm.SystemConfig.CurrentUser.ExpirePassword = userInfo.password_expire_period;
DateTime time = DateTime.ParseExact(userInfo.register_date.GetDateTime(), "yyyyMMddHHmmss", null); DateTime time = DateTime.ParseExact(userInfo.password_login_date.GetDateTime(), "yyyyMMddHHmmss", null);
this.ParentForm.SystemConfig.CurrentUser.DateRegister = time; this.ParentForm.SystemConfig.CurrentUser.DatePasswordLogin = time;
time = DateTime.ParseExact(userInfo.login_date.GetDateTime(), "yyyyMMddHHmmss", null); time = DateTime.ParseExact(userInfo.id_register_date.GetDateTime(), "yyyyMMddHHmmss", null);
this.ParentForm.SystemConfig.CurrentUser.DateLogin = time; this.ParentForm.SystemConfig.CurrentUser.DateIdRegister = time;
time = DateTime.ParseExact(userInfo.expire_account_date.GetDateTime(), "yyyyMMddHHmmss", null); time = DateTime.ParseExact(userInfo.id_expire_date.GetDateTime(), "yyyyMMddHHmmss", null);
this.ParentForm.SystemConfig.CurrentUser.DateExpireRegister = time; this.ParentForm.SystemConfig.CurrentUser.DateIdExpire = time;
time = DateTime.ParseExact(userInfo.expire_register_date.GetDateTime(), "yyyyMMddHHmmss", null); time = DateTime.ParseExact(userInfo.password_expire_date.GetDateTime(), "yyyyMMddHHmmss", null);
this.ParentForm.SystemConfig.CurrentUser.DateExpireLogin = time; this.ParentForm.SystemConfig.CurrentUser.DatePasswordExpire = time;
this.ParentForm.SystemConfig.CurrentUser.IsLockAccount = userInfo.flock_status_account == 0 ? false : true; this.ParentForm.SystemConfig.CurrentUser.IsLockAccount = userInfo.id_flock_status == 0 ? false : true;
this.ParentForm.SystemConfig.CurrentUser.IsLockPassword = userInfo.flock_status_password == 0 ? false : true; this.ParentForm.SystemConfig.CurrentUser.IsLockPassword = userInfo.password_flock_status == 0 ? false : true;
this.ParentForm.SystemConfig.CurrentUser.IsAdmin = userInfo.fadmin == 0 ? false : true; this.ParentForm.SystemConfig.CurrentUser.IsAdmin = userInfo.fadmin == 0 ? false : true;

View File

@ -265,7 +265,7 @@ namespace INT69DC_7C.Forms
item.ID = this.labelID.Text; item.ID = this.labelID.Text;
item.Password = this.labelPassword.Text; item.Password = this.labelPassword.Text;
item.ExpireAccount = int.Parse(this.labelExpiryDateOfAccount.Text); item.ExpireId = int.Parse(this.labelExpiryDateOfAccount.Text);
item.ExpirePassword = int.Parse(this.labelExpiryDateOfPassword.Text); item.ExpirePassword = int.Parse(this.labelExpiryDateOfPassword.Text);
//item.IsAdmin = this.cbAdministrator.Checked; //item.IsAdmin = this.cbAdministrator.Checked;
@ -287,13 +287,13 @@ namespace INT69DC_7C.Forms
if (isNewReg == true) if (isNewReg == true)
{ {
#region 신규 등록 #region 신규 등록
UserManager.UserManager_UserNew(item.ID, item.Password, item.IsAdmin == false ? 0 : 1, item.ExpirePassword, item.ExpireAccount, item.ActiveLevel, menuId); UserManager.UserManager_UserNew(item.ID, item.Password, item.IsAdmin == false ? 0 : 1, item.ExpirePassword, item.ExpireId, item.ActiveLevel, menuId);
#endregion #endregion
} }
else else
{ {
#region 유저 수정 #region 유저 수정
UserManager.UserManager_UserModify(item.ID, item.Password, item.IsAdmin == false ? 0 : 1, item.ExpirePassword, item.ExpireAccount, item.ActiveLevel, menuId); UserManager.UserManager_UserModify(item.ID, item.Password, item.IsAdmin == false ? 0 : 1, item.ExpirePassword, item.ExpireId, item.ActiveLevel, menuId);
#endregion #endregion
} }
@ -514,8 +514,8 @@ namespace INT69DC_7C.Forms
this.SelectedUserItem.ID = item.user_id; this.SelectedUserItem.ID = item.user_id;
this.SelectedUserItem.Password = item.user_pw; this.SelectedUserItem.Password = item.user_pw;
this.SelectedUserItem.ExpireAccount = item.expire_period_account; this.SelectedUserItem.ExpireId = item.id_expire_period;
this.SelectedUserItem.ExpirePassword = item.expire_period_pw; this.SelectedUserItem.ExpirePassword = item.password_expire_period;
this.SelectedUserItem.ActiveLevel = item.active_level; this.SelectedUserItem.ActiveLevel = item.active_level;
if (this.SelectedUserItem.ActiveLevel == 1) if (this.SelectedUserItem.ActiveLevel == 1)
@ -535,29 +535,29 @@ namespace INT69DC_7C.Forms
if (this.SelectedUserItem.Group == DataStore.UserGroup.Admin if (this.SelectedUserItem.Group == DataStore.UserGroup.Admin
|| this.SelectedUserItem.Group == DataStore.UserGroup.Developer) || this.SelectedUserItem.Group == DataStore.UserGroup.Developer)
{ {
Console.WriteLine(item.register_date.GetDateTime()); Console.WriteLine(item.password_login_date.GetDateTime());
Console.WriteLine(item.login_date.GetDateTime()); Console.WriteLine(item.id_register_date.GetDateTime());
Console.WriteLine(item.expire_account_date.GetDateTime()); Console.WriteLine(item.id_expire_date.GetDateTime());
Console.WriteLine(item.expire_register_date.GetDateTime()); Console.WriteLine(item.password_expire_date.GetDateTime());
this.SelectedUserItem.DateRegister = DateTime.Now; this.SelectedUserItem.DatePasswordLogin = DateTime.Now;
this.SelectedUserItem.DateLogin = DateTime.Now; this.SelectedUserItem.DateIdRegister = DateTime.Now;
this.SelectedUserItem.DateExpireRegister = DateTime.Now; this.SelectedUserItem.DateIdExpire = DateTime.Now;
this.SelectedUserItem.DateExpireLogin = DateTime.Now; this.SelectedUserItem.DatePasswordExpire = DateTime.Now;
} }
else else
{ {
DateTime time = DateTime.ParseExact(item.register_date.GetDateTime(), "yyyyMMddHHmmss", null); DateTime time = DateTime.ParseExact(item.password_login_date.GetDateTime(), "yyyyMMddHHmmss", null);
this.SelectedUserItem.DateRegister = time; this.SelectedUserItem.DatePasswordLogin = time;
time = DateTime.ParseExact(item.login_date.GetDateTime(), "yyyyMMddHHmmss", null); time = DateTime.ParseExact(item.id_register_date.GetDateTime(), "yyyyMMddHHmmss", null);
this.SelectedUserItem.DateLogin = time; this.SelectedUserItem.DateIdRegister = time;
time = DateTime.ParseExact(item.expire_account_date.GetDateTime(), "yyyyMMddHHmmss", null); time = DateTime.ParseExact(item.id_expire_date.GetDateTime(), "yyyyMMddHHmmss", null);
this.SelectedUserItem.DateExpireRegister = time; this.SelectedUserItem.DateIdExpire = time;
time = DateTime.ParseExact(item.expire_register_date.GetDateTime(), "yyyyMMddHHmmss", null); time = DateTime.ParseExact(item.password_expire_date.GetDateTime(), "yyyyMMddHHmmss", null);
this.SelectedUserItem.DateExpireLogin = time; this.SelectedUserItem.DatePasswordExpire = time;
} }
this.SelectedUserItem.IsLockAccount = item.flock_status_account == 0 ? false : true; this.SelectedUserItem.IsLockAccount = item.id_flock_status == 0 ? false : true;
this.SelectedUserItem.IsLockPassword = item.flock_status_password == 0 ? false : true; this.SelectedUserItem.IsLockPassword = item.flock_status_password == 0 ? false : true;
this.SelectedUserItem.IsAdmin = item.fadmin == 0 ? false : true; this.SelectedUserItem.IsAdmin = item.fadmin == 0 ? false : true;
@ -568,8 +568,8 @@ namespace INT69DC_7C.Forms
this.SelectedUserItem.ID = item.user_id; this.SelectedUserItem.ID = item.user_id;
this.SelectedUserItem.Password = item.user_pw; this.SelectedUserItem.Password = item.user_pw;
this.SelectedUserItem.ExpireAccount = item.expire_period_account; this.SelectedUserItem.ExpireId = item.id_expire_period;
this.SelectedUserItem.ExpirePassword = item.expire_period_pw; this.SelectedUserItem.ExpirePassword = item.password_expire_period;
this.SelectedUserItem.ActiveLevel = item.active_level; this.SelectedUserItem.ActiveLevel = item.active_level;
if (item.active_level == 1) if (item.active_level == 1)
@ -586,35 +586,36 @@ namespace INT69DC_7C.Forms
if (this.SelectedUserItem.Group == DataStore.UserGroup.Admin if (this.SelectedUserItem.Group == DataStore.UserGroup.Admin
|| this.SelectedUserItem.Group == DataStore.UserGroup.Developer) || this.SelectedUserItem.Group == DataStore.UserGroup.Developer)
{ {
Console.WriteLine(item.register_date.GetDateTime()); Console.WriteLine(item.password_login_date.GetDateTime());
Console.WriteLine(item.login_date.GetDateTime()); Console.WriteLine(item.id_register_date.GetDateTime());
Console.WriteLine(item.expire_account_date.GetDateTime()); Console.WriteLine(item.id_expire_date.GetDateTime());
Console.WriteLine(item.expire_register_date.GetDateTime()); Console.WriteLine(item.password_expire_date.GetDateTime());
this.SelectedUserItem.DateRegister = DateTime.Now; this.SelectedUserItem.DatePasswordLogin = DateTime.Now;
this.SelectedUserItem.DateLogin = DateTime.Now; this.SelectedUserItem.DateIdRegister = DateTime.Now;
this.SelectedUserItem.DateExpireRegister = DateTime.Now; this.SelectedUserItem.DateIdExpire = DateTime.Now;
this.SelectedUserItem.DateExpireLogin = DateTime.Now; this.SelectedUserItem.DatePasswordExpire = DateTime.Now;
} }
else else
{ {
DateTime time = DateTime.ParseExact(item.register_date.GetDateTime(), "yyyyMMddHHmmss", null); DateTime time = DateTime.ParseExact(item.password_login_date.GetDateTime(), "yyyyMMddHHmmss", null);
this.SelectedUserItem.DateRegister = time; this.SelectedUserItem.DatePasswordLogin = time;
time = DateTime.ParseExact(item.login_date.GetDateTime(), "yyyyMMddHHmmss", null); time = DateTime.ParseExact(item.id_register_date.GetDateTime(), "yyyyMMddHHmmss", null);
this.SelectedUserItem.DateLogin = time; this.SelectedUserItem.DateIdRegister = time;
time = DateTime.ParseExact(item.expire_account_date.GetDateTime(), "yyyyMMddHHmmss", null); time = DateTime.ParseExact(item.id_expire_date.GetDateTime(), "yyyyMMddHHmmss", null);
this.SelectedUserItem.DateExpireRegister = time; this.SelectedUserItem.DateIdExpire = time;
time = DateTime.ParseExact(item.expire_register_date.GetDateTime(), "yyyyMMddHHmmss", null); time = DateTime.ParseExact(item.password_expire_date.GetDateTime(), "yyyyMMddHHmmss", null);
this.SelectedUserItem.DateExpireLogin = time; this.SelectedUserItem.DatePasswordExpire = time;
} }
this.SelectedUserItem.IsLockAccount = item.flock_status_account == 0 ? false : true; this.SelectedUserItem.IsLockAccount = item.id_flock_status == 0 ? false : true;
this.SelectedUserItem.IsLockPassword = item.flock_status_password == 0 ? false : true; this.SelectedUserItem.IsLockPassword = item.password_flock_status == 0 ? false : true;
this.SelectedUserItem.IsAdmin = item.fadmin == 0 ? false : true; this.SelectedUserItem.IsAdmin = item.fadmin == 0 ? false : true;
} }
private void UpdateSelectUserDisplay(UserItem item) private void UpdateSelectUserDisplay(UserItem item)
{ {
this.SetEnableID(false); this.SetEnableID(false);
@ -645,10 +646,10 @@ namespace INT69DC_7C.Forms
} }
else else
{ {
this.labelExpiryDateOfAccount.Text = item.ExpireAccount.ToString(); this.labelExpiryDateOfAccount.Text = item.ExpireId.ToString();
this.labelExpiryDateOfPassword.Text = item.ExpirePassword.ToString(); this.labelExpiryDateOfPassword.Text = item.ExpirePassword.ToString();
this.labelExpiryDateOfAccount2.Text = string.Format("{0:yyyy/MM/dd} ~ {1:yyyy/MM/dd}", item.DateLogin, item.DateExpireRegister); this.labelExpiryDateOfAccount2.Text = string.Format("{0:yyyy/MM/dd} ~ {1:yyyy/MM/dd}", item.DateIdRegister, item.DateIdExpire);
this.labelExpiryDateOfPassword2.Text = string.Format("{0:yyyy/MM/dd} ~ {1:yyyy/MM/dd}", item.DateRegister, item.DateExpireLogin); this.labelExpiryDateOfPassword2.Text = string.Format("{0:yyyy/MM/dd} ~ {1:yyyy/MM/dd}", item.DatePasswordLogin, item.DatePasswordExpire);
this.labelStatusExpiryAccount.Visible = item.IsLockAccount; this.labelStatusExpiryAccount.Visible = item.IsLockAccount;
this.labelStatusExpiryPassword.Visible = item.IsLockPassword; this.labelStatusExpiryPassword.Visible = item.IsLockPassword;

View File

@ -13,16 +13,16 @@ namespace INT69DC_7C.Part11_UserManager
private string m_ID; private string m_ID;
private string m_Password; private string m_Password;
private int m_ExpireAccount; private int m_ExpireId;
private int m_ExpirePassword; private int m_ExpirePassword;
private bool m_IsLockAccount; private bool m_IsLockAccount;
private bool m_IsLockPassword; private bool m_IsLockPassword;
private DateTime m_DateRegister; private DateTime m_DatePasswordLogin;
private DateTime m_DateLogin; private DateTime m_DateIdRegister;
private DateTime m_DateExpireRegister; private DateTime m_DateIdExpire;
private DateTime m_DateExpireLogin; private DateTime m_DatePasswordExpire;
private DataStore.UserGroup m_Group; private DataStore.UserGroup m_Group;
@ -50,10 +50,10 @@ namespace INT69DC_7C.Part11_UserManager
set { this.m_Password = value; } set { this.m_Password = value; }
} }
public int ExpireAccount public int ExpireId
{ {
get { return this.m_ExpireAccount; } get { return this.m_ExpireId; }
set { this.m_ExpireAccount = value; } set { this.m_ExpireId = value; }
} }
public int ExpirePassword public int ExpirePassword
{ {
@ -72,25 +72,25 @@ namespace INT69DC_7C.Part11_UserManager
set { this.m_IsLockPassword = value; } set { this.m_IsLockPassword = value; }
} }
public DateTime DateRegister public DateTime DatePasswordLogin
{ {
get { return this.m_DateRegister; } get { return this.m_DatePasswordLogin; }
set { this.m_DateRegister = value; } set { this.m_DatePasswordLogin = value; }
} }
public DateTime DateLogin public DateTime DateIdRegister
{ {
get { return this.m_DateLogin; } get { return this.m_DateIdRegister; }
set { this.m_DateLogin = value; } set { this.m_DateIdRegister = value; }
} }
public DateTime DateExpireRegister public DateTime DateIdExpire
{ {
get { return this.m_DateExpireRegister; } get { return this.m_DateIdExpire; }
set { this.m_DateExpireRegister = value; } set { this.m_DateIdExpire = value; }
} }
public DateTime DateExpireLogin public DateTime DatePasswordExpire
{ {
get { return this.m_DateExpireLogin; } get { return this.m_DatePasswordExpire; }
set { this.m_DateExpireLogin = value; } set { this.m_DatePasswordExpire = value; }
} }
public DataStore.UserGroup Group public DataStore.UserGroup Group
@ -118,13 +118,13 @@ namespace INT69DC_7C.Part11_UserManager
this.ID = "-"; this.ID = "-";
this.Password = "-"; this.Password = "-";
this.ExpireAccount = 0; this.ExpireId = 0;
this.ExpirePassword = 0; this.ExpirePassword = 0;
this.DateRegister = DateTime.Now; this.DatePasswordLogin = DateTime.Now;
this.DateLogin = DateTime.Now; this.DateIdRegister = DateTime.Now;
this.DateExpireRegister = DateTime.Now; this.DateIdExpire = DateTime.Now;
this.DateExpireLogin = DateTime.Now; this.DatePasswordExpire = DateTime.Now;
this.Group = DataStore.UserGroup.None; this.Group = DataStore.UserGroup.None;
@ -143,7 +143,7 @@ namespace INT69DC_7C.Part11_UserManager
ret = 9999; ret = 9999;
else else
{ {
dayDiff = timeNow.Date - this.DateExpireLogin.Date; dayDiff = timeNow.Date - this.DatePasswordExpire.Date;
ret = dayDiff.Days; ret = dayDiff.Days;
} }

View File

@ -212,34 +212,37 @@ namespace INT69DC_7C.Part11_UserManager
public Int32 fadmin; public Int32 fadmin;
[MarshalAs(UnmanagedType.I4)] [MarshalAs(UnmanagedType.I4)]
public Int32 expire_period_pw; // password lock public Int32 password_expire_period; // password lock date
[MarshalAs(UnmanagedType.I4)] [MarshalAs(UnmanagedType.I4)]
public Int32 expire_period_account; // account lock public Int32 id_expire_period; // id lock date
[MarshalAs(UnmanagedType.I4)] [MarshalAs(UnmanagedType.I4)]
public Int32 flock_status_account; // user ID (account) lock public Int32 id_flock_status; // user ID (account) lock status
[MarshalAs(UnmanagedType.I4)] [MarshalAs(UnmanagedType.I4)]
public Int32 flock_status_password; // password lock (need to change password) public Int32 password_flock_status; // password lock status (need to change password)
[MarshalAs(UnmanagedType.Struct)] [MarshalAs(UnmanagedType.Struct)]
public DateTime_t register_date; // date/time when the user password was registered or changed public DateTime_t password_login_date; // date/time when the user password was registered or changed
[MarshalAs(UnmanagedType.Struct)] [MarshalAs(UnmanagedType.Struct)]
public DateTime_t login_date; // date/time when the user was login public DateTime_t id_register_date; // date/time when the user was login
[MarshalAs(UnmanagedType.Struct)] [MarshalAs(UnmanagedType.Struct)]
public DateTime_t expire_register_date; public DateTime_t password_expire_date; // Password Expiration Date
[MarshalAs(UnmanagedType.Struct)] [MarshalAs(UnmanagedType.Struct)]
public DateTime_t expire_account_date; public DateTime_t id_expire_date; // Account Expiration Date
[MarshalAs(UnmanagedType.Struct)] [MarshalAs(UnmanagedType.Struct)]
public MenuID_t menuID; public MenuID_t menuID; // flag of Menu IDs
[MarshalAs(UnmanagedType.I4)] [MarshalAs(UnmanagedType.I4)]
public Int32 active_level; public Int32 active_level; // menu active level : max : MAX_ACTIVE_LEVEL
[MarshalAs(UnmanagedType.I4)]
public Int32 fFirstPW; // [1] First (request to modify), [0] Next (not request)
} }
#endregion #endregion
@ -324,34 +327,37 @@ namespace INT69DC_7C.Part11_UserManager
public Int32 fadmin; public Int32 fadmin;
[MarshalAs(UnmanagedType.I4)] [MarshalAs(UnmanagedType.I4)]
public Int32 expire_period_pw; // password lock public Int32 password_expire_period; // password lock
[MarshalAs(UnmanagedType.I4)] [MarshalAs(UnmanagedType.I4)]
public Int32 expire_period_account; // account lock public Int32 id_expire_period; // account lock
[MarshalAs(UnmanagedType.I4)] [MarshalAs(UnmanagedType.I4)]
public Int32 flock_status_account; // user ID (account) lock public Int32 id_flock_status; // user ID (account) lock
[MarshalAs(UnmanagedType.I4)] [MarshalAs(UnmanagedType.I4)]
public Int32 flock_status_password; // password lock (need to change password) public Int32 flock_status_password; // password lock (need to change password)
[MarshalAs(UnmanagedType.Struct)] [MarshalAs(UnmanagedType.Struct)]
public DateTime_t register_date; // date/time when the user password was registered or changed public DateTime_t password_login_date; // date/time when the user password was registered or changed
[MarshalAs(UnmanagedType.Struct)] [MarshalAs(UnmanagedType.Struct)]
public DateTime_t login_date; // date/time when the user was login public DateTime_t id_register_date; // date/time when the user was login
[MarshalAs(UnmanagedType.Struct)] [MarshalAs(UnmanagedType.Struct)]
public DateTime_t expire_register_date; public DateTime_t password_expire_date; // Password Expiration Date
[MarshalAs(UnmanagedType.Struct)] [MarshalAs(UnmanagedType.Struct)]
public DateTime_t expire_account_date; public DateTime_t id_expire_date; // Account Expiration Date
[MarshalAs(UnmanagedType.I4)] [MarshalAs(UnmanagedType.I4)]
public Int32 active_level; public Int32 active_level; // menu active level : max : MAX_ACTIVE_LEVEL
[MarshalAs(UnmanagedType.Struct)] [MarshalAs(UnmanagedType.Struct)]
public MenuID_t menuID; public MenuID_t menuID; // flag of Menu IDs
[MarshalAs(UnmanagedType.I4)]
public Int32 fFirstPW; // flag first password
} }
#endregion #endregion