コード例 #1
0
        // GET: Admin/Profiles
        public ActionResult Index()
        {
            IProfileDAC     dac      = new ProfileDAC();
            IList <Profile> profiles = dac.GetAll();

            return(View(profiles));
        }
コード例 #2
0
        public ActionResult Delete(int id)
        {
            IProfileDAC dac = new ProfileDAC();

            dac.Delete(id);
            return(RedirectToAction("Index"));
        }
コード例 #3
0
        public ActionResult Edit(int id)
        {
            IProfileDAC dac     = new ProfileDAC();
            var         profile = dac.GetProfile(id);
            var         model   = new ProfileEdit {
                ProfileID = profile.ProfileID, Name = profile.Name, ProfileText = profile.ProfileText, SortOrder = profile.SortOrder
            };

            return(View(model));
        }
コード例 #4
0
        public ActionResult Edit(ProfileEdit profile)
        {
            if (!ModelState.IsValid)
            {
                return(View(profile));
            }
            IProfileDAC dac = new ProfileDAC();

            dac.Update(profile.ProfileID, profile.Name, profile.ProfileText, profile.SortOrder);
            return(RedirectToAction("Index"));
        }
コード例 #5
0
        public ActionResult Create(ProfileCreate profile)
        {
            if (!ModelState.IsValid)
            {
                return(View(profile));
            }

            IProfileDAC dac = new ProfileDAC();

            dac.Add(profile.Name, profile.ProfileText, profile.SortOrder);
            return(RedirectToAction("Index"));
        }
コード例 #6
0
 public ActionResult AddImage(HttpPostedFileBase file, int profileID)
 {
     if (file != null)
     {
         IProfileDAC dac     = new ProfileDAC();
         var         profile = dac.GetProfile(profileID);
         string      path    = System.IO.Path.Combine(Server.MapPath("~/SiteContent/Images/Band/"), profile.ImageName);
         file.SaveAs(path);
     }
     // after successfully uploading redirect the user
     return(RedirectToAction("Index"));
 }
コード例 #7
0
        public List <UserProfileEntity> GetSocialmedia(int accountid, int userid)
        {
            ProfileDAC dac = new ProfileDAC();

            return(dac.GetSocialmedia(accountid, userid));
        }
コード例 #8
0
        public List <UserProfileEntity> GetAllSocialMediaIcons(int accountid)
        {
            ProfileDAC dac = new ProfileDAC();

            return(dac.GetAllSocialMediaIcons(accountid));
        }
コード例 #9
0
        public string UpdateUserSocialMedia(List <UserProfileEntity> jsonobj)
        {
            ProfileDAC dac = new ProfileDAC();

            return(dac.UpdateUserSocialMedia(jsonobj));
        }
コード例 #10
0
        public string DeleteSkills(int id)
        {
            ProfileDAC dac = new ProfileDAC();

            return(dac.DeleteSkills(id));
        }
コード例 #11
0
        public List <SkillEntity> GetSkillList(int id)
        {
            ProfileDAC dac = new ProfileDAC();

            return(dac.GetSkillList(id));
        }
コード例 #12
0
        public UserProfileEntity GetProfileDetailid(int orgID)
        {
            var ProfileDAC = new ProfileDAC();

            return(ProfileDAC.GetProfileDetailid(orgID));
        }
コード例 #13
0
        public List <UserProfileEntity> GetSocialMediaByID(int orgID)
        {
            var ProfileDAC = new ProfileDAC();

            return(ProfileDAC.GetSocialMediaByID(orgID));
        }
コード例 #14
0
        public int UpdateProfileDetailByImage(UserProfileEntity profile)
        {
            var ProfileDAC = new ProfileDAC();

            return(ProfileDAC.UpdateProfileDetailByImage(profile));
        }
コード例 #15
0
        public int AddProfile(UserProfileEntity user)
        {
            var ProfileDAC = new ProfileDAC();

            return(ProfileDAC.AddProfile(user));
        }
コード例 #16
0
        public string CheckPassword(string oldpassword, string newpassword)
        {
            ProfileDAC dac = new ProfileDAC();

            return(dac.CheckPassword(oldpassword, newpassword));
        }
コード例 #17
0
        public List <UserProfileEntity> GetUserSocialMediaurls(int userid, int accountid)
        {
            ProfileDAC dac = new ProfileDAC();

            return(dac.GetUserSocialMediaurls(userid, accountid));
        }