// POST api/ProductionOrderDescription
        public HttpResponseMessage PostProductionOrderDescription(ProductionOrderDescription productionorderdescription)
        {
            if (ModelState.IsValid)
            {
                //db.ProductionOrderDescriptions.Add(productionorderdescription);
                productionorderdescription.InsertBy = loginUser.UserID;
                db.Entry(productionorderdescription).State = productionorderdescription.ProductionOrderDescriptionID == 0 ?
                EntityState.Added : EntityState.Modified;
                db.SaveChanges();

                HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.Created, productionorderdescription);
                response.Headers.Location = new Uri(Url.Link("DefaultApi", new { id = productionorderdescription.ProductionOrderDescriptionID }));
                return response;
            }
            else
            {
                return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
            }
        }
        // PUT api/ProductionOrderDescription/5
        public HttpResponseMessage PutProductionOrderDescription(long id, ProductionOrderDescription productionorderdescription)
        {
            if (!ModelState.IsValid)
            {
                return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
            }

            if (id != productionorderdescription.ProductionOrderDescriptionID)
            {
                return Request.CreateResponse(HttpStatusCode.BadRequest);
            }

            productionorderdescription.UpdateBy = loginUser.UserID;
            db.Entry(productionorderdescription).State = EntityState.Modified;

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException ex)
            {
                return Request.CreateErrorResponse(HttpStatusCode.NotFound, ex);
            }

            return Request.CreateResponse(HttpStatusCode.OK);
        }