Esempio n. 1
0
        protected override DataTable GetData()
        {
            try
            {
                SuperKey = ApplicationCommon.GetSuperKey();
                SetId    = ApplicationCommon.GetSetId();

                var selectedrows = new DataTable();
                var Themedata    = new ThemeDataModel();

                selectedrows = ThemeDataManager.GetDetails(Themedata, SessionVariables.RequestProfile).Clone();
                if (!string.IsNullOrEmpty(SuperKey))
                {
                    var systemEntityTypeId = (int)PrimaryEntity;
                    var lstEntityKeys      = ApplicationCommon.GetSuperKeyDetails(systemEntityTypeId, SuperKey);

                    foreach (var entityKey in lstEntityKeys)
                    {
                        Themedata.ThemeId = entityKey;
                        var result = ThemeDataManager.GetDetails(Themedata, SessionVariables.RequestProfile);
                        selectedrows.ImportRow(result.Rows[0]);
                    }
                }
                else
                {
                    Themedata.ThemeId = SetId;
                    var result = ThemeDataManager.GetDetails(Themedata, SessionVariables.RequestProfile);
                    selectedrows.ImportRow(result.Rows[0]);
                }
                return(selectedrows);
            }
            catch (Exception ex)
            {
                Response.Write(ex.Message);
            }
            return(null);
        }
Esempio n. 2
0
        private void SetupDropdown()
        {
            var isTesting         = SessionVariables.IsTesting;
            var ThemeCategoryData = ThemeCategoryDataManager.GetList(SessionVariables.RequestProfile);

            UIHelper.LoadDropDown(ThemeCategoryData, ddlThemeCategoryId, StandardDataModel.StandardDataColumns.Name,
                                  ThemeCategoryDataModel.DataColumns.ThemeCategoryId);

            if (isTesting)
            {
                ddlThemeCategoryId.AutoPostBack = true;
                if (ddlThemeCategoryId.Items.Count > 0)
                {
                    if (!string.IsNullOrEmpty(txtThemeCategoryId.Text.Trim()))
                    {
                        ddlThemeCategoryId.SelectedValue = txtThemeCategoryId.Text;
                    }
                    else
                    {
                        txtThemeCategoryId.Text = ddlThemeCategoryId.SelectedItem.Value;
                    }
                }
                txtThemeCategoryId.Visible = true;
            }
            else
            {
                if (!string.IsNullOrEmpty(txtThemeCategoryId.Text.Trim()))
                {
                    ddlThemeCategoryId.SelectedValue = txtThemeCategoryId.Text;
                }
            }
            var ThemeKeyData = ThemeKeyDataManager.GetList(SessionVariables.RequestProfile);

            UIHelper.LoadDropDown(ThemeKeyData, ddlThemeKeyId, StandardDataModel.StandardDataColumns.Name,
                                  ThemeKeyDataModel.DataColumns.ThemeKeyId);

            if (isTesting)
            {
                ddlThemeKeyId.AutoPostBack = true;
                if (ddlThemeKeyId.Items.Count > 0)
                {
                    if (!string.IsNullOrEmpty(txtThemeKeyId.Text.Trim()))
                    {
                        ddlThemeKeyId.SelectedValue = txtThemeKeyId.Text;
                    }
                    else
                    {
                        txtThemeKeyId.Text = ddlThemeKeyId.SelectedItem.Value;
                    }
                }
                txtThemeKeyId.Visible = true;
            }
            else
            {
                if (!string.IsNullOrEmpty(txtThemeKeyId.Text.Trim()))
                {
                    ddlThemeKeyId.SelectedValue = txtThemeKeyId.Text;
                }
            }
            var ThemeData = ThemeDataManager.GetList(SessionVariables.RequestProfile);

            UIHelper.LoadDropDown(ThemeData, ddlThemeId, StandardDataModel.StandardDataColumns.Name,
                                  ThemeDataModel.DataColumns.ThemeId);

            if (isTesting)
            {
                ddlThemeId.AutoPostBack = true;
                if (ddlThemeId.Items.Count > 0)
                {
                    if (!string.IsNullOrEmpty(txtThemeId.Text.Trim()))
                    {
                        ddlThemeId.SelectedValue = txtThemeId.Text;
                    }
                    else
                    {
                        txtThemeId.Text = ddlThemeId.SelectedItem.Value;
                    }
                }
                txtThemeId.Visible = true;
            }
            else
            {
                if (!string.IsNullOrEmpty(txtThemeId.Text.Trim()))
                {
                    ddlThemeId.SelectedValue = txtThemeId.Text;
                }
            }
        }
Esempio n. 3
0
        protected override DataTable GetData()
        {
            var dt = ThemeDataManager.Search(oSearchFilter.SearchParameters, SessionVariables.RequestProfile);

            return(dt);
        }