private void Delete_Group_Button_Click(object sender, RoutedEventArgs e) { PropertyGroup PropertyItemParent = PropertyItem.Parent; IPropertyControl parent = PropertyItemParent.Parent; parent.PropertyGroups.Remove(PropertyItemParent); }
public ItemControl(IDbContextScopeFactory dbContextScopeFactory, IItemRepository itemRepository, IImportControl importControl, IFileControl fileControl, IItemCategoryControl itemCategoryControl, IPropertyControl propertyControl) { _dbContextScopeFactory = dbContextScopeFactory ?? throw new ArgumentNullException("item control broke"); _ItemRepository = itemRepository ?? throw new ArgumentNullException("item control broke"); _FileControl = fileControl ?? throw new ArgumentNullException("item control broke"); _ImportControl = importControl ?? throw new ArgumentNullException("item control broke"); _ItemCategoryControl = itemCategoryControl ?? throw new ArgumentNullException("item control broke"); _IPropertyControl = propertyControl ?? throw new ArgumentNullException("item control broke"); }
/// <summary> /// Delete property button click. Delete this property from parent collection. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Delete_Property_Button_Click(object sender, RoutedEventArgs e) { if (!this.IsLoaded) { return; } MessageBoxResult result = MessageBox.Show("Do you wish to delete this property?", "Caution", MessageBoxButton.YesNoCancel); if (result == MessageBoxResult.Yes) { PropertyGroup group = PropertyItem.Parent; IPropertyControl parent = group.Parent; parent.PropertyGroups.Remove(group); } }
public AdminController( IItemDistributionControl itemDistributionControl, IItemCategoryControl itemCategoryControl, IItemControl itemControl, IPropertyControl propertyControl, IClientProfileControl clientProfileControl, IAdminControl adminControl, IOrderControl orderControl) { _itemDistributionControl = itemDistributionControl; _itemControl = itemControl; _itemCategoryControl = itemCategoryControl; _propertyControl = propertyControl; _clientProfileControl = clientProfileControl; _adminControl = adminControl; _orderControl = orderControl; }
/// <summary> /// Called by the ASP.NET page framework to notify server controls that use composition-based implementation to create /// any child controls they contain in preparation for posting back or rendering. /// </summary> protected override void CreateChildControls() { if (this.InnerProperty == null || this.Page == null) { return; } RenderType currentRenderType = this.GetCurrentRenderType(); if (this.Page.IsPostBack && this.LastRenderType != currentRenderType) { this.ClearChildViewState(); } IPropertyControl propertyControl1 = PropertyControlClassFactory.Instance.CreatePropertyControl( this.InnerProperty, new HttpContextWrapper(HttpContext.Current), this.Page, this.RenderSettings.Tag); if (propertyControl1 != null) { this.Controls.Add((Control)propertyControl1); propertyControl1.PropertyData = this.InnerProperty; propertyControl1.RenderType = currentRenderType; propertyControl1.ValidationGroup = this.ValidationGroup; propertyControl1.Enabled = this.Enabled; PropertyDataControl propertyControl2 = propertyControl1 as PropertyDataControl; if (propertyControl2 != null) { propertyControl2.AttributeSourceControl = this; propertyControl2.CustomTagName = this.CustomTagName; propertyControl2.CssClass = this.CssClass; this.AssignCustomSettings(propertyControl2); } propertyControl1.SetupControl(); } this.LastRenderType = currentRenderType; this._isDirty = false; }
public ItemCategoryControl(IDbContextScopeFactory dbContextScopeFactory, ICategoryRepository kategorijosRepositorija, IPropertyControl savybesValdymas) { _dbContextScopeFactory = dbContextScopeFactory ?? throw new ArgumentNullException("ItemCategoryControl broke"); _categoryRepository = kategorijosRepositorija ?? throw new ArgumentNullException("ItemCategoryControl broke"); _propertyControl = savybesValdymas ?? throw new ArgumentNullException("ItemCategoryControl broke"); }