public string DeleteListGroupUser(string group_id_list, string group_code_list, string username, string language_id)
        {
            string strError = "";
            strError = db.sExecuteSQL("SYS_spfrmGroupUser", new string[] { "Activity", "Username", "LanguageID", "GroupIDList" }, new object[] { "DeleteList", username, language_id, group_id_list });
            if (strError.Equals(""))
            {
                SYS_tblActionLogDTO log = new SYS_tblActionLogDTO();
                log.Activity = "Insert";
                log.Username = username;
                log.LanguageID = language_id;
                log.ActionVN = "Xóa";
                log.ActionEN = "Delete";
                log.FunctionID = "9";
                log.DescriptionVN = string.Format("Tài khoản '{0}' vừa xóa thành công nhóm người dùng có mã '{1}'.", username, group_code_list.Replace("$", ", "));
                log.DescriptionEN = string.Format("Account '{0}' has deleted group user successfully with group code are '{1}'.", username, group_code_list.Replace("$", ", "));
                strError = this.InsertActionLog(log);
            }

            return strError;
        }
Example #2
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            if (CheckLogin())
            {
                User.UserInfo.LanguageID = icbLanguage.Properties.Items[icbLanguage.SelectedIndex].Value + "";
                string _username = (chkRemember.Checked) ? Encryption.Encrypt(txtUsername.Text) : "";
                string _password = (chkRemember.Checked) ? Encryption.Encrypt(txtPassword.Text) : "";
                new IO().Write("Initialize", "Username", _username);
                new IO().Write("Initialize", "Password", _password);

                this.DialogResult = System.Windows.Forms.DialogResult.OK;
                SYS_tblActionLogDTO log = new SYS_tblActionLogDTO();
                log.Activity = "Insert";
                log.Username = txtUsername.Text;
                log.ActionVN = "Đăng Nhập";
                log.ActionEN = "Login";
                log.FunctionID = null;
                log.FunctionNameEN = log.ActionEN;
                log.FunctionNameVN = log.ActionVN;
                log.DescriptionEN = string.Format("Account '{0}' has logined to system at {1}.", txtUsername.Text, DateTime.Now);
                log.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);
                busUser.InsertActionLog(log);
            }
        }
 public string InsertActionLog(SYS_tblActionLogDTO log)
 {
     return dao.InsertActionLog(log);
 }
        public string UpdateGroupUser(SYS_tblGroupUserDTO item)
        {
            string strError = "";
            strError = db.sExecuteSQL("SYS_spfrmGroupUser", new string[] { "Activity", "Username", "LanguageID", "GroupID", "GroupCode", "GroupName", "Note", "Active", "IsDefault", "IsRoot" }, new object[] { item.Activity, item.Username, item.LanguageID, item.GroupID, item.GroupCode, item.GroupName, item.Note, item.Active, item.IsDefault, item.IsRoot });
            if (strError.Equals(""))
            {
                SYS_tblActionLogDTO log = new SYS_tblActionLogDTO();
                log.Activity = "Insert";
                log.Username = item.Username;
                log.LanguageID = item.LanguageID;
                log.ActionVN = "Cập Nhật";
                log.ActionEN = "Update";
                log.FunctionID = "9";
                log.DescriptionVN = string.Format("Tài khoản '{0}' vừa cập nhật thành công nhóm người dùng có mã '{1}'.", item.Username, item.GroupCode);
                log.DescriptionEN = string.Format("Account '{0}' has updated group user successfully with group code is '{1}'.", item.Username, item.GroupCode);
                strError = this.InsertActionLog(log);
            }

            return strError;
        }
        public DataTable LoadAllData(string username, string language_id)
        {
            SYS_tblActionLogDTO log = new SYS_tblActionLogDTO();
            log.Activity = "Insert";
            log.Username = username;
            log.LanguageID = language_id;
            log.ActionVN = "Tải Tất Cả Dữ Liệu";
            log.ActionEN = "Load All Data";
            log.FunctionID = "9";
            log.DescriptionVN = string.Format("Tài khoản '{0}' vừa tải thành công dữ liệu nhóm người dùng.", username);
            log.DescriptionEN = string.Format("Account '{0}' downloaded successfully data of group users.", username);
            this.InsertActionLog(log);

            return db.GetDataTable("SYS_spfrmGroupUser", new string[] { "Activity", "Username", "LanguageID" }, new object[] { "LoadAllData", log.Username, log.LanguageID });
        }
Example #6
0
 public string InsertActionLog(SYS_tblActionLogDTO log)
 {
     return db.sExecuteSQL("SYS_spfrmActionLog", new string[] { "Activity", "Username", "LanguageID", "FullName", "ComputerName", "AccountWindows", "ActionVN", "ActionEN", "ActionTime", "FunctionID", "FunctionNameVN", "FunctionNameEN", "IPLAN", "IPWAN", "MacAddress", "DescriptionVN", "DescriptionEN" }, new object[] { log.Activity, log.Username, log.LanguageID, log.FullName, log.ComputerName, log.AccountWindows, log.ActionVN, log.ActionEN, DateTime.Now, log.FunctionID, log.FunctionNameVN, log.FunctionNameEN, log.IPLAN, log.IPWAN, log.MacAddress, log.DescriptionVN, log.DescriptionEN });
 }
Example #7
0
 public BaseDAO()
 {
     db = new SQL();
     log = new SYS_tblActionLogDTO();
 }
Example #8
0
        public string InsertUser(SYS_tblUserDTO item)
        {
            string strError = "";
            strError = db.sExecuteSQL("SYS_spfrmUser", new string[] { "Activity", "Username", "LanguageID", "UsernameOther", "Password", "GroupID", "EffectiveDate", "ToDate", "DateChangePass", "Locked", "LockDate", "UnlockDate", "PassNeverExpired", "ChangePassNextTime", "EmpID", "FullName", "CanNotChangePassword", "Email", "Note" }, new object[] { item.Activity, item.Username, item.LanguageID, item.UserName, item.Password, item.GroupID, item.EffectiveDate, item.ToDate, item.DateChangePass, item.Locked, item.LockDate, item.UnlockDate, item.PassNeverExpired, item.ChangePassNextTime, item.EmpID, item.FullName, item.CanNotChangePassword, item.Email, item.Note });
            if (strError.Equals(""))
            {
                SYS_tblActionLogDTO log = new SYS_tblActionLogDTO();
                log.Activity = item.Activity;
                log.Username = item.Username;
                log.LanguageID = item.LanguageID;
                log.ActionVN = "Thêm Mới";
                log.ActionEN = "Insert";
                log.FunctionID = "10";
                log.DescriptionVN = string.Format("Tài khoản '{0}' vừa thêm mới thành công người dùng có tên tài khoản '{1}'.", item.Username, item.UserName);
                log.DescriptionEN = string.Format("Account '{0}' has inserted new user successfully with username is '{1}'.", item.Username, item.UserName);
                strError = this.InsertActionLog(log);
            }

            return strError;
        }