Пример #1
0
        public webobj.User getValidUser(string username, string password)
        {
            DataAccess dataAccess = new DataAccess();
            User       user       = dataAccess.getValidUser(username, password);

            webobj.User webUser = null;

            if (user != null)
            {
                webUser                  = new webobj.User();
                webUser.PersonId         = user.getPersonId();
                webUser.FirstName        = user.getFirstName();
                webUser.LastName         = user.getLastName();
                webUser.Username         = user.getUsername();
                webUser.Password         = user.getPassword();
                webUser.UserRole         = user.getUserRole();
                webUser.StationId        = user.getStationId();
                webUser.StationedAddress = user.getStationedAddress();
                webUser.StationedCity    = user.getStationedCity();
                webUser.StationedCountry = user.getStationedCountry();
                webUser.ActiveStatus     = user.getActiveStatus();
                webUser.ServiceStartDate = user.getServiceStartDate();
                webUser.ServiceEndDate   = user.getServiceEndDate();
            }

            return(webUser);
        }
Пример #2
0
        public webobj.Status createAuditLog(webobj.User webUser)
        {
            AFIS360Common.User user = new AFIS360Common.User();
            user.setPersonId(webUser.PersonId);
            user.setUsername(webUser.Username);
            user.setUserRole(webUser.UserRole);

            DataAccess dataaccess = new DataAccess();

            AFIS360Common.Status status = dataaccess.createUserAuditLog(user, DateTime.Now);

            webobj.Status webStatus = new webobj.Status();
            webStatus.StatusCode = status.getStatusCode();
            webStatus.StatusDesc = status.getStatusDesc();
            webStatus.AuditLogId = status.getAuditLogId();
            return(webStatus);
        }
Пример #3
0
        public webobj.Status updateAuditLog(webobj.User webUser, webobj.ActivityLog webActivityLog)
        {
            AFIS360Common.User user = new AFIS360Common.User();
            user.setPersonId(webUser.PersonId);
            user.setId(webUser.Id);

            AFIS360Common.ActivityLog activityLog  = new AFIS360Common.ActivityLog();
            List <string>             webActivites = webActivityLog.Activity;

            foreach (string webActivity in webActivites)
            {
                activityLog.setActivity(webActivity);
            }

            DataAccess dataaccess = new DataAccess();

            AFIS360Common.Status status = dataaccess.updateUserAuditLog(user, DateTime.Now, 0, activityLog);

            webobj.Status webStatus = new webobj.Status();
            webStatus.StatusCode = status.getStatusCode();
            webStatus.StatusDesc = status.getStatusDesc();
            webStatus.AuditLogId = status.getAuditLogId();
            return(webStatus);
        }