public override void LoadDropDownListSources(string fieldName, DropDownList dropDownListControl) { base.LoadDropDownListSources(fieldName, dropDownListControl); if (fieldName.Equals("ApplicationUserId")) { var applicationUserdata = ApplicationUserDataManager.GetList(SessionVariables.RequestProfile); UIHelper.LoadDropDown(applicationUserdata, dropDownListControl, ApplicationUserDataModel.DataColumns.FirstName, ApplicationUserDataModel.DataColumns.ApplicationUserId); } if (fieldName.Equals("TaskPriorityTypeId")) { var taskPriorityTypedata = TaskPriorityTypeDataManager.GetList(SessionVariables.RequestProfile); UIHelper.LoadDropDown(taskPriorityTypedata, dropDownListControl, StandardDataModel.StandardDataColumns.Name, TaskPriorityTypeDataModel.DataColumns.TaskPriorityTypeId); } if (fieldName.Equals("TaskId")) { var taskdata = TaskDataManager.GetList(SessionVariables.RequestProfile); UIHelper.LoadDropDown(taskdata, dropDownListControl, StandardDataModel.StandardDataColumns.Name, TaskDataModel.DataColumns.TaskId); } }
private void SetupDropdown() { var isTesting = SessionVariables.IsTesting; var taskPriorityTypeData = TaskPriorityTypeDataManager.GetList(SessionVariables.RequestProfile); UIHelper.LoadDropDown(taskPriorityTypeData, drpTaskPriorityTypeList, StandardDataModel.StandardDataColumns.Name, TaskPriorityTypeDataModel.DataColumns.TaskPriorityTypeId); var taskData = TaskDataManager.GetList(SessionVariables.RequestProfile); UIHelper.LoadDropDown(taskData, drpTaskList, StandardDataModel.StandardDataColumns.Name, TaskDataModel.DataColumns.TaskId); var ApplicationUserData = ApplicationUserDataManager.GetList(SessionVariables.RequestProfile); UIHelper.LoadDropDown(ApplicationUserData, drpApplicationUserList, ApplicationUserDataModel.DataColumns.FirstName, ApplicationUserDataModel.DataColumns.ApplicationUserId); if (isTesting) { drpTaskList.AutoPostBack = true; drpTaskPriorityTypeList.AutoPostBack = true; drpApplicationUserList.AutoPostBack = true; if (drpTaskPriorityTypeList.Items.Count > 0) { if (!string.IsNullOrEmpty(txtTaskPriorityTypeId.Text.Trim())) { drpTaskPriorityTypeList.SelectedValue = txtTaskPriorityTypeId.Text; } else { txtTaskPriorityTypeId.Text = drpTaskPriorityTypeList.SelectedItem.Value; } } if (drpTaskList.Items.Count > 0) { if (!string.IsNullOrEmpty(txtTaskId.Text.Trim())) { drpTaskList.SelectedValue = txtTaskId.Text; } else { txtTaskId.Text = drpTaskList.SelectedItem.Value; } } if (drpApplicationUserList.Items.Count > 0) { if (!string.IsNullOrEmpty(txtApplicationUserId.Text.Trim())) { drpApplicationUserList.SelectedValue = txtApplicationUserId.Text; } else { txtApplicationUserId.Text = drpApplicationUserList.SelectedItem.Value; } } txtTaskPriorityTypeId.Visible = true; txtTaskId.Visible = true; txtApplicationUserId.Visible = true; } else { if (!string.IsNullOrEmpty(txtTaskPriorityTypeId.Text.Trim())) { drpTaskPriorityTypeList.SelectedValue = txtTaskPriorityTypeId.Text; } if (!string.IsNullOrEmpty(txtTaskId.Text.Trim())) { drpTaskList.SelectedValue = txtTaskId.Text; } if (!string.IsNullOrEmpty(txtApplicationUserId.Text.Trim())) { drpApplicationUserList.SelectedValue = txtApplicationUserId.Text; } } }
private void SetupDropdown() { var isTesting = SessionVariables.IsTesting; var taskPriorityTypeData = DeliverableArtifactDataManager.GetList(SessionVariables.RequestProfile); UIHelper.LoadDropDown(taskPriorityTypeData, drpDeliverableArtifactsList, StandardDataModel.StandardDataColumns.Name, DeliverableArtifactDataModel.DataColumns.DeliverableArtifactId); var taskData = TaskDataManager.GetList(SessionVariables.RequestProfile); UIHelper.LoadDropDown(taskData, drpTaskList, StandardDataModel.StandardDataColumns.Name, TaskDataModel.DataColumns.TaskId); //var DeliverableArtifactStatusData = Framework.Components.ApplicationUser.ApplicationUser.GetList(SessionVariables.RequestProfile.AuditId); //UIHelper.LoadDropDown(DeliverableArtifactStatusData, drpDeliverableArtifactStatusList, ApplicationUserDataModel.DataColumns.FirstName, ApplicationUserDataModel.DataColumns.ApplicationUserId); var DeliverableArtifactStatusData = DeliverableArtifactStatusDataManager.GetList(SessionVariables.RequestProfile); UIHelper.LoadDropDown(DeliverableArtifactStatusData, drpDeliverableArtifactStatusList, StandardDataModel.StandardDataColumns.Name, DeliverableArtifactStatusDataModel.DataColumns.DeliverableArtifactStatusId); if (isTesting) { drpTaskList.AutoPostBack = true; drpDeliverableArtifactsList.AutoPostBack = true; drpDeliverableArtifactStatusList.AutoPostBack = true; if (drpDeliverableArtifactsList.Items.Count > 0) { if (!string.IsNullOrEmpty(txtDeliverableArtifactsId.Text.Trim())) { drpDeliverableArtifactsList.SelectedValue = txtDeliverableArtifactsId.Text; } else { txtDeliverableArtifactsId.Text = drpDeliverableArtifactsList.SelectedItem.Value; } } if (drpTaskList.Items.Count > 0) { if (!string.IsNullOrEmpty(txtTaskId.Text.Trim())) { drpTaskList.SelectedValue = txtTaskId.Text; } else { txtTaskId.Text = drpTaskList.SelectedItem.Value; } } if (drpDeliverableArtifactStatusList.Items.Count > 0) { if (!string.IsNullOrEmpty(txtDeliverableArtifactStatusId.Text.Trim())) { drpDeliverableArtifactStatusList.SelectedValue = txtDeliverableArtifactStatusId.Text; } else { txtDeliverableArtifactStatusId.Text = drpDeliverableArtifactStatusList.SelectedItem.Value; } } txtDeliverableArtifactsId.Visible = true; txtTaskId.Visible = true; txtDeliverableArtifactStatusId.Visible = true; } else { if (!string.IsNullOrEmpty(txtDeliverableArtifactsId.Text.Trim())) { drpDeliverableArtifactsList.SelectedValue = txtDeliverableArtifactsId.Text; } if (!string.IsNullOrEmpty(txtTaskId.Text.Trim())) { drpTaskList.SelectedValue = txtTaskId.Text; } if (!string.IsNullOrEmpty(txtDeliverableArtifactStatusId.Text.Trim())) { drpDeliverableArtifactStatusList.SelectedValue = txtDeliverableArtifactStatusId.Text; } } }