public ActionResult Edit(int id, Order order) { try { // TODO: Add update logic here DateTime oldStartDate = orderDb.Get(id).StartDate; orderDb.Edit(order); if (order.StartDate == oldStartDate) { return(RedirectToAction(ActionNameIndex)); } else { return(RedirectToAction(ActionNameIndexWithId + id)); } } catch { try { Order_Edit model = new Order_Edit(customerDb, employeeDb, statusDb, order);; return(View(model)); } catch (NotFoundInDatabaseException) { return(View(ViewNameNotFound)); } } }