private void SetupDropdown() { var isTesting = SessionVariables.IsTesting; var CompetencyData = CompetencyDataManager.GetList(SessionVariables.RequestProfile); UIHelper.LoadDropDown(CompetencyData, drpCompetencyList, StandardDataModel.StandardDataColumns.Name, CompetencyDataModel.DataColumns.CompetencyId); var taskData = TaskTimeTracker.Components.BusinessLayer.Task.TaskDataManager.GetList(SessionVariables.RequestProfile); UIHelper.LoadDropDown(taskData, drpTaskList, StandardDataModel.StandardDataColumns.Name, TaskDataModel.DataColumns.TaskId); if (isTesting) { drpCompetencyList.AutoPostBack = true; drpTaskList.AutoPostBack = true; if (drpCompetencyList.Items.Count > 0) { if (!string.IsNullOrEmpty(txtCompetencyId.Text.Trim())) { drpCompetencyList.SelectedValue = txtCompetencyId.Text; } else { txtCompetencyId.Text = drpCompetencyList.SelectedItem.Value; } } if (drpTaskList.Items.Count > 0) { if (!string.IsNullOrEmpty(txtTaskId.Text.Trim())) { drpTaskList.SelectedValue = txtTaskId.Text; } else { txtTaskId.Text = drpTaskList.SelectedItem.Value; } } txtCompetencyId.Visible = true; txtTaskId.Visible = true; } else { if (!string.IsNullOrEmpty(txtCompetencyId.Text.Trim())) { drpCompetencyList.SelectedValue = txtCompetencyId.Text; } if (!string.IsNullOrEmpty(txtTaskId.Text.Trim())) { drpTaskList.SelectedValue = txtTaskId.Text; } } }
private void SetupDropdown() { var isTesting = SessionVariables.IsTesting; var taskPriorityTypeData = CompetencyDataManager.GetList(SessionVariables.RequestProfile); UIHelper.LoadDropDown(taskPriorityTypeData, drpCompetencyList, StandardDataModel.StandardDataColumns.Name, CompetencyDataModel.DataColumns.CompetencyId); var taskData = SkillDataManager.GetList(SessionVariables.RequestProfile); UIHelper.LoadDropDown(taskData, drpSkillList, StandardDataModel.StandardDataColumns.Name, SkillDataModel.DataColumns.SkillId); if (isTesting) { drpSkillList.AutoPostBack = true; drpCompetencyList.AutoPostBack = true; if (drpCompetencyList.Items.Count > 0) { if (!string.IsNullOrEmpty(txtCompetencyId.Text.Trim())) { drpCompetencyList.SelectedValue = txtCompetencyId.Text; } else { txtCompetencyId.Text = drpCompetencyList.SelectedItem.Value; } } if (drpSkillList.Items.Count > 0) { if (!string.IsNullOrEmpty(txtSkillId.Text.Trim())) { drpSkillList.SelectedValue = txtSkillId.Text; } else { txtSkillId.Text = drpSkillList.SelectedItem.Value; } } txtCompetencyId.Visible = true; txtSkillId.Visible = true; } else { if (!string.IsNullOrEmpty(txtCompetencyId.Text.Trim())) { drpCompetencyList.SelectedValue = txtCompetencyId.Text; } if (!string.IsNullOrEmpty(txtSkillId.Text.Trim())) { drpSkillList.SelectedValue = txtSkillId.Text; } } }
private DataTable GetCompetencyData(int taskId) { var dt = TaskXCompetencyDataManager.GetByTask(taskId, SessionVariables.RequestProfile.AuditId); var compdt = CompetencyDataManager.GetList(SessionVariables.RequestProfile); var resultdt = compdt.Clone(); foreach (DataRow row in dt.Rows) { var rows = compdt.Select("CompetencyId = " + row[CompetencyDataModel.DataColumns.CompetencyId]); resultdt.ImportRow(rows[0]); } return(resultdt); }
public override void LoadDropDownListSources(string fieldName, DropDownList dropDownListControl) { base.LoadDropDownListSources(fieldName, dropDownListControl); if (fieldName.Equals("CompetencyId")) { var competencydata = CompetencyDataManager.GetList(SessionVariables.RequestProfile); UIHelper.LoadDropDown(competencydata, dropDownListControl, StandardDataModel.StandardDataColumns.Name, CompetencyDataModel.DataColumns.CompetencyId); } if (fieldName.Equals("SkillId")) { var skilldata = SkillDataManager.GetList(SessionVariables.RequestProfile); UIHelper.LoadDropDown(skilldata, dropDownListControl, StandardDataModel.StandardDataColumns.Name, SkillDataModel.DataColumns.SkillId); } }
private DataTable GetCompetencyList() { var dt = CompetencyDataManager.GetList(SessionVariables.RequestProfile); return(dt); }