コード例 #1
0
 public IHttpActionResult AddChildren([FromBody] PropertyChildrenDto ch)
 {
     return(Ok(Bl.PropertyChildrenBl.AddChildren(ch)));
     //  if (b)
     //      return Ok();
     //  return BadRequest();
 }
コード例 #2
0
        public IHttpActionResult UpdateChildren([FromBody] PropertyChildrenDto ch)
        {
            bool b = Bl.PropertyChildrenBl.UpdateChildren(ch);

            if (b)
            {
                return(Ok());
            }
            return(BadRequest());
        }
コード例 #3
0
 public static bool UpdateChildren(PropertyChildrenDto ch)
 {
     using (kindergardenEntities db = new kindergardenEntities())
     {
         bool     id    = false;
         Children poDal = PropertyChildrenDto.ToDal(ch);
         if (poDal.ChildId != null && poDal.ChildClass != null && poDal.ChildGroup != null && poDal.ChildName != null)
         {
             id = PropertyChildrenDal.UpdateChildren(poDal);
         }
         return(id);
     }
     return(false);
 }