示例#1
0
 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));
     }
 }
示例#2
0
        /// <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());
            }
        }
示例#3
0
        /// <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));
            }
        }