private void BindDiagram() { DiagramService diagramService = (DiagramService) new ServiceLocator <Attachment>().locate(); List <UserStoryAttachment> attachments = diagramService.ListAll(); Diagrams.DataSource = attachments; Diagrams.DataBind(); }
public static object GetAllDiagrams() { List <UserStoryAttachment> diagrams = null; if (new List().IsAdmin()) { diagrams = service.ListAll(); } else { diagrams = service.FindByUsers(new string[] { new List().GetUserId() }); } return(Utils.SerializeObject(diagrams)); }