Пример #1
0
        private void LoadShippingMethodEditor(ShippingMethod shippingMethod)
        {
            var p = AvailableServices.FindById(shippingMethod.ShippingProviderId, HccApp.CurrentStore);

            var editor = (HccShippingPart)HccPartController.LoadShippingEditor(p.Name, Page);

            if (editor != null)
            {
                ClearEditorsInfo();
                if (string.IsNullOrEmpty(shippingMethod.Bvin))
                {
                    NewShippingMethod = shippingMethod;
                }
                else
                {
                    EditedShippingMethodId = shippingMethod.Bvin;
                }
                editor.ShippingMethod = shippingMethod;
                editor.ID             = string.Format("ShippingMethod_{0}_{1}", shippingMethod.ShippingProviderId,
                                                      shippingMethod.Bvin);
                editor.EditingComplete += ShippingMethodEditor_EditingComplete;
                AddCloseDialogScript(editor);
                phrEditor.Controls.Add(editor);
            }
        }
        private void LoadEditor()
        {
            var p = AvailableServices.FindById(m.ShippingProviderId, HccApp.CurrentStore);

            var editor = HccPartController.LoadShippingEditor(p.Name, this) as HccShippingPart;

            if (editor != null)
            {
                editor.ShippingMethod = m;
                phEditor.Controls.Add(editor);
                editor.EditingComplete += editor_EditingComplete;
            }
            else
            {
                phEditor.Controls.Add(new LiteralControl(Localization.GetString("EditorLoadError")));
            }
        }