Exemple #1
0
        public int getTotalRecords(UserCriteria conditions)
        {
            SqlConnectionFactory sqlConnection = new SqlConnectionFactory();

            using (SqlConnection connection = sqlConnection.GetConnection())
            {
                return(UsersDataLayer.GetInstance().GetTotalRecords(connection, conditions));
            }
        }
Exemple #2
0
        public void TrackUserAction(UserLogInfo userLoginfo)
        {
            SqlConnectionFactory sqlConnection = new SqlConnectionFactory();

            using (SqlConnection connection = sqlConnection.GetConnection())
            {
                UsersDataLayer.GetInstance().TrackingUserBehavior(connection, userLoginfo);
            }
        }
Exemple #3
0
        public List <UserInfo> GetList(UserCriteria conditions)
        {
            SqlConnectionFactory sqlConnection = new SqlConnectionFactory();

            using (SqlConnection connection = sqlConnection.GetConnection())
            {
                List <UserInfo> ListUserInfo = UsersDataLayer.GetInstance().Getlist(connection, conditions);
                return(ListUserInfo);
            }
        }
Exemple #4
0
        public void UpdateUserGroup(string id, UserGroupInfo _userGroup)
        {
            SqlConnectionFactory sqlConnection = new SqlConnectionFactory();
            UserInfo             record        = new UserInfo();

            using (SqlConnection connection = sqlConnection.GetConnection())
            {
                UserInfo data = UsersDataLayer.GetInstance().GetUser(connection, id);
                UserGroupDataLayer.GetInstance().UpdateUserGroup(connection, id, _userGroup);
            }
        }
Exemple #5
0
        public void ChangePassword(string _user, string pass)
        {
            SqlConnectionFactory sqlConnection = new SqlConnectionFactory();
            UserInfo             record        = new UserInfo();

            using (SqlConnection connection = sqlConnection.GetConnection())
            {
                string applicationId   = EncryptionUtils.GetApplicationId();
                string applicationName = EncryptionUtils.GetApplicationName();
                String password        = EncryptionUtils.EncryptData(pass, applicationName, applicationId);
                UsersDataLayer.GetInstance().ChangePass(connection, _user, password);
            }
        }
Exemple #6
0
        public void DeleteUsers(string ids)
        {
            SqlConnectionFactory sqlConnection = new SqlConnectionFactory();

            using (SqlConnection connection = sqlConnection.GetConnection())
            {
                string[] IDsarray = ids.Split(',');
                foreach (string id in IDsarray)
                {
                    UsersDataLayer.GetInstance().DeleteUser(connection, id);
                }
            }
        }