private void LoadBaseProviderModule() { BaseProviderModuleHolder.Controls.Clear(); String providerName = BaseProviderField.SelectedItem.Text; _baseProviderModule = ModuleController.LoadShippingEditor(providerName, Page) as BVShippingModule; if (_baseProviderModule != null) { _baseProviderModule.EditingComplete += _baseProviderModule_EditingComplete; _baseProviderModule.BlockId = BlockId; _baseProviderModule.ShippingMethod = ShippingMethod; BaseProviderModuleHolder.Controls.Add(_baseProviderModule); } else { BaseProviderModuleHolder.Controls.Add(new LiteralControl("Can not load the editor for " + providerName)); } }
private void LoadEditor() { System.Web.UI.Control tempControl = null; MerchantTribe.Shipping.IShippingService p = MerchantTribe.Commerce.Shipping.AvailableServices.FindById(m.ShippingProviderId, MTApp.CurrentStore); tempControl = ModuleController.LoadShippingEditor(p.Name, this); if (tempControl is BVShippingModule) { editor = (BVShippingModule)tempControl; if (editor != null) { editor.BlockId = m.Bvin; editor.ShippingMethod = m; this.phEditor.Controls.Add(editor); this.editor.EditingComplete += this.editor_EditingComplete; } } else { this.phEditor.Controls.Add(new System.Web.UI.LiteralControl("Error, editor is not based on Content.BVShippingModule class")); } }