public override void LoadDropDownListSources(string fieldName, DropDownList dropDownListControl) { base.LoadDropDownListSources(fieldName, dropDownListControl); if (fieldName.Equals("ActivityId")) { var activitydata = ActivityDataManager.GetList(SessionVariables.RequestProfile); UIHelper.LoadDropDown(activitydata, dropDownListControl, StandardDataModel.StandardDataColumns.Name, ActivityDataModel.DataColumns.ActivityId); } if (fieldName.Equals("DeliverableArtifactId")) { var dasdata = DeliverableArtifactDataManager.GetList(SessionVariables.RequestProfile); UIHelper.LoadDropDown(dasdata, dropDownListControl, StandardDataModel.StandardDataColumns.Name, DeliverableArtifactDataModel.DataColumns.DeliverableArtifactId); } if (fieldName.Equals("DeliverableArtifactStatusId")) { var dasdata = DeliverableArtifactStatusDataManager.GetList(SessionVariables.RequestProfile); UIHelper.LoadDropDown(dasdata, dropDownListControl, StandardDataModel.StandardDataColumns.Name, DeliverableArtifactStatusDataModel.DataColumns.DeliverableArtifactStatusId); } }
private void SetupDropdown() { var isTesting = SessionVariables.IsTesting; var activityData = ActivityDataManager.GetList(SessionVariables.RequestProfile); UIHelper.LoadDropDown(activityData, drpActivityList, StandardDataModel.StandardDataColumns.Name, ActivityDataModel.DataColumns.ActivityId); var taskAlgorithmItemIdData = TaskAlgorithmDataManager.GetList(SessionVariables.RequestProfile); UIHelper.LoadDropDown(taskAlgorithmItemIdData, drpTaskAlgorithmList, StandardDataModel.StandardDataColumns.Name, TaskAlgorithmDataModel.DataColumns.TaskAlgorithmId); if (isTesting) { drpActivityList.AutoPostBack = true; drpTaskAlgorithmList.AutoPostBack = true; if (drpActivityList.Items.Count > 0) { if (!string.IsNullOrEmpty(txtActivityId.Text.Trim())) { drpActivityList.SelectedValue = txtActivityId.Text; } else { txtActivityId.Text = drpActivityList.SelectedItem.Value; } } if (drpTaskAlgorithmList.Items.Count > 0) { if (!string.IsNullOrEmpty(txtTaskAlgorithmId.Text.Trim())) { drpTaskAlgorithmList.SelectedValue = txtTaskAlgorithmId.Text; } else { txtTaskAlgorithmId.Text = drpTaskAlgorithmList.SelectedItem.Value; } } txtActivityId.Visible = true; txtTaskAlgorithmId.Visible = true; } else { if (!string.IsNullOrEmpty(txtActivityId.Text.Trim())) { drpActivityList.SelectedValue = txtActivityId.Text; } if (!string.IsNullOrEmpty(txtTaskAlgorithmId.Text.Trim())) { drpTaskAlgorithmList.SelectedValue = txtTaskAlgorithmId.Text; } } }
private int GetNextValidId(int tempId) { var dt = ActivityDataManager.GetList(SessionVariables.RequestProfile); foreach (DataRow dr in dt.Rows) { if (dr[ActivityDataModel.DataColumns.ActivityId].ToString().Equals(tempId.ToString())) { tempId -= 1; return(GetNextValidId(tempId)); } } return(tempId); }
public override void LoadDropDownListSources(string fieldName, DropDownList dropDownListControl) { base.LoadDropDownListSources(fieldName, dropDownListControl); if (fieldName.Equals("ActivityId")) { var activityData = ActivityDataManager.GetList(SessionVariables.RequestProfile); UIHelper.LoadDropDown(activityData, dropDownListControl, StandardDataModel.StandardDataColumns.Name, ActivityDataModel.DataColumns.ActivityId); } if (fieldName.Equals("TaskAlgorithmId")) { var taskAlgorithmItemIdData = TaskAlgorithmDataManager.GetList(SessionVariables.RequestProfile); UIHelper.LoadDropDown(taskAlgorithmItemIdData, dropDownListControl, StandardDataModel.StandardDataColumns.Name, TaskAlgorithmDataModel.DataColumns.TaskAlgorithmId); } }
private void SetupDropdown() { var isTesting = SessionVariables.IsTesting; var deliverableArtifactData = DeliverableArtifactDataManager.GetList(SessionVariables.RequestProfile); UIHelper.LoadDropDown(deliverableArtifactData, drpDeliverableArtifactsList, StandardDataModel.StandardDataColumns.Name, DeliverableArtifactDataModel.DataColumns.DeliverableArtifactId); var activityData = ActivityDataManager.GetList(SessionVariables.RequestProfile); UIHelper.LoadDropDown(activityData, drpActivityList, StandardDataModel.StandardDataColumns.Name, ActivityDataModel.DataColumns.ActivityId); var DeliverableArtifactsStatusData = DeliverableArtifactStatusDataManager.GetList(SessionVariables.RequestProfile); UIHelper.LoadDropDown(DeliverableArtifactsStatusData, drpDeliverableArtifactsStatusList, StandardDataModel.StandardDataColumns.Name, DeliverableArtifactStatusDataModel.DataColumns.DeliverableArtifactStatusId); if (isTesting) { drpActivityList.AutoPostBack = true; drpDeliverableArtifactsList.AutoPostBack = true; drpDeliverableArtifactsStatusList.AutoPostBack = true; if (drpDeliverableArtifactsList.Items.Count > 0) { if (!string.IsNullOrEmpty(txtDeliverableArtifactsId.Text.Trim())) { drpDeliverableArtifactsList.SelectedValue = txtDeliverableArtifactsId.Text; } else { txtDeliverableArtifactsId.Text = drpDeliverableArtifactsList.SelectedItem.Value; } } if (drpActivityList.Items.Count > 0) { if (!string.IsNullOrEmpty(txtActivityId.Text.Trim())) { drpActivityList.SelectedValue = txtActivityId.Text; } else { txtActivityId.Text = drpActivityList.SelectedItem.Value; } } if (drpDeliverableArtifactsStatusList.Items.Count > 0) { if (!string.IsNullOrEmpty(txtDeliverableArtifactsStatusId.Text.Trim())) { drpDeliverableArtifactsStatusList.SelectedValue = txtDeliverableArtifactsStatusId.Text; } else { txtDeliverableArtifactsStatusId.Text = drpDeliverableArtifactsStatusList.SelectedItem.Value; } } txtDeliverableArtifactsId.Visible = true; txtActivityId.Visible = true; txtDeliverableArtifactsStatusId.Visible = true; } else { if (!string.IsNullOrEmpty(txtDeliverableArtifactsId.Text.Trim())) { drpDeliverableArtifactsList.SelectedValue = txtDeliverableArtifactsId.Text; } if (!string.IsNullOrEmpty(txtActivityId.Text.Trim())) { drpActivityList.SelectedValue = txtActivityId.Text; } if (!string.IsNullOrEmpty(txtDeliverableArtifactsStatusId.Text.Trim())) { drpDeliverableArtifactsStatusList.SelectedValue = txtDeliverableArtifactsStatusId.Text; } } }