コード例 #1
0
        public ActionResult Delete(Guid userContactId)
        {
            bn_UserContact bnUserContact = new bn_UserContact();
            var            re            = bnUserContact.Delete(userContactId);

            return(RedirectToAction("Index", "User"));
        }
コード例 #2
0
        public ActionResult p_UserContact(Guid userId)
        {
            bn_UserContact bnUserContact = new bn_UserContact();
            bn_UserProfile bnUserProfile = new bn_UserProfile();
            ps_UserContact model         = new ps_UserContact();

            model.UserProfile = bnUserProfile.GetById(userId);
            model.Contacts    = bnUserContact.GetByUserId(userId);

            return(View(model));
        }
コード例 #3
0
        public ActionResult Add(ps_ContactType model)
        {
            if (ModelState.IsValid)
            {
                bn_UserContact bnUserContact = new bn_UserContact();

                var userContactId = bnUserContact.Create(
                    ps_Membership.GetUser().UserId,
                    model.UserContact.ContactTypeId,
                    model.UserContact.ContactName);

                return(RedirectToAction("Index", "User"));
            }
            return(View());
        }
コード例 #4
0
        public ActionResult Index(Guid?userId)
        {
            if (!userId.HasValue)
            {
                userId = ps_Membership.GetUser().UserId;
            }

            bn_UserContact bnUserContact = new bn_UserContact();
            bn_UserProfile bnUserProfile = new bn_UserProfile();
            ps_UserContact model         = new ps_UserContact();

            model.Contacts    = bnUserContact.GetByUserId((Guid)userId);
            model.UserProfile = bnUserProfile.GetById((Guid)userId);

            return(View(model));
        }