public ActionResult ToggleTag(int id, int tagdiv) { var Db = DbUtil.Db; var organization = Db.LoadOrganizationById(id); if (tagdiv == 0) return Json(new { error = "bad tagdiv" }); bool t = organization.ToggleTag(DbUtil.Db, tagdiv); Db.SubmitChanges(); var m = new OrganizationModel { TagDiv = tagdiv, Name = id.ToString() }; var o = m.OrganizationList().SingleOrDefault(); if (o == null) return Content("error"); return View("Row", o); }
public ActionResult PasteSettings(OrganizationModel m) { var frorg = (int)Session["OrgCopySettings"]; foreach (var o in m.OrganizationList()) { var toorg = DbUtil.Db.LoadOrganizationById(o.Id); toorg.CopySettings(DbUtil.Db, frorg); } return new EmptyResult(); }
public ActionResult RepairTransactions(OrganizationModel m) { foreach (var o in m.OrganizationList()) DbUtil.Db.PopulateComputedEnrollmentTransactions(o.Id); return new EmptyResult(); }
public ActionResult MainDiv(int id, int tagdiv) { var Db = DbUtil.Db; Db.SetMainDivision(id, tagdiv); var m = new OrganizationModel { TagDiv = tagdiv, Name = id.ToString() }; var o = m.OrganizationList().SingleOrDefault(); if (o == null) return Content("error"); return View("Row", o); }