public ActionResult Place(Code code) { try { int x = (int)Math.Round(Convert.ToDouble(Request["x"].ToString())); int y = (int)Math.Round(Convert.ToDouble(Request["y"].ToString())); int width = (int)Math.Round(Convert.ToDouble(Request["width"].ToString())); int height = (int)Math.Round(Convert.ToDouble(Request["height"].ToString())); code.Rectangle = new Rectangle(x, y, width, height); code = DataAccessor.CodeRepository.UpdateCode(code); QrCodeHelper.CreateCode(code); QrCodeHelper.CreateThumbnail(code); if (!IsAuthenticated()) { CookieHelper.AddAnonymousCodeId(Request, Response, code.CodeId); } return(RedirectToAction("Dashboard", "Generator")); } catch (QRBaException ex) { Danger(ex.Message); return(View(code)); } }