Beispiel #1
0
        private DataTable GetFeatureData(int taskId)
        {
            var dt       = FeatureXTaskDataManager.GetByTask(taskId, SessionVariables.RequestProfile.AuditId);
            var fdt      = FeatureDataManager.GetList(SessionVariables.RequestProfile);
            var resultdt = fdt.Clone();

            foreach (DataRow row in dt.Rows)
            {
                var rows = fdt.Select("FeatureId = " + row[FeatureDataModel.DataColumns.FeatureId]);
                resultdt.ImportRow(rows[0]);
            }
            return(resultdt);
        }
Beispiel #2
0
        public override void LoadDropDownListSources(string fieldName, DropDownList dropDownListControl)
        {
            base.LoadDropDownListSources(fieldName, dropDownListControl);

            if (fieldName.Equals("MilestoneId"))
            {
                var milestoneData = MilestoneDataManager.GetList(SessionVariables.RequestProfile);
                UIHelper.LoadDropDown(milestoneData, dropDownListControl, StandardDataModel.StandardDataColumns.Name, MilestoneDataModel.DataColumns.MilestoneId);
            }

            if (fieldName.Equals("MilestoneFeatureStateId"))
            {
                var milestoneFeatureStateData = MilestoneFeatureStateDataManager.GetList(SessionVariables.RequestProfile);
                UIHelper.LoadDropDown(milestoneFeatureStateData, dropDownListControl, StandardDataModel.StandardDataColumns.Name, MilestoneFeatureStateDataModel.DataColumns.MilestoneFeatureStateId);
            }

            if (fieldName.Equals("FeatureId"))
            {
                var featureData = FeatureDataManager.GetList(SessionVariables.RequestProfile);
                UIHelper.LoadDropDown(featureData, dropDownListControl, StandardDataModel.StandardDataColumns.Name, FeatureDataModel.DataColumns.FeatureId);
            }
        }
Beispiel #3
0
        private DataTable GetFeatureList()
        {
            var dt = FeatureDataManager.GetList(SessionVariables.RequestProfile);

            return(dt);
        }
Beispiel #4
0
        private void SetupDropdown()
        {
            var isTesting = SessionVariables.IsTesting;

            var taskPriorityTypeData = FeatureDataManager.GetList(SessionVariables.RequestProfile);

            UIHelper.LoadDropDown(taskPriorityTypeData, drpFeatureList, StandardDataModel.StandardDataColumns.Name,
                                  FeatureDataModel.DataColumns.FeatureId);

            var taskData = MilestoneDataManager.GetList(SessionVariables.RequestProfile);

            UIHelper.LoadDropDown(taskData, drpMilestoneList, StandardDataModel.StandardDataColumns.Name,
                                  MilestoneDataModel.DataColumns.MilestoneId);

            //var MilestoneFeatureStateData = Framework.Components.ApplicationUser.ApplicationUser.GetList(SessionVariables.RequestProfile.AuditId);
            //UIHelper.LoadDropDown(MilestoneFeatureStateData, drpMilestoneFeatureStateList, ApplicationUserDataModel.DataColumns.FirstName, ApplicationUserDataModel.DataColumns.ApplicationUserId);
            var MilestoneFeatureStateData = MilestoneFeatureStateDataManager.GetList(SessionVariables.RequestProfile);

            UIHelper.LoadDropDown(MilestoneFeatureStateData, drpMilestoneFeatureStateList, StandardDataModel.StandardDataColumns.Name, MilestoneFeatureStateDataModel.DataColumns.MilestoneFeatureStateId);

            if (isTesting)
            {
                drpMilestoneList.AutoPostBack             = true;
                drpFeatureList.AutoPostBack               = true;
                drpMilestoneFeatureStateList.AutoPostBack = true;
                if (drpFeatureList.Items.Count > 0)
                {
                    if (!string.IsNullOrEmpty(txtFeatureId.Text.Trim()))
                    {
                        drpFeatureList.SelectedValue = txtFeatureId.Text;
                    }
                    else
                    {
                        txtFeatureId.Text = drpFeatureList.SelectedItem.Value;
                    }
                }
                if (drpMilestoneList.Items.Count > 0)
                {
                    if (!string.IsNullOrEmpty(txtMilestoneId.Text.Trim()))
                    {
                        drpMilestoneList.SelectedValue = txtMilestoneId.Text;
                    }
                    else
                    {
                        txtMilestoneId.Text = drpMilestoneList.SelectedItem.Value;
                    }
                }
                if (drpMilestoneFeatureStateList.Items.Count > 0)
                {
                    if (!string.IsNullOrEmpty(txtMilestoneFeatureStateId.Text.Trim()))
                    {
                        drpMilestoneFeatureStateList.SelectedValue = txtMilestoneFeatureStateId.Text;
                    }
                    else
                    {
                        txtMilestoneFeatureStateId.Text = drpMilestoneFeatureStateList.SelectedItem.Value;
                    }
                }
                txtFeatureId.Visible               = true;
                txtMilestoneId.Visible             = true;
                txtMilestoneFeatureStateId.Visible = true;
            }
            else
            {
                if (!string.IsNullOrEmpty(txtFeatureId.Text.Trim()))
                {
                    drpFeatureList.SelectedValue = txtFeatureId.Text;
                }
                if (!string.IsNullOrEmpty(txtMilestoneId.Text.Trim()))
                {
                    drpMilestoneList.SelectedValue = txtMilestoneId.Text;
                }
                if (!string.IsNullOrEmpty(txtMilestoneFeatureStateId.Text.Trim()))
                {
                    drpMilestoneFeatureStateList.SelectedValue = txtMilestoneFeatureStateId.Text;
                }
            }
        }