public ActionResult ToggleTag(int id, int tagdiv) { //var Db = Db; var organization = CurrentDatabase.LoadOrganizationById(id); if (tagdiv == 0) { return(Json(new { error = "bad tagdiv" })); } var t = organization.ToggleTag(CurrentDatabase, tagdiv); CurrentDatabase.SubmitChanges(); var m = new OrgSearchModel(CurrentDatabase) { StatusId = 0, TagDiv = tagdiv, Name = id.ToString() }; var o = m.OrganizationList().SingleOrDefault(); if (o == null) { return(Content("error")); } return(View("Row", o)); }
public ActionResult RepairTransactions(OrgSearchModel m) { foreach (var o in m.OrganizationList()) { DbUtil.Db.PopulateComputedEnrollmentTransactions(o.Id); } return(new EmptyResult()); }
public ActionResult PasteSettings(OrgSearchModel 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 MainDiv(int id, int tagdiv) { var Db = DbUtil.Db; Db.SetMainDivision(id, tagdiv); var m = new OrgSearchModel { TagDiv = tagdiv, Name = id.ToString() }; var o = m.OrganizationList().SingleOrDefault(); if (o == null) { return(Content("error")); } return(View("Row", o)); }