Exemplo n.º 1
0
 protected void Page_PreRender(object sender, EventArgs e)
 {
     if (WebUtils.GetRequestParam("msg") == "application_restarted")
     {
         GeneralFeedbackLabel.SetSuccessMessage("Application restarted successfully");
     }
 }
Exemplo n.º 2
0
        protected void RowsDropDownList_SelectedIndexChanged(object sender, EventArgs e)
        {
            var brandMetaSetting = GetSelectedMetaSetting();

            if (brandMetaSetting == null)
            {
                return;
            }

            GroupSelectableRowsCountChanges[SelectedGroup] = int.Parse(RowsDropDownList.SelectedValue);

            GeneralFeedbackLabel.SetSuccessMessage("rows count applied. changes will be saved after you preview the filter.");

            LoadMetaPreview(PreviewMetaInputList, brandMetaSetting, int.Parse(RowsDropDownList.SelectedValue), SelectableMetadataType.ComboBox);
        }
Exemplo n.º 3
0
        protected void TestChangesButton_Click(object sender, EventArgs e)
        {
            MetadataFilters.BrandId            = BrandId;
            MetadataFilters.PreviewSelectables = GetInputSettings();
            MetadataFilters.Template           = MarkupTextBox.Text;
            MetadataFilters.DisableButtons();

            try
            {
                MetadataFilters.LoadFilter();
            }
            catch (Exception ex)
            {
                GeneralFeedbackLabel.SetErrorMessage(ex.Message);
                return;
            }

            MainMultiView.ActiveViewIndex = 1;
        }
Exemplo n.º 4
0
        protected void OptionsRadioButton_OnCheckedChanged(object sender, EventArgs e)
        {
            if (SelectedGroup <= 0)
            {
                return;
            }

            var radbutt = ((RadioButton)sender);

            var newType = Option1RadioButton.ID == radbutt.ID ? SelectableMetadataType.DropDown : SelectableMetadataType.ComboBox;

            GroupSelectableTypeChanges[SelectedGroup] = (int)newType;

            //no need for this as row count state is preserved upon the dropdown change
            //GroupSelectableRowsCountChanges[SelectedGroup] = int.Parse(RowsDropDownList.SelectedValue);

            GeneralFeedbackLabel.SetSuccessMessage("filter type applied. changes will be saved after you preview the filter.");

            LoadPreviewState();
        }
Exemplo n.º 5
0
        protected void ApplyButton_Click(object sender, EventArgs e)
        {
            var selId = GetSelectedSelectableSettingId();

            if (selId <= 0)
            {
                GeneralFeedbackLabel.SetSuccessMessage("no group was selected from the list.");
                return;
            }

            var f = BrandMetadataSelectableSetting.Get(selId);

            f.FilterDepth          = int.Parse(RowsDropDownList.SelectedValue);
            f.FilterSelectableType = Option2RadioButton.Checked
                                             ? (int)SelectableMetadataType.ComboBox
                                             : (int)SelectableMetadataType.DropDown;

            BrandMetadataSelectableSetting.Update(f);

            GeneralFeedbackLabel.SetSuccessMessage("display settings of the selected metadata were updated.");
        }
Exemplo n.º 6
0
        protected void MakeLiveButton_Click(object sender, EventArgs e)
        {
            var saveCandidates = GetInputSettings();

            foreach (var setting in saveCandidates)
            {
                BrandMetadataSelectableSetting.Update(setting.SelectableSetting);
            }

            var b = Brand.Get(BrandId);

            b.FilterMarkup = MarkupTextBox.Text;
            Brand.Update(b);

            MainMultiView.ActiveViewIndex = 0;
            GeneralFeedbackLabel.SetSuccessMessage("changes were saved.");

            GroupSelectableTypeChanges.Clear();
            GroupSelectableRowsCountChanges.Clear();

            LoadPreviewState();
        }
Exemplo n.º 7
0
 protected void ReloadSettingsButton_Click(object sender, EventArgs e)
 {
     Global.LoadConfigSettings();
     GeneralFeedbackLabel.SetSuccessMessage("Settings reloaded successfully");
 }
Exemplo n.º 8
0
 protected void LoadDefaultTemplateButton_Click(object sender, EventArgs e)
 {
     MarkupTextBox.Text = BrandManager.GetBrandFilterMarkup(BrandId);
     GeneralFeedbackLabel.SetSuccessMessage("template markup was reset. in order to apply the new template you will have to save the changes.");
 }