public HttpResponseMessage SaveProductsItems(string officeNumber, IEnumerable <ProductsSetup> items)
        {
            var common = new Business.Admin.Common();

            this.productsManager.SaveProductsItems(items, common.GetCompanyId(officeNumber));
            return(Request.CreateResponse(HttpStatusCode.OK, "Contact Lens saved."));
        }
        public HttpResponseMessage SaveEyeglassLensItems(string officeNumber, string lensAttribute, IEnumerable <EyeglassLensSetup> items)
        {
            var  common = new Business.Admin.Common();
            int? lensAttributeId;
            bool savePrice = true;

            if (!string.IsNullOrEmpty(lensAttribute))
            {
                lensAttributeId = Convert.ToInt32(lensAttribute);
            }
            else
            {
                return(Request.CreateResponse(HttpStatusCode.BadRequest, "Please select an item type."));
            }

            if (lensAttributeId.GetValueOrDefault() == (int)ItemTypeEnum.EyeglassLens)
            {
                savePrice = false;
            }

            this.productsManager.SaveEyeglassLensItems(items, lensAttributeId.GetValueOrDefault(), common.GetCompanyId(officeNumber), savePrice);
            return(Request.CreateResponse(HttpStatusCode.OK, "Eyeglass Lens Items saved."));
        }