public ActionResult ChangeMobo(cMobo mobo, 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(mobo.id).Quantity; } if (image != null && image != "") { part.Image = image; } else { part.Image = sr.getPart(mobo.id).image; } bool done = sr.EditMobo(mobo, part, mobo.id); if (done) { return(this.Redirect(Url.Action("Complete", "EditProduct"))); } else { return(this.Redirect(Url.Action("Mobo", "EditProduct"))); } }