Example #1
0
        public ActionResult PostEdit(WorkGuide entity)
        {
            using (LoveBankDBContext db = new LoveBankDBContext())
            {
                WorkGuide work = db.T_WorkGuide.Find(entity.Id);

                work.AddTime = DateTime.Now;
                work.Des = entity.Des;
                work.AddUser = entity.AddUser;
                work.ImgUrl = entity.ImgUrl;
                work.Title = entity.Title;
                work.LinkSocSerUrl = entity.LinkSocSerUrl;
                work.UploadHtmlFile = entity.UploadHtmlFile;
                db.Update(work);
                db.SaveChanges();

            }
            return Success("添加成功");
        }
Example #2
0
        public ActionResult PostAdd(WorkGuide entity)
        {
            entity.DepId = AdminUser.DeptId;
            entity.AddUser = AdminUser.UserName;

            using (LoveBankDBContext db = new LoveBankDBContext())
            {
                entity.AddTime = DateTime.Now;
                db.Add(entity);
                db.SaveChanges();

            }
            return Success("添加成功");
        }