public ActionResult ChangeSSD(cSSD ssd, int?quantity, string image) { CRUDService.ServiceClient sr = new CRUDService.ServiceClient(); PartsStock part = new PartsStock(); if (quantity != null) { part.Quantity = (int)quantity; } else { part.Quantity = sr.getPart(ssd.id).Quantity; } if (image != null && image != "") { part.Image = image; } else { part.Image = sr.getPart(ssd.id).image; } bool done = sr.EditSSD(ssd, part, ssd.id); if (done) { return(this.Redirect(Url.Action("Complete", "EditProduct"))); } else { return(this.Redirect(Url.Action("SSD", "EditProduct"))); } }