public ActionResult UpdateNotifyIds(int id, int topid, string field) { var t = DbUtil.Db.FetchOrCreateTag(Util.SessionId, Util.UserPeopleId, DbUtil.TagTypeId_AddSelected); var selected_pids = (from p in t.People(DbUtil.Db) orderby p.PeopleId == topid ? "0" : "1" select p.PeopleId).ToArray(); var o = DbUtil.Db.LoadOrganizationById(Util2.CurrentOrgId); var notifyids = string.Join(",", selected_pids); switch (field) { case "notifyids": o.NotifyIds = notifyids; break; case "giftnotifyids": o.GiftNotifyIds = notifyids; break; } DbUtil.Db.TagPeople.DeleteAllOnSubmit(t.PersonTags); DbUtil.Db.Tags.DeleteOnSubmit(t); DbUtil.Db.SubmitChanges(); ViewBag.OrgId = id; ViewBag.field = field; var view = ViewExtensions2.RenderPartialViewToString2(this, "NotifyList2", notifyids); return(Content(view)); //return View("NotifyList2", notifyids); }
private ActionResult FlowList(OnlineRegModel m, string function) { try { var view = ViewExtensions2.RenderPartialViewToString2(this, "Flow/List", m); return(Content(view)); } catch (Exception ex) { return(ErrorResult(m, ex, "In " + function + ex.Message)); } }
private ActionResult FlowList(OnlineRegModel m) { try { m.UpdateDatum(); m.Log(fromMethod); var content = ViewExtensions2.RenderPartialViewToString2(this, "Flow2/List", m); return(Content(content)); } catch (Exception ex) { return(ErrorResult(m, ex, "In " + fromMethod + "<br>" + ex.Message)); } }
private ActionResult FlowList(OnlineRegModel m, string function) { try { m.UpdateDatum(); var view = m.UseBootstrap ? "Flow2/List" : "Flow/List"; var content = ViewExtensions2.RenderPartialViewToString2(this, view, m); return(Content(content)); } catch (Exception ex) { return(ErrorResult(m, ex, "In " + function + ex.Message)); } }