protected override void ShowData(int activityXDeliverableArtifactId) { base.ShowData(activityXDeliverableArtifactId); oDetailButtonPanel.SetId = SetId; Clear(); var dataQuery = new ActivityXDeliverableArtifactDataModel(); dataQuery.ActivityXDeliverableArtifactId = activityXDeliverableArtifactId; var entityList = ActivityXDeliverableArtifactDataManager.GetEntityList(dataQuery, SessionVariables.RequestProfile); if (entityList.Count == 1) { foreach (var entityItem in entityList) { lblActivityXDeliverableArtifactId.Text = entityItem.ActivityXDeliverableArtifactId.ToString(); lblActivity.Text = entityItem.Activity.ToString(); lblDeliverableArtifacts.Text = entityItem.DeliverableArtifact.ToString(); lblDeliverableArtifactsStatus.Text = entityItem.DeliverableArtifactStatus.ToString(); oUpdateInfo.LoadText(entityItem.UpdatedDate, entityItem.UpdatedBy, entityItem.LastAction); oHistoryList.Setup((int)SystemEntity.ActivityXDeliverableArtifact, activityXDeliverableArtifactId, "NotificationEventType"); } } }
public void LoadData(int activityXDeliverableArtifactId, bool showId) { // clear UI Clear(); // set up parameters var data = new ActivityXDeliverableArtifactDataModel(); data.ActivityXDeliverableArtifactId = activityXDeliverableArtifactId; // get data var items = ActivityXDeliverableArtifactDataManager.GetEntityList(data, SessionVariables.RequestProfile); // should only have single match if (items.Count != 1) { return; } var item = items[0]; txtActivityXDeliverableArtifactId.Text = item.ActivityXDeliverableArtifactId.ToString(); txtActivityId.Text = item.ActivityId.ToString(); txtDeliverableArtifactsId.Text = item.DeliverableArtifactId.ToString(); txtDeliverableArtifactsStatusId.Text = item.DeliverableArtifactStatusId.ToString(); if (!showId) { txtActivityXDeliverableArtifactId.Text = item.ActivityXDeliverableArtifactId.ToString(); //PlaceHolderAuditHistory.Visible = true; // only show Audit History in case of Update page, not for Clone. oHistoryList.Setup(PrimaryEntity, activityXDeliverableArtifactId, PrimaryEntityKey); } else { txtActivityXDeliverableArtifactId.Text = String.Empty; } oUpdateInfo.LoadText(item.UpdatedDate, item.UpdatedBy, item.LastAction); }