예제 #1
0
        //
        // GET: /Private/

        public ActionResult UserDetails(string UserName)
        {
            var userDetailModel    = _UserMetaService.FindUserDetailsByUserId(UserName);
            UserDetailsModel model = new UserDetailsModel()
            {
                First       = (userDetailModel.User != null)?userDetailModel.User.First:String.Empty,
                Last        = (userDetailModel.User != null)?userDetailModel.User.Last:String.Empty,
                Middle      = (userDetailModel.User != null)?userDetailModel.User.Middle:String.Empty,
                Mobile      = (userDetailModel.User != null)?userDetailModel.User.Mobile:String.Empty,
                Phone       = (userDetailModel.User != null)?userDetailModel.User.Phone:String.Empty,
                ID          = userDetailModel.UserId,
                UserId      = userDetailModel.UserId,
                UserName    = userDetailModel.UserName,
                DateOfBirth = (userDetailModel.User != null)?userDetailModel.User.DateofBirth:DateTime.Now
            };

            return(View(model));
        }
 private ActionResult RedirectToLocal(string returnUrl)
 {
     if (Url.IsLocalUrl(returnUrl))
     {
         return(Redirect(returnUrl));
     }
     else
     {
         var userDetails = _UserMetaService.FindUserDetailsByUserId(UserName);
         var userProfile = _UserMetaService.FindUserProfileByUserId(UserName);
         if (userDetails.User != null)
         {
             return(RedirectToAction("ShowUserDetails", "Private", new { UserName = UserName, UserID = userDetails.UserId }));
         }
         else
         {
             return(RedirectToAction("UserDetails", "Private", new { UserName = UserName, UserID = userDetails.UserId }));
         }
     }
 }