parent
e0cb32cee1
commit
255fee8b3b
|
@ -103,8 +103,8 @@ namespace INT69DC_7C.Controls
|
|||
|
||||
this.labelID.Text = item.ID;
|
||||
this.labelPassword.Text = item.Password;
|
||||
this.labelExpireAccountDate.Text = string.Format("{0:yyyy/MM/dd} ~ {1:yyyy/MM/dd}", item.DateRegister, item.DateExpireRegister);
|
||||
this.labelExpirePasswordDate.Text = string.Format("{0:yyyy/MM/dd} ~ {1:yyyy/MM/dd}", item.DateLogin, item.DateExpireLogin);
|
||||
this.labelExpireAccountDate.Text = string.Format("{0:yyyy/MM/dd} ~ {1:yyyy/MM/dd}", item.DateLogin, item.DateExpireID);
|
||||
this.labelExpirePasswordDate.Text = string.Format("{0:yyyy/MM/dd} ~ {1:yyyy/MM/dd}", item.DateRegisterPassword, item.DateExpirePassword);
|
||||
this.labelStatusExpireAccount.Visible = item.IsLockAccount;
|
||||
this.labelStatusExpirePassword.Visible = item.IsLockPassword;
|
||||
}
|
||||
|
|
|
@ -105,6 +105,8 @@ namespace INT69DC_7C.DialogForms
|
|||
this.labelTitle1.Text = "Change Password";
|
||||
this.labelTitle2.Text = "New PW";
|
||||
this.labelTitle3.Text = "Confirmation";
|
||||
|
||||
this.textBoxID.PasswordChar = '*';
|
||||
}
|
||||
|
||||
this.textBoxID.Text = "";
|
||||
|
@ -168,13 +170,13 @@ namespace INT69DC_7C.DialogForms
|
|||
this.ParentForm.SystemConfig.CurrentUser.ExpirePassword = userInfo.expire_period_pw;
|
||||
|
||||
DateTime time = DateTime.ParseExact(userInfo.register_date.GetDateTime(), "yyyyMMddHHmmss", null);
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateRegister = time;
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateRegisterPassword = time;
|
||||
time = DateTime.ParseExact(userInfo.login_date.GetDateTime(), "yyyyMMddHHmmss", null);
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateLogin = time;
|
||||
time = DateTime.ParseExact(userInfo.expire_account_date.GetDateTime(), "yyyyMMddHHmmss", null);
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateExpireRegister = time;
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateExpireID = time;
|
||||
time = DateTime.ParseExact(userInfo.expire_register_date.GetDateTime(), "yyyyMMddHHmmss", null);
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateExpireLogin = time;
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateExpirePassword = time;
|
||||
|
||||
this.ParentForm.SystemConfig.CurrentUser.IsLockAccount = userInfo.flock_status_account == 0 ? false : true;
|
||||
this.ParentForm.SystemConfig.CurrentUser.IsLockPassword = userInfo.flock_status_password == 0 ? false : true;
|
||||
|
@ -275,13 +277,13 @@ namespace INT69DC_7C.DialogForms
|
|||
this.ParentForm.SystemConfig.CurrentUser.ExpirePassword = userInfo.expire_period_pw;
|
||||
|
||||
DateTime time = DateTime.ParseExact(userInfo.register_date.GetDateTime(), "yyyyMMddHHmmss", null);
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateRegister = time;
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateRegisterPassword = time;
|
||||
time = DateTime.ParseExact(userInfo.login_date.GetDateTime(), "yyyyMMddHHmmss", null);
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateLogin = time;
|
||||
time = DateTime.ParseExact(userInfo.expire_account_date.GetDateTime(), "yyyyMMddHHmmss", null);
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateExpireRegister = time;
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateExpireID = time;
|
||||
time = DateTime.ParseExact(userInfo.expire_register_date.GetDateTime(), "yyyyMMddHHmmss", null);
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateExpireLogin = time;
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateExpirePassword = time;
|
||||
|
||||
this.ParentForm.SystemConfig.CurrentUser.IsLockAccount = userInfo.flock_status_account == 0 ? false : true;
|
||||
this.ParentForm.SystemConfig.CurrentUser.IsLockPassword = userInfo.flock_status_password == 0 ? false : true;
|
||||
|
|
|
@ -250,7 +250,7 @@ namespace INT69DC_7C.DialogForms
|
|||
// console
|
||||
Console.WriteLine(user.register_date.GetDateTime());
|
||||
DateTime time = DateTime.ParseExact(user.register_date.GetDateTime(), "yyyyMMddHHmmss", null);
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateRegister = time;
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateRegisterPassword = time;
|
||||
// console
|
||||
Console.WriteLine(user.login_date.GetDateTime());
|
||||
time = DateTime.ParseExact(user.login_date.GetDateTime(), "yyyyMMddHHmmss", null);
|
||||
|
@ -259,19 +259,19 @@ namespace INT69DC_7C.DialogForms
|
|||
if (this.ParentForm.SystemConfig.CurrentUser.Group == DataStore.UserGroup.Admin
|
||||
|| this.ParentForm.SystemConfig.CurrentUser.Group == DataStore.UserGroup.Developer)
|
||||
{
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateExpireRegister = DateTime.Now;
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateExpireLogin = DateTime.Now;
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateExpirePassword = DateTime.Now;
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateExpireID = DateTime.Now;
|
||||
}
|
||||
else
|
||||
{
|
||||
// console
|
||||
Console.WriteLine(user.expire_account_date.GetDateTime());
|
||||
time = DateTime.ParseExact(user.expire_account_date.GetDateTime(), "yyyyMMddHHmmss", null);
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateExpireLogin = time;
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateExpireID = time;
|
||||
// console
|
||||
Console.WriteLine(user.expire_register_date.GetDateTime());
|
||||
time = DateTime.ParseExact(user.expire_register_date.GetDateTime(), "yyyyMMddHHmmss", null);
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateExpireRegister = time;
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateExpirePassword = time;
|
||||
}
|
||||
|
||||
this.ParentForm.SystemConfig.CurrentUser.IsLockAccount = user.flock_status_account == 0 ? false : true;
|
||||
|
|
|
@ -965,13 +965,13 @@ namespace INT69DC_7C.Forms
|
|||
Console.WriteLine(userInfo.expire_register_date.GetDateTime());
|
||||
|
||||
DateTime time = DateTime.ParseExact(userInfo.register_date.GetDateTime(), "yyyyMMddHHmmss", null);
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateRegister = time;
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateRegisterPassword = time;
|
||||
time = DateTime.ParseExact(userInfo.login_date.GetDateTime(), "yyyyMMddHHmmss", null);
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateLogin = time;
|
||||
time = DateTime.ParseExact(userInfo.expire_account_date.GetDateTime(), "yyyyMMddHHmmss", null);
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateExpireRegister = time;
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateExpireID = time;
|
||||
time = DateTime.ParseExact(userInfo.expire_register_date.GetDateTime(), "yyyyMMddHHmmss", null);
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateExpireLogin = time;
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateExpirePassword = time;
|
||||
|
||||
this.ParentForm.SystemConfig.CurrentUser.IsLockAccount = userInfo.flock_status_account == 0 ? false : true;
|
||||
this.ParentForm.SystemConfig.CurrentUser.IsLockPassword = userInfo.flock_status_password == 0 ? false : true;
|
||||
|
@ -2419,13 +2419,13 @@ namespace INT69DC_7C.Forms
|
|||
this.ParentForm.SystemConfig.CurrentUser.ExpirePassword = userInfo.expire_period_pw;
|
||||
|
||||
DateTime time = DateTime.ParseExact(userInfo.register_date.GetDateTime(), "yyyyMMddHHmmss", null);
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateRegister = time;
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateRegisterPassword = time;
|
||||
time = DateTime.ParseExact(userInfo.login_date.GetDateTime(), "yyyyMMddHHmmss", null);
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateLogin = time;
|
||||
time = DateTime.ParseExact(userInfo.expire_account_date.GetDateTime(), "yyyyMMddHHmmss", null);
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateExpireRegister = time;
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateExpireID = time;
|
||||
time = DateTime.ParseExact(userInfo.expire_register_date.GetDateTime(), "yyyyMMddHHmmss", null);
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateExpireLogin = time;
|
||||
this.ParentForm.SystemConfig.CurrentUser.DateExpirePassword = time;
|
||||
|
||||
this.ParentForm.SystemConfig.CurrentUser.IsLockAccount = userInfo.flock_status_account == 0 ? false : true;
|
||||
this.ParentForm.SystemConfig.CurrentUser.IsLockPassword = userInfo.flock_status_password == 0 ? false : true;
|
||||
|
|
|
@ -540,21 +540,21 @@ namespace INT69DC_7C.Forms
|
|||
Console.WriteLine(item.expire_account_date.GetDateTime());
|
||||
Console.WriteLine(item.expire_register_date.GetDateTime());
|
||||
|
||||
this.SelectedUserItem.DateRegister = DateTime.Now;
|
||||
this.SelectedUserItem.DateRegisterPassword = DateTime.Now;
|
||||
this.SelectedUserItem.DateLogin = DateTime.Now;
|
||||
this.SelectedUserItem.DateExpireRegister = DateTime.Now;
|
||||
this.SelectedUserItem.DateExpireLogin = DateTime.Now;
|
||||
this.SelectedUserItem.DateExpirePassword = DateTime.Now;
|
||||
this.SelectedUserItem.DateExpireID = DateTime.Now;
|
||||
}
|
||||
else
|
||||
{
|
||||
DateTime time = DateTime.ParseExact(item.register_date.GetDateTime(), "yyyyMMddHHmmss", null);
|
||||
this.SelectedUserItem.DateRegister = time;
|
||||
this.SelectedUserItem.DateRegisterPassword = time;
|
||||
time = DateTime.ParseExact(item.login_date.GetDateTime(), "yyyyMMddHHmmss", null);
|
||||
this.SelectedUserItem.DateLogin = time;
|
||||
time = DateTime.ParseExact(item.expire_account_date.GetDateTime(), "yyyyMMddHHmmss", null);
|
||||
this.SelectedUserItem.DateExpireRegister = time;
|
||||
this.SelectedUserItem.DateExpireID = time;
|
||||
time = DateTime.ParseExact(item.expire_register_date.GetDateTime(), "yyyyMMddHHmmss", null);
|
||||
this.SelectedUserItem.DateExpireLogin = time;
|
||||
this.SelectedUserItem.DateExpirePassword = time;
|
||||
}
|
||||
|
||||
this.SelectedUserItem.IsLockAccount = item.flock_status_account == 0 ? false : true;
|
||||
|
@ -592,21 +592,21 @@ namespace INT69DC_7C.Forms
|
|||
Console.WriteLine(item.expire_register_date.GetDateTime());
|
||||
|
||||
|
||||
this.SelectedUserItem.DateRegister = DateTime.Now;
|
||||
this.SelectedUserItem.DateRegisterPassword = DateTime.Now;
|
||||
this.SelectedUserItem.DateLogin = DateTime.Now;
|
||||
this.SelectedUserItem.DateExpireRegister = DateTime.Now;
|
||||
this.SelectedUserItem.DateExpireLogin = DateTime.Now;
|
||||
this.SelectedUserItem.DateExpirePassword = DateTime.Now;
|
||||
this.SelectedUserItem.DateExpireID = DateTime.Now;
|
||||
}
|
||||
else
|
||||
{
|
||||
DateTime time = DateTime.ParseExact(item.register_date.GetDateTime(), "yyyyMMddHHmmss", null);
|
||||
this.SelectedUserItem.DateRegister = time;
|
||||
this.SelectedUserItem.DateRegisterPassword = time;
|
||||
time = DateTime.ParseExact(item.login_date.GetDateTime(), "yyyyMMddHHmmss", null);
|
||||
this.SelectedUserItem.DateLogin = time;
|
||||
time = DateTime.ParseExact(item.expire_account_date.GetDateTime(), "yyyyMMddHHmmss", null);
|
||||
this.SelectedUserItem.DateExpireRegister = time;
|
||||
this.SelectedUserItem.DateExpireID = time;
|
||||
time = DateTime.ParseExact(item.expire_register_date.GetDateTime(), "yyyyMMddHHmmss", null);
|
||||
this.SelectedUserItem.DateExpireLogin = time;
|
||||
this.SelectedUserItem.DateExpirePassword = time;
|
||||
}
|
||||
|
||||
this.SelectedUserItem.IsLockAccount = item.flock_status_account == 0 ? false : true;
|
||||
|
@ -617,11 +617,12 @@ namespace INT69DC_7C.Forms
|
|||
private void UpdateSelectUserDisplay(UserItem item)
|
||||
{
|
||||
this.SetEnableID(false);
|
||||
this.SetEnablePassword(true);
|
||||
this.buttonSave.Visible = false;
|
||||
|
||||
this.labelID.Text = item.ID;
|
||||
this.labelPassword.Text = item.Password;
|
||||
this.UpdateAccessRightDisplay(item.ActiveLevel);
|
||||
this.buttonSave.Visible = false;
|
||||
|
||||
if (item.Group == DataStore.UserGroup.Admin)
|
||||
{
|
||||
|
@ -647,8 +648,8 @@ namespace INT69DC_7C.Forms
|
|||
{
|
||||
this.labelExpiryDateOfAccount.Text = item.ExpireAccount.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.labelExpiryDateOfPassword2.Text = string.Format("{0:yyyy/MM/dd} ~ {1:yyyy/MM/dd}", item.DateRegister, item.DateExpireLogin);
|
||||
this.labelExpiryDateOfAccount2.Text = string.Format("{0:yyyy/MM/dd} ~ {1:yyyy/MM/dd}", item.DateLogin, item.DateExpireID);
|
||||
this.labelExpiryDateOfPassword2.Text = string.Format("{0:yyyy/MM/dd} ~ {1:yyyy/MM/dd}", item.DateRegisterPassword, item.DateExpirePassword);
|
||||
|
||||
this.labelStatusExpiryAccount.Visible = item.IsLockAccount;
|
||||
this.labelStatusExpiryPassword.Visible = item.IsLockPassword;
|
||||
|
@ -670,7 +671,13 @@ namespace INT69DC_7C.Forms
|
|||
}
|
||||
else if (this.ParentForm.SystemConfig.CurrentUser.ActiveLevel == item.ActiveLevel)
|
||||
{
|
||||
int index = this.listBoxUserList.SelectItemIndex;
|
||||
|
||||
if (this.ParentForm.SystemConfig.CurrentUser.ID == this.listBoxUserList.Items[index])
|
||||
this.buttonDelete.Visible = false;
|
||||
else
|
||||
this.buttonDelete.Visible = true;
|
||||
|
||||
this.SetEnablePassword(true);
|
||||
this.comboBoxAccessRight.Enabled = false;
|
||||
}
|
||||
|
@ -1224,11 +1231,6 @@ namespace INT69DC_7C.Forms
|
|||
|
||||
if (index != -1)
|
||||
{
|
||||
if (this.ParentForm.SystemConfig.CurrentUser.ID == this.listBoxUserList.Items[index])
|
||||
this.buttonDelete.Visible = false;
|
||||
else
|
||||
this.buttonDelete.Visible = true;
|
||||
|
||||
UserManager.UserManager_GetUserListID(this.listBoxUserList.Items[index]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,10 +19,10 @@ namespace INT69DC_7C.Part11_UserManager
|
|||
private bool m_IsLockAccount;
|
||||
private bool m_IsLockPassword;
|
||||
|
||||
private DateTime m_DateRegister;
|
||||
private DateTime m_DateRegisterPassword;
|
||||
private DateTime m_DateLogin;
|
||||
private DateTime m_DateExpireRegister;
|
||||
private DateTime m_DateExpireLogin;
|
||||
private DateTime m_DateExpirePassword;
|
||||
private DateTime m_DateExpireID;
|
||||
|
||||
private DataStore.UserGroup m_Group;
|
||||
|
||||
|
@ -72,25 +72,25 @@ namespace INT69DC_7C.Part11_UserManager
|
|||
set { this.m_IsLockPassword = value; }
|
||||
}
|
||||
|
||||
public DateTime DateRegister
|
||||
public DateTime DateRegisterPassword
|
||||
{
|
||||
get { return this.m_DateRegister; }
|
||||
set { this.m_DateRegister = value; }
|
||||
get { return this.m_DateRegisterPassword; }
|
||||
set { this.m_DateRegisterPassword = value; }
|
||||
}
|
||||
public DateTime DateLogin
|
||||
{
|
||||
get { return this.m_DateLogin; }
|
||||
set { this.m_DateLogin = value; }
|
||||
}
|
||||
public DateTime DateExpireRegister
|
||||
public DateTime DateExpirePassword
|
||||
{
|
||||
get { return this.m_DateExpireRegister; }
|
||||
set { this.m_DateExpireRegister = value; }
|
||||
get { return this.m_DateExpirePassword; }
|
||||
set { this.m_DateExpirePassword = value; }
|
||||
}
|
||||
public DateTime DateExpireLogin
|
||||
public DateTime DateExpireID
|
||||
{
|
||||
get { return this.m_DateExpireLogin; }
|
||||
set { this.m_DateExpireLogin = value; }
|
||||
get { return this.m_DateExpireID; }
|
||||
set { this.m_DateExpireID = value; }
|
||||
}
|
||||
|
||||
public DataStore.UserGroup Group
|
||||
|
@ -121,10 +121,10 @@ namespace INT69DC_7C.Part11_UserManager
|
|||
this.ExpireAccount = 0;
|
||||
this.ExpirePassword = 0;
|
||||
|
||||
this.DateRegister = DateTime.Now;
|
||||
this.DateRegisterPassword = DateTime.Now;
|
||||
this.DateLogin = DateTime.Now;
|
||||
this.DateExpireRegister = DateTime.Now;
|
||||
this.DateExpireLogin = DateTime.Now;
|
||||
this.DateExpirePassword = DateTime.Now;
|
||||
this.DateExpireID = DateTime.Now;
|
||||
|
||||
this.Group = DataStore.UserGroup.None;
|
||||
|
||||
|
@ -143,7 +143,7 @@ namespace INT69DC_7C.Part11_UserManager
|
|||
ret = 9999;
|
||||
else
|
||||
{
|
||||
dayDiff = timeNow.Date - this.DateExpireLogin.Date;
|
||||
dayDiff = timeNow.Date - this.DateExpireID.Date;
|
||||
ret = dayDiff.Days;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue