예제 #1
0
        public ActionResult UpdateUserInfo(UserViewModel user)
        {
            Customer customer = user.toCustomer();

            customer.LastSignInIpAddr = WebClientHelper.GetHostAddress();
            _customerRepository.AddCustomer(customer);

            customer.Password = null;
            Session.Add(Constants.SESSION_USER, customer);

            return(RedirectToAction("UserInfo"));
        }
예제 #2
0
        public ActionResult UserInfo()
        {
            var customer = Session[Constants.SESSION_USER] as Customer;

            try
            {
                customer.TelephoneNo = customer.TelephoneNo.Substring(0, 3) + "****" + customer.TelephoneNo.Substring(7, 4);
                Session.Add(Constants.SESSION_USER, customer);
            }
            catch
            {
            }

            Session.Add(Constants.IP, WebClientHelper.GetHostAddress());
            Session.Add(Constants.TIME, DateTimeHelper.GetDate(DateTime.Now));
            return(View());
        }