Esempio n. 1
0
        public ActionResult List(string ChannelName)
        {
            List <Comment> Comments = _commentService.GetActive();

            Dictionary <string, string> comments = new Dictionary <string, string>();

            TubeRehber.Model.Entities.Channel channel = _channelService.GetChannelByChannelName(ChannelName);

            string ChannelID = channel.ID.ToString();


            foreach (var item in Comments)
            {
                if (item.ChannelID.ToString() == ChannelID)
                {
                    TubeRehber.Model.Entities.Member member = _memberService.GetByID(item.MemberID);


                    comments.Add(item.comment, member.UserName);
                }
            }
            TempData["Yorumlar"] = comments;

            return(View());
        }
Esempio n. 2
0
        public ActionResult Add(TubeRehber.Model.Entities.Member data)
        {
            data.CreatedBy = userID;
            data.Status    = TubeRehber.Core.Entity.Enum.Status.Active;
            _memberService.Add(data);
            _memberService.Save();



            return(RedirectToAction("Index"));
        }
Esempio n. 3
0
        public ActionResult Update(Guid?id)
        {
            if (id == null)
            {
                return(RedirectToAction("Index"));
            }
            TubeRehber.Model.Entities.Member guncellenecek = _memberService.GetByID((Guid)id);


            return(View(guncellenecek));
        }
Esempio n. 4
0
        public ActionResult Add(TubeRehber.Model.Entities.Comment data, string ChannelName)
        {
            if (data.comment != null)
            {
                TubeRehber.Model.Entities.Member currentUser = _memberService.GetuserByUserName(HttpContext.User.Identity.Name);
                data.MemberID = currentUser.ID;
                TubeRehber.Model.Entities.Channel channel = _channelService.GetChannelByChannelName(ChannelName);
                data.ChannelID = channel.ID;


                _commentService.Add(data);
                _commentService.Save();
            }
            return(RedirectToAction("Index"));
        }
Esempio n. 5
0
        public ActionResult Update(TubeRehber.Model.Entities.Member data)
        {
            TubeRehber.Model.Entities.Member guncellenecek = _memberService.GetByID(data.ID);


            data.CreatedBy          = userID;
            guncellenecek.Name      = data.Name;
            guncellenecek.SurName   = data.SurName;
            guncellenecek.UserName  = data.UserName;
            guncellenecek.BirthDate = data.BirthDate;
            guncellenecek.Email     = data.Email;
            guncellenecek.Role      = data.Role;
            guncellenecek.Password  = data.Password;
            guncellenecek.Status    = data.Status;



            _memberService.Update(guncellenecek);
            _memberService.Save();
            return(RedirectToAction("Index"));
        }
        public ActionResult Remember(string UserName, string Email)
        {
            if (UserName != null && Email == null)
            {
                TubeRehber.Model.Entities.Member KullanıcıAdı = _memberService.GetuserByUserName(UserName);
                if (KullanıcıAdı == null)
                {
                    if (KullanıcıAdı.Email == Email)
                    {
                        ViewBag.Password = KullanıcıAdı.Password;
                        return(View());
                    }
                }
                else
                {
                    return(RedirectToAction("Hata"));
                }
            }


            return(RedirectToAction("Hata"));
        }