public IHttpActionResult AddChildren([FromBody] PropertyChildrenDto ch) { return(Ok(Bl.PropertyChildrenBl.AddChildren(ch))); // if (b) // return Ok(); // return BadRequest(); }
public IHttpActionResult UpdateChildren([FromBody] PropertyChildrenDto ch) { bool b = Bl.PropertyChildrenBl.UpdateChildren(ch); if (b) { return(Ok()); } return(BadRequest()); }
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); }