Ejemplo n.º 1
0
 public ActionResult Edit(UserProfileModel model)
 {
     var userProfile = this._userProfileService.Get(model.Id);
     userProfile = model.ToEntity(userProfile);
     this._userProfileService.Update(userProfile); ;
     _result = "success";
     return Content(_result);
 }
Ejemplo n.º 2
0
        public ActionResult Create(UserProfileModel model)
        {
            if (_userProfileService.List().Count(m => m.Account == model.Account) > 0)
            {
                _result = "failed";
                return Content(_result);
            }
            model.RoleId = 2;
            var user = model.ToEntity();
            model.AddTime = DateTime.Now;
            _userProfileService.Add(user);
           SaveNewAddedUerFancyApp(user);

            _result = "success";
            return Content(_result);
        }