private void BindDiagram() { DiagramService diagramService = (DiagramService) new ServiceLocator <Attachment>().locate(); List <UserStoryAttachment> attachments = diagramService.ListAll(); Diagrams.DataSource = attachments; Diagrams.DataBind(); }
protected void gvResult_RowCommand(object sender, GridViewCommandEventArgs e) { string Id = gvResult.DataKeys[Convert.ToInt32(e.CommandArgument)].Values[0].ToString(); DiagramService dService = (DiagramService) new ServiceLocator <Engineer.EMF.Attachment>().locate(); var diagrams = dService.FindByStoryID(int.Parse(Id)); Diagrams.DataSource = diagrams != null ? diagrams : new List <Engineer.EMF.UserStoryAttachment>(); Diagrams.DataBind(); Diagrams.Visible = true; }