Exemplo n.º 1
0
        public static void Add(LoginLog model)
        {
            if (model == null)
            {
                throw new ArgumentNullException("model");
            }

            ILoginLog factory = LoginLogFactory.GetFactory();

            factory.Add(model);
        }
Exemplo n.º 2
0
        public static void UpdateLogoutTime(string loginAccount)
        {
            if (string.IsNullOrWhiteSpace(loginAccount))
            {
                throw new ArgumentNullException("loginAccount");
            }

            ILoginLog factory = LoginLogFactory.GetFactory();

            factory.UpdateLogoutTime(loginAccount);
        }
        /// <summary>
        /// news a account
        /// </summary>
        /// <param name="praiseDTO"></param>
        /// <returns></returns>
        public LoginLogDTO AddNewLoginLog(LoginLogDTO loginLogDTO)
        {
            //check preconditions
            if (loginLogDTO == null)
            {
                throw new ArgumentException(Messages.warning_CannotAddVipWithEmptyInformation);
            }

            //Create the entity and the required associated data
            var loginLog = LoginLogFactory.CreateLoginLog(loginLogDTO.AccountId, loginLogDTO.LoginDate, loginLogDTO.PlatForm, loginLogDTO.IP, loginLogDTO.City);

            //save entity
            SaveLoginLog(loginLog);

            //return the data with id and assigned default values
            return(loginLog.ProjectedAs <LoginLogDTO>());
        }
Exemplo n.º 4
0
        public static Paging <LoginLog> QueryPage(LoginLogCondition condition, int pagesize, int pageindex, out int total)
        {
            ILoginLog factory = LoginLogFactory.GetFactory();

            return(factory.QueryPage(condition, pagesize, pageindex, out total));
        }