public ActionResult AddContent(Content content)
        {
            string mail         = (string)Session["WriterMail"];
            var    writerIdInfo = c.Writers.Where(x => x.WriterMail == mail).Select(y => y.WriterID).FirstOrDefault();

            content.ContentDate   = DateTime.Parse(DateTime.Now.ToShortDateString());
            content.WriterID      = writerIdInfo;
            content.ContentStatus = true;
            cm.ContentAdd(content);
            return(RedirectToAction("MyContent"));
        }
        public ActionResult AddContent(Content p)
        {
            string mail         = (string)Session["WriterMail"];
            var    writeridinfo = vm.GetByWriterId(mail);

            p.ContentDate    = DateTime.Parse(DateTime.Now.ToShortDateString());
            p.WriterID       = writeridinfo;
            p.ContentSatatus = true;
            cm.ContentAdd(p);
            return(RedirectToAction("MyContent"));
        }
Example #3
0
        public ActionResult AddContent(Content p)
        {
            var a          = (string)Session["Writermail"];
            var writerinfo = wm.GetByMail(a);

            p.ContentDate   = DateTime.Parse(DateTime.Now.ToLongDateString());
            p.WriterId      = writerinfo.WriterId;
            p.ContentStatus = true;
            cm.ContentAdd(p);
            return(RedirectToAction("MyContent"));
        }
Example #4
0
        public ActionResult AddContent(Content p)
        {
            p.ContentDate = DateTime.Parse(DateTime.Now.ToShortDateString());
            string mail          = (string)Session["WriterMail"];
            var    writeridinfo  = c.Writers.Where(x => x.WriterMail == mail).Select(y => y.WriterID).FirstOrDefault();
            var    contentValues = cm.GetListByWriter(writeridinfo);

            p.WriterID      = writeridinfo;
            p.ContentStatus = true;
            cm.ContentAdd(p);
            return(RedirectToAction("MyContent"));
        }
Example #5
0
        public ActionResult AddContent(Content p, string s)
        {
            Context c = new Context();

            s = (string)Session["WriterMail"];
            var deger = c.Writers.Where(x => x.WriterMail == s).Select(a => a.WriterID).FirstOrDefault();
            int id    = deger;

            p.ContentDate   = DateTime.Now;
            p.WriterID      = id;
            p.ContentStatus = true;
            cm.ContentAdd(p);
            return(RedirectToAction("MyContent"));
        }