public ActionResult EditDivision(division divisionEdited)
        {
            Object returnValues = new { };

            var divisions = (from d in sql.divisions
                         where d.code == divisionEdited.code
                         select d);

            if (divisions.Count() > 0)
            {
                division divisionToEdit = divisions.First();
                divisionToEdit.code = divisionEdited.code;
                divisionToEdit.description = divisionEdited.description;

                returnValues = new { edited = "true" };
            }
            else
            {
                sql.divisions.InsertOnSubmit(divisionEdited);
                returnValues = new { added = "true" };
            }

            sql.SubmitChanges();

            return RedirectToAction("Divisions", returnValues);
        }
 partial void Updatedivision(division instance);
 partial void Deletedivision(division instance);
 partial void Insertdivision(division instance);