private void NotifyEditing(IEngine engine, HttpContextWrapper context) { var selection = new SelectionUtility(context, engine); if (Convert.ToBoolean(context.Request["changes"])) engine.AddActivity(new ManagementActivity { Operation = "Edit", PerformedBy = context.User.Identity.Name, ID = selection.SelectedItem.ID, Path = selection.SelectedItem.Path }); var activities = ManagementActivity.GetActivity(engine, selection.SelectedItem); context.Response.ContentType = "application/json"; context.Response.Write(ManagementActivity.ToJson(activities)); }
private void NotifyViewing(IEngine engine, HttpContextWrapper context) { var selection = new SelectionUtility(context, engine); if (selection.SelectedItem != null) { engine.AddActivity(new ManagementActivity { Operation = "View", PerformedBy = context.User.Identity.Name, ID = selection.SelectedItem.ID, Path = selection.SelectedItem.Path }); } }
private void NotifyEditing(IEngine engine, HttpContextWrapper context) { var selection = new SelectionUtility(context, engine); if (Convert.ToBoolean(context.Request["changes"])) engine.AddActivity(new ManagementActivity { Operation = "Edit", PerformedBy = context.User.Identity.Name, ID = selection.SelectedItem.ID, Path = selection.SelectedItem.Path }); var activities = ManagementActivity.GetActivity(engine, selection.SelectedItem); var messages = engine.Resolve<N2.Edit.Collaboration.ManagementMessageCollector>() .GetMessages(CollaborationContext.Create(engine.Resolve<IProfileRepository>(), selection.SelectedItem, context)) .ToList(); context.Response.ContentType = "application/json"; context.Response.Write(ManagementActivity.ToJson(activities, messages)); }
private void NotifyViewing(IEngine engine, HttpContextWrapper context) { var selection = new SelectionUtility(context, engine); if (selection.SelectedItem != null) engine.AddActivity(new ManagementActivity { Operation = "View", PerformedBy = context.User.Identity.Name, ID = selection.SelectedItem.ID, Path = selection.SelectedItem.Path }); context.Response.WriteJson(new { Messages = engine.Resolve<ManagementMessageCollector>() .GetMessages(CollaborationContext.Create(engine.Resolve<IProfileRepository>(), selection.SelectedItem, context)) .ToList() }); }
private void NotifyEditing(IEngine engine, HttpContextWrapper context) { var selection = new SelectionUtility(context, engine); if (Convert.ToBoolean(context.Request["changes"])) { engine.AddActivity(new ManagementActivity { Operation = "Edit", PerformedBy = context.User.Identity.Name, ID = selection.SelectedItem.ID, Path = selection.SelectedItem.Path }); } var activities = ManagementActivity.GetActivity(engine, selection.SelectedItem); context.Response.ContentType = "application/json"; context.Response.Write(ManagementActivity.ToJson(activities)); }
private void NotifyViewing(IEngine engine, HttpContextWrapper context) { var selection = new SelectionUtility(context, engine); if (selection.SelectedItem != null) { engine.AddActivity(new ManagementActivity { Operation = "View", PerformedBy = context.User.Identity.Name, ID = selection.SelectedItem.ID, Path = selection.SelectedItem.Path }); } context.Response.WriteJson(new { Messages = engine.Resolve <ManagementMessageCollector>() .GetMessages(CollaborationContext.Create(engine.Resolve <IProfileRepository>(), selection.SelectedItem, context)) .ToList() }); }
private void NotifyEditing(IEngine engine, HttpContextWrapper context) { var selection = new SelectionUtility(context, engine); if (Convert.ToBoolean(context.Request["changes"])) { engine.AddActivity(new ManagementActivity { Operation = "Edit", PerformedBy = context.User.Identity.Name, ID = selection.SelectedItem.ID, Path = selection.SelectedItem.Path }); } var activities = ManagementActivity.GetActivity(engine, selection.SelectedItem); var messages = engine.Resolve <N2.Edit.Collaboration.ManagementMessageCollector>() .GetMessages(CollaborationContext.Create(engine.Resolve <IProfileRepository>(), selection.SelectedItem, context)) .ToList(); context.Response.ContentType = "application/json"; context.Response.Write(ManagementActivity.ToJson(activities, messages)); }
private void NotifyViewing(IEngine engine, HttpContextWrapper context) { var selection = new SelectionUtility(context, engine); if (selection.SelectedItem != null) engine.AddActivity(new ManagementActivity { Operation = "View", PerformedBy = context.User.Identity.Name, ID = selection.SelectedItem.ID, Path = selection.SelectedItem.Path }); }