示例#1
0
        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);
            }
        }
示例#2
0
        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;
                }
            }
        }
示例#3
0
        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);
            }
        }