Ejemplo n.º 1
0
        /// <summary>
        /// Build interface based on various Repeaters
        /// </summary>
        protected void BindItems()
        {
            // HEADER ROW and COLUMNS (Controls columns which represents Visits)
            PreStudyItemsRptr.DataSource = PreStudyTimeline;
            PreStudyItemsRptr.DataBind();

            OnStudyItemsRptr.DataSource = OnStudyTimeline;
            OnStudyItemsRptr.DataBind();

            // POPUP DATA ENTRY LAYER for each Visit
            PreStudyItemsLayerRptr.DataSource = PreStudyTimeline;
            PreStudyItemsLayerRptr.DataBind();

            OnStudyItemsLayerRptr.DataSource = OnStudyTimeline;
            OnStudyItemsLayerRptr.DataBind();

            DataView SchemaItemsList = GetSchemaItemsList();

            // SCHEMA ITEM ROWS
            SchemaItemsRptr.DataSource = SchemaItemsList;
            SchemaItemsRptr.DataBind();

            // SCHEMA ITEM ROWS for EACH TIMELINEITEM (n-Columns for each x-Row)
            SchemaItemsTimelineItemRptr.DataSource = SchemaItemsList;
            SchemaItemsTimelineItemRptr.DataBind();
        }
Ejemplo n.º 2
0
        private void GetTemplates()
        {
            TemplatesRptr.DataSource = ProtocolMgmtDa.GetAllTemplates();
            TemplatesRptr.DataBind();

            int       schemaId = int.Parse(BaseSchemaId);
            DataTable dt       = ProtocolMgmtDa.GetDistinctSchemaItems(schemaId);

            SchemaItemsRptr.DataSource = dt;
            SchemaItemsRptr.DataBind();
        }
Ejemplo n.º 3
0
        protected void BuildSchemaTimeline(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(SchemaSelection.Value))
            {
                int schemaId = int.Parse(SchemaSelection.Value);
                timeline = ProtocolMgmtDa.GetTimelineBySchmeaId(schemaId).DefaultView;

                dirtyTimelineIndexes.Clear();
                dirtyItemTimelineIndexes.Clear();

                TimelinePanel.Visible = true;

                TimelineRptr.DataSource = timeline;
                TimelineRptr.DataBind();

                //DataView schemaItems = BusinessObject.GetByParentAsDataView<SchemaItem>(schemaId);
                DataView schemaItems = ProtocolMgmtDa.GetDistinctSchemaItems(schemaId).DefaultView;

                var kvp = from row in ProtocolMgmtDa.GetTimelineItemsBySchemaId(schemaId).AsEnumerable()
                          let rowTimelineId = (int)row[Timeline.TimelineId]
                                              let rowSchemaItemId = (int)row[SchemaItem.SchemaItemId]
                                                                    let rowItemTimelineId = (int)row[ItemTimeline.ItemTimelineId]
                                                                                            select new
                {
                    TimelineId     = rowTimelineId,
                    SchemaItemId   = rowSchemaItemId,
                    ItemTimelineId = rowItemTimelineId
                };
                itemTimelineLookup = kvp.ToDictionary(a => new KeyValuePair <int, int>(a.TimelineId, a.SchemaItemId), a => a.ItemTimelineId);

                itemTimelineView = ProtocolMgmtDa.GetTimelineItemsBySchemaId(schemaId).DefaultView;

                SchemaItemsRptr.DataSource = schemaItems;
                SchemaItemsRptr.DataBind();
            }
            else
            {
                TimelinePanel.Visible = false;
            }
        }