public HttpResponseMessage Addstep(PM_BPM_STEP definitions)
        {
            definitions.CreatedOn = DateTime.Now;
            PM_BPM_STEP_QueryParam stepQueray = new PM_BPM_STEP_QueryParam();

            stepQueray.StepID = definitions.StepID;

            IList <PM_BPM_STEP> list = stepBO.GetEntities(stepQueray);

            if (list.Count != 0)
            {
                return(Request.CreateResponse(HttpStatusCode.OK, "该工序已经存在"));
            }
            else
            {
                definitions.StepGuid = Guid.NewGuid();
                PM_BPM_STEP mmExt = stepBO.Insert(definitions);
                if (mmExt != null)
                {
                    return(Request.CreateResponse(HttpStatusCode.OK, "新增成功"));
                }
                else
                {
                    return(Request.CreateResponse(HttpStatusCode.InternalServerError, "新增失败"));
                }
            }
        }
        public HttpResponseMessage Updatestep(PM_BPM_STEP definitions)
        {
            definitions.CreatedOn = DateTime.Now;
            try
            {
                PM_BPM_STEP_QueryParam stepQueray = new PM_BPM_STEP_QueryParam();
                stepQueray.StepID = definitions.StepID;

                IList <PM_BPM_STEP> list = stepBO.GetEntities(stepQueray);
                if (list.Count != 0)
                {
                    return(Request.CreateResponse(HttpStatusCode.OK, "该工序已经存在"));
                }
                else
                {
                    stepBO.Update(definitions);
                    return(Request.CreateResponse(HttpStatusCode.OK, "修改成功"));
                }
            }
            catch (Exception e)
            {
                return(Request.CreateResponse(HttpStatusCode.InternalServerError, "修改失败"));

                throw e;
            }
        }