Beispiel #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                ListItem selectedItem = this.categoryListBox.SelectedItem as ListItem;
                if (selectedItem == null)
                {
                    MessageBox.Show("Please select a category first!");
                    return;
                }

                this.Hide();

                this.controller.ShowPleaseWaitDialog();

                this.controller.InitCategoryFacade(selectedItem.Value);


                //for category with both attributes and item specifics enabled,
                //we only use item specifics
                if (this.controller.CategoryFacade.ItemSpecificEnabled == ItemSpecificsEnabledCodeType.Enabled)
                {
                    NameRecommendationTypeCollection itemSpecifics = this.controller.CategoryFacade.NameRecommendationsTypes;

                    ItemSpecificsForm itemSpecificsForm = controller.FormTable[AttributesController.ITEM_SPECIFICS_FORM] as ItemSpecificsForm;

                    itemSpecificsForm.DisplayItemSpecifics(itemSpecifics);

                    itemSpecificsForm.Show();
                    itemSpecificsForm.BringToFront();

                    this.controller.HidePleaseWaitDialog();

                    return;
                }

                ReturnPolicyForm returnPolicyForm = controller.FormTable[AttributesController.RETURN_POLICY_FORM] as ReturnPolicyForm;

                returnPolicyForm.InitializeReturnPolicy();

                returnPolicyForm.Show();
                returnPolicyForm.BringToFront();

                this.controller.HidePleaseWaitDialog();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #2
0
        private void Post(NameValueCollection request)
        {
            try
            {
                NameValueListTypeCollection nvCol = GetAllCustomItemSpecificsNameValue(request);
                this.controller.CategoryFacade.ItemSpecificsCache = nvCol;

                this.Hide();

                ReturnPolicyForm returnPolicyForm = controller.FormTable[AttributesController.RETURN_POLICY_FORM] as ReturnPolicyForm;

                returnPolicyForm.InitializeReturnPolicy();

                returnPolicyForm.Show();
                returnPolicyForm.BringToFront();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }