public IHttpActionResult Post([FromBody] DesignApply entity) { using (ctx = new YwtDbContext()) { entity.apply_createTime = DateTime.Now; entity.apply_status = ApplyStaus.WaitAuditing.ToString(); ctx.DesignApply.Add(entity); ctx.SaveChanges(); return(Ok(entity)); } }
/// <summary> /// 提交设计方案 /// </summary> /// <returns></returns> public IHttpActionResult PostDesignPlanReview([FromBody] DesignApply entity) { using (ctx = new YwtDbContext()) { var model = ctx.DesignApply.FirstOrDefault(m => m.apply_id == entity.apply_id); if (model == null) { return(NotFound()); } model.plan_status = true; ctx.SaveChanges(); return(Ok()); } }
/// <summary> /// 需求确认 /// </summary> /// <param name="applyid"></param> /// <returns></returns> public IHttpActionResult ConfirmDesignApply([FromBody] DesignApply entity) { using (ctx = new YwtDbContext()) { var model = ctx.DesignApply.FirstOrDefault(m => m.apply_id == entity.apply_id); if (model == null) { return(NotFound()); } model.apply_status = ApplyStaus.Designing.ToString(); model.apply_plantime = entity.apply_plantime; ctx.SaveChanges(); return(Ok(entity)); } }