public override void LoadDropDownListSources(string fieldName, DropDownList dropDownListControl) { base.LoadDropDownListSources(fieldName, dropDownListControl); if (fieldName.Equals("Skill")) { var skilldata = SkillDataManager.GetList(SessionVariables.RequestProfile); UIHelper.LoadDropDown(skilldata, dropDownListControl, StandardDataModel.StandardDataColumns.Name, SkillDataModel.DataColumns.SkillId); } if (fieldName.Equals("SkillLevel")) { var skillLeveldata = SkillLevelDataManager.GetList(SessionVariables.RequestProfile); UIHelper.LoadDropDown(skillLeveldata, dropDownListControl, StandardDataModel.StandardDataColumns.Name, SkillLevelDataModel.DataColumns.SkillLevelId); } if (fieldName.Equals("Person")) { var applicationUserdata = ApplicationUserDataManager.GetList(SessionVariables.RequestProfile); UIHelper.LoadDropDown(applicationUserdata, dropDownListControl, ApplicationUserDataModel.DataColumns.FirstName, ApplicationUserDataModel.DataColumns.ApplicationUserId); } }
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; } } }
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); } }