示例#1
0
        public ActionResult SchoolNewsIndex()
        {
            var model = new SchoolNewsModel
            {
                Id         = GetParams <int>("id"),
                SchoolId   = GetParams <string>("schoolid"),
                Newstitle  = GetParams <string>("newstitle"),
                News       = GetParams <string>("news"),
                Status     = GetParams <int>("status"),
                Createtime = GetParams <DateTime>("createtime"),
                Updatetime = GetParams <DateTime>("updatetime"),
            };

            return(View(model));
        }
 public static SchoolNewsPO ToPO(this SchoolNewsModel item)
 {
     if (item == null)
     {
         return(null);
     }
     return(new SchoolNewsPO
     {
         Id = item.Id,
         SchoolId = item.SchoolId,
         Newstitle = item.Newstitle,
         News = item.News,
         Status = item.Status,
         Createtime = item.Createtime,
         Updatetime = item.Updatetime,
     });
 }
示例#3
0
 public bool Save(SchoolNewsModel model)
 {
     return(new SchoolNewsService().Save(model));
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public bool Save(SchoolNewsModel model)
 {
     return(SchoolNewsRepository.Save(model.ToPO()));
 }