Ejemplo n.º 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));
     }
 }
Ejemplo n.º 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());
            }
        }
Ejemplo n.º 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));
            }
        }