예제 #1
0
        // GET: Course
        public ActionResult Detail(string id)
        {
            Project          model = Project.TryFind(id.ToGuid());
            ProjectIntroduce info  = ProjectIntroduce.TryFind(id.ToGuid());

            if (info != null)
            {
                ViewBag.Content = info.Content;
            }
            return(View(model));
        }
예제 #2
0
 public ActionResult ProIndro(string id)
 {
     if (id.ToGuid().IsNotEmpty())
     {
         var model = ProjectIntroduce.TryFind(id.ToGuid());
         if (model == null)
         {
             model    = new ProjectIntroduce();
             model.ID = id.ToGuid();
         }
         return(View(model));
     }
     else
     {
         return(RedirectToAction("ErrorPage", "Error", new { msg = "获取用户信息失败" }));
     }
 }
예제 #3
0
        public ActionResult DocsSave(ProjectIntroduce model)
        {
            var info = ProjectIntroduce.TryFind(model.ID);

            if (info != null)
            {
                model.UpUser = LUser.UserName;
                model.UpTime = DateTime.Now;
                model.UpdateAndFlush();
            }
            else
            {
                model.CrTime   = DateTime.Now;
                model.CrUser   = LUser.UserName;
                model.CrUserID = LUser.UserId.ToGuid();
                model.UpUser   = LUser.UserName;
                model.UpTime   = DateTime.Now;
                model.CreateAndFlush();
            }
            return(View("ProIndro", model));
        }