public void LoadData(int TaskXDeliverableArtifactId, bool showId) { var data = new TaskXDeliverableArtifactDataModel(); data.TaskXDeliverableArtifactId = TaskXDeliverableArtifactId; var oTaskXDeliverableArtifactTable = TaskXDeliverableArtifactDataManager.GetDetails(data, SessionVariables.RequestProfile); if (oTaskXDeliverableArtifactTable.Rows.Count == 1) { var row = oTaskXDeliverableArtifactTable.Rows[0]; if (!showId) { txtTaskXDeliverableArtifactId.Text = Convert.ToString(row[TaskXDeliverableArtifactDataModel.DataColumns.TaskXDeliverableArtifactId]); dynAuditHistory.Visible = true; // only show Audit History in case of Update page, not for Clone. oHistoryList.Setup((int)SystemEntity.TaskXDeliverableArtifact, TaskXDeliverableArtifactId, "TaskXDeliverableArtifact"); dynAuditHistory.Visible = PerferenceUtility.GetUserPreferenceByKeyAsBoolean(ApplicationCommon.HistoryGridVisibilityKey, "TaskXDeliverableArtifact"); } else { txtTaskXDeliverableArtifactId.Text = String.Empty; } txtDeliverableArtifactsId.Text = Convert.ToString(row[TaskXDeliverableArtifactDataModel.DataColumns.DeliverableArtifactId]); txtTaskId.Text = Convert.ToString(row[TaskXDeliverableArtifactDataModel.DataColumns.TaskId]); txtDeliverableArtifactStatusId.Text = Convert.ToString(row[TaskXDeliverableArtifactDataModel.DataColumns.DeliverableArtifactStatusId]); drpDeliverableArtifactStatusList.SelectedValue = Convert.ToString(row[TaskXDeliverableArtifactDataModel.DataColumns.DeliverableArtifactStatusId]); drpTaskList.SelectedValue = Convert.ToString(row[TaskXDeliverableArtifactDataModel.DataColumns.TaskId]); drpDeliverableArtifactsList.SelectedValue = Convert.ToString(row[TaskXDeliverableArtifactDataModel.DataColumns.DeliverableArtifactId]); } else { txtTaskXDeliverableArtifactId.Text = String.Empty; txtTaskId.Text = String.Empty; txtDeliverableArtifactStatusId.Text = String.Empty; txtDeliverableArtifactsId.Text = String.Empty; } }
protected override DataTable GetData() { try { SuperKey = ApplicationCommon.GetSuperKey(); SetId = ApplicationCommon.GetSetId(); var selectedrows = new DataTable(); var taskXDeliverableArtifactdata = new TaskXDeliverableArtifactDataModel(); selectedrows = TaskXDeliverableArtifactDataManager.GetDetails(taskXDeliverableArtifactdata, SessionVariables.RequestProfile).Clone(); if (!string.IsNullOrEmpty(SuperKey)) { var systemEntityTypeId = (int)PrimaryEntity; var lstEntityKeys = ApplicationCommon.GetSuperKeyDetails(systemEntityTypeId, SuperKey); foreach (var entityKey in lstEntityKeys) { taskXDeliverableArtifactdata.TaskXDeliverableArtifactId = entityKey; var result = TaskXDeliverableArtifactDataManager.GetDetails(taskXDeliverableArtifactdata, SessionVariables.RequestProfile); selectedrows.ImportRow(result.Rows[0]); } } else { taskXDeliverableArtifactdata.TaskXDeliverableArtifactId = SetId; var result = TaskXDeliverableArtifactDataManager.GetDetails(taskXDeliverableArtifactdata, SessionVariables.RequestProfile); selectedrows.ImportRow(result.Rows[0]); } return(selectedrows); } catch (Exception ex) { Response.Write(ex.Message); } return(null); }