Beispiel #1
0
        public override void LoadDropDownListSources(string fieldName, DropDownList dropDownListControl)
        {
            base.LoadDropDownListSources(fieldName, dropDownListControl);

            if (fieldName.Equals("FieldConfigurationModeId"))
            {
                var FieldConfigurationModedata = FieldConfigurationModeDataManager.GetList(SessionVariables.RequestProfile);
                UIHelper.LoadDropDown(FieldConfigurationModedata, dropDownListControl,
                                      StandardDataModel.StandardDataColumns.Name,
                                      FieldConfigurationModeDataModel.DataColumns.FieldConfigurationModeId);
            }
            else if (fieldName.Equals("ApplicationRoleId"))
            {
                var ApplicationRoledata = Framework.Components.ApplicationUser.ApplicationRoleDataManager.GetList(SessionVariables.RequestProfile);
                UIHelper.LoadDropDown(ApplicationRoledata, dropDownListControl,
                                      StandardDataModel.StandardDataColumns.Name,
                                      ApplicationRoleDataModel.DataColumns.ApplicationRoleId);
            }
            else if (fieldName.Equals("FieldConfigurationModeAccessModeId"))
            {
                var FieldConfigurationModeAccessModedata = FieldConfigurationModeAccessModeDataManager.GetList(SessionVariables.RequestProfile);
                UIHelper.LoadDropDown(FieldConfigurationModeAccessModedata, dropDownListControl,
                                      StandardDataModel.StandardDataColumns.Name,
                                      FieldConfigurationModeAccessModeDataModel.DataColumns.FieldConfigurationModeAccessModeId);
            }
        }
Beispiel #2
0
        private DataTable GetFieldConfigurationModeAccessModeList()
        {
            var dt = FieldConfigurationModeAccessModeDataManager.GetList(SessionVariables.RequestProfile);

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

            var fcModeData = FieldConfigurationModeDataManager.GetList(SessionVariables.RequestProfile);

            UIHelper.LoadDropDown(fcModeData, drpFieldConfigurationModeList,
                                  StandardDataModel.StandardDataColumns.Name,
                                  FieldConfigurationModeDataModel.DataColumns.FieldConfigurationModeId);

            var applicationRoleData = Framework.Components.ApplicationUser.ApplicationRoleDataManager.GetList(SessionVariables.RequestProfile);

            UIHelper.LoadDropDown(applicationRoleData, drpApplicationRoleList,
                                  StandardDataModel.StandardDataColumns.Name,
                                  ApplicationRoleDataModel.DataColumns.ApplicationRoleId);

            var fcModeAMData = FieldConfigurationModeAccessModeDataManager.GetList(SessionVariables.RequestProfile);

            UIHelper.LoadDropDown(fcModeAMData, drpFieldConfigurationModeAccessModeList,
                                  StandardDataModel.StandardDataColumns.Name,
                                  FieldConfigurationModeAccessModeDataModel.DataColumns.FieldConfigurationModeAccessModeId);

            if (isTesting)
            {
                drpApplicationRoleList.AutoPostBack                  = true;
                drpFieldConfigurationModeList.AutoPostBack           = true;
                drpFieldConfigurationModeAccessModeList.AutoPostBack = true;

                if (drpFieldConfigurationModeList.Items.Count > 0)
                {
                    if (!string.IsNullOrEmpty(txtFieldConfigurationModeId.Text.Trim()))
                    {
                        drpFieldConfigurationModeList.SelectedValue = txtFieldConfigurationModeId.Text;
                    }
                    else
                    {
                        txtFieldConfigurationModeId.Text = drpFieldConfigurationModeList.SelectedItem.Value;
                    }
                }

                if (drpApplicationRoleList.Items.Count > 0)
                {
                    if (!string.IsNullOrEmpty(txtApplicationRoleId.Text.Trim()))
                    {
                        drpApplicationRoleList.SelectedValue = txtApplicationRoleId.Text;
                    }
                    else
                    {
                        txtApplicationRoleId.Text = drpApplicationRoleList.SelectedItem.Value;
                    }
                }

                if (drpFieldConfigurationModeAccessModeList.Items.Count > 0)
                {
                    if (!string.IsNullOrEmpty(txtFieldConfigurationModeAccessModeId.Text.Trim()))
                    {
                        drpFieldConfigurationModeAccessModeList.SelectedValue = txtFieldConfigurationModeAccessModeId.Text;
                    }
                    else
                    {
                        txtFieldConfigurationModeAccessModeId.Text = drpFieldConfigurationModeAccessModeList.SelectedItem.Value;
                    }
                }

                txtFieldConfigurationModeId.Visible           = true;
                txtApplicationRoleId.Visible                  = true;
                txtFieldConfigurationModeAccessModeId.Visible = true;
            }
            else
            {
                if (!string.IsNullOrEmpty(txtFieldConfigurationModeId.Text.Trim()))
                {
                    drpFieldConfigurationModeList.SelectedValue = txtFieldConfigurationModeId.Text;
                }
                if (!string.IsNullOrEmpty(txtApplicationRoleId.Text.Trim()))
                {
                    drpApplicationRoleList.SelectedValue = txtApplicationRoleId.Text;
                }
                if (!string.IsNullOrEmpty(txtFieldConfigurationModeAccessModeId.Text.Trim()))
                {
                    drpFieldConfigurationModeAccessModeList.SelectedValue = txtFieldConfigurationModeAccessModeId.Text;
                }
            }
        }