private async void btnLogin_Click(object sender, EventArgs e) { if (await CheckLogin()) { string username = (chkRemember.Checked) ? EncryptEngine.Encrypt(txtUsername.Text.Trim()) : ""; string password = (chkRemember.Checked) ? EncryptEngine.Encrypt(txtPassword.Text.Trim()) : ""; IOEngine.Write("Initialize", "Username", username); IOEngine.Write("Initialize", "Password", password); ResponseItem result = await SYS_tblActionLogBUS.InsertUpdateLog(new SYS_tblActionLogDTO { ID = string.Empty, ActionVN = "Đăng Nhập", ActionEN = "Login", ActionTime = DateTime.Now, FunctionID = string.Empty, FunctionNameVN = "Đăng Nhập", FunctionNameEN = "Login", DescriptionEN = string.Format("Account '{0}' has logined to system at {1}.", txtUsername.Text, DateTime.Now), DescriptionVN = string.Format("Tài khoản '{0}' vừa đăng nhập vào hệ thống vào lúc {1}.", txtUsername.Text, DateTime.Now), FullName = CommonEngine.userInfo.FullName, Activity = "Insert", UserID = CommonEngine.userInfo.UserID, LanguageID = ConfigEngine.Language }); if (result.IsError) { CommonEngine.ShowHTTPErrorMessage(result); } else { if (!string.IsNullOrEmpty(result.Message)) { CommonEngine.ShowMessage(result.Message, 0); return; } this.DialogResult = DialogResult.OK; } } }
private void icbLanguage_SelectedIndexChanged(object sender, EventArgs e) { IOEngine.Write("Initialize", "Language", icbLanguage.Properties.Items[icbLanguage.SelectedIndex].Value + ""); ChangeCaptionLanguage(icbLanguage.SelectedIndex == 0 ? "en" : "vi"); }