protected override void ShowData(int projectPortfolioGroupXProjectPortfolioId) { base.ShowData(projectPortfolioGroupXProjectPortfolioId); oDetailButtonPanel.SetId = SetId; Clear(); var data = new ProjectPortfolioGroupXProjectPortfolioDataModel(); data.ProjectPortfolioGroupXProjectPortfolioId = projectPortfolioGroupXProjectPortfolioId; var items = ProjectPortfolioGroupXProjectPortfolioDataManager.GetEntityDetails(data, SessionVariables.RequestProfile); // should only have single match if (items.Count == 1) { var item = items[0]; lblProjectPortfolioGroupXProjectPortfolioId.Text = item.ProjectPortfolioGroupXProjectPortfolioId.ToString(); lblProjectPortfolioGroupId.Text = item.ProjectPortfolioGroupId.ToString(); lblProjectPortfolioId.Text = item.ProjectPortfolioId.ToString(); lblDescription.Text = item.Description; lblCreatedDate.Text = item.CreatedDate.ToString(); lblModifiedDate.Text = item.ModifiedDate.ToString(); lblCreatedByAuditId.Text = item.CreatedByAuditId.ToString(); lblModifiedByAuditId.Text = item.ModifiedByAuditId.ToString(); lblSortOrder.Text = item.SortOrder.ToString(); oUpdateInfo.LoadText(item.UpdatedDate, item.UpdatedBy, item.LastAction); oHistoryList.Setup(PrimaryEntity, projectPortfolioGroupXProjectPortfolioId, "ProjectPortfolioGroupXProjectPortfolio"); } }
public void LoadData(int projectPortfolioGroupXProjectPortfolioId, bool showId) { // clear UI Clear(); var dataQuery = new ProjectPortfolioGroupXProjectPortfolioDataModel(); dataQuery.ProjectPortfolioGroupXProjectPortfolioId = projectPortfolioGroupXProjectPortfolioId; var items = ProjectPortfolioGroupXProjectPortfolioDataManager.GetEntityDetails(dataQuery, SessionVariables.RequestProfile); if (items.Count != 1) { return; } var item = items[0]; ProjectPortfolioGroupXProjectPortfolioId = item.ProjectPortfolioGroupXProjectPortfolioId; ProjectPortfolioGroupId = item.ProjectPortfolioGroupId; ProjectPortfolioId = item.ProjectPortfolioId; Description = item.Description; CreatedDate = item.CreatedDate; ModifiedDate = item.ModifiedDate; CreatedByAuditId = item.CreatedByAuditId; ModifiedByAuditId = item.ModifiedByAuditId; SortOrder = item.SortOrder; if (item.ProjectPortfolioGroupId != null) { drpProjectPortfolioGroup.SelectedValue = item.ProjectPortfolioGroupId.ToString(); } if (item.ProjectPortfolioId != null) { drpProjectPortfolio.SelectedValue = item.ProjectPortfolioId.ToString(); } if (!showId) { txtProjectPortfolioGroupXProjectPortfolioId.Text = item.ProjectPortfolioGroupXProjectPortfolioId.ToString(); // only show Audit History in case of Update page, not for Clone. oHistoryList.Setup((int)SystemEntity.ProjectPortfolioGroupXProjectPortfolio, projectPortfolioGroupXProjectPortfolioId, "ProjectPortfolioGroupXProjectPortfolio"); } else { txtProjectPortfolioGroupXProjectPortfolioId.Text = String.Empty; } oUpdateInfo.LoadText(item.UpdatedDate, item.UpdatedBy, item.LastAction); }