private void TowaryEnovaForm_FormClosing(object sender, FormClosingEventArgs e) { if (kategorieTreeView.SelectedNode != null) { selectedCategory = ((KategoriaTreeNode)kategorieTreeView.SelectedNode).Kategoria; } }
protected override Enova.Business.Old.Core.TableBase <Enova.Business.Old.DB.Web.Produkt> CreateTable() { Enova.Business.Old.DB.Web.KategoriaOld kategoria = null; if (kategorieTreeView != null && kategorieTreeView.WybranaKategoria != null && kategorieTreeView.WybranaKategoria.GUID != Enova.Business.Old.DB.Web.KategoriaOld.EnovaRootGuid) { kategoria = kategorieTreeView.WybranaKategoria; } return(new Enova.Business.Old.Web.TowaryEnova(this.DbContext) { Kategoria = kategoria }); }
private void WyborProduktuForm_VisibleChanged(object sender, EventArgs e) { if (this.Visible) { if (previewForm != null && !previewForm.Visible && podgladCheckBox.Checked) { setPreviewVisible(true); } this.Focus(); kategorieTreeView.SelectKategorie(this.kategorieSelected); if (tabControl.SelectedIndex == 0) { if (produktyWebDataGridView.CurrentRow != null) { int first = produktyWebDataGridView.CurrentRow.Index - produktyWebDataGridView.DisplayedRowCount(false) / 2; if (first < 0) { first = 0; } produktyWebDataGridView.FirstDisplayedScrollingRowIndex = first; } } else { if (produktyEnovaDataGridView.CurrentRow != null) { int first = produktyEnovaDataGridView.CurrentRow.Index - produktyEnovaDataGridView.DisplayedRowCount(false) / 2; if (first < 0) { first = 0; } produktyEnovaDataGridView.FirstDisplayedScrollingRowIndex = first; } } } else { this.kategorieSelected = kategorieTreeView.Kategoria; findTextBox.Text = ""; findEnovaTextBox.Text = ""; //webSortedColumn = produktyWebDataGridView.SortedColumn; //webSortOrder = produktyWebDataGridView.SortOrder; enovaSortedColumn = produktyEnovaDataGridView.SortedColumn; enovaSortOrder = produktyEnovaDataGridView.SortOrder; if (previewForm != null && previewForm.Visible) { setPreviewVisible(false); } } }
protected override void OnAfterSelect(TreeViewEventArgs e) { if (fireAfterSelect) { if (this.SelectedNode != null) { wybranaKategoria = ((KategoriaTreeNode)this.SelectedNode).Kategoria; } else { this.wybranaKategoria = null; } base.OnAfterSelect(e); } }
private bool selectCategory(KategoriaTreeNode node, Enova.Business.Old.DB.Web.KategoriaOld kategoria) { if (node.Kategoria.ID == kategoria.ID) { kategorieTreeView.SelectedNode = node; return(true); } foreach (var child in node.Nodes) { if (selectCategory((KategoriaTreeNode)child, kategoria)) { return(true); } } return(false); }
public override void Reload() { var t = this.Table as Enova.Business.Old.Web.TowaryEnova; if (t != null) { Enova.Business.Old.DB.Web.KategoriaOld kategoria = null; if (kategorieTreeView != null && kategorieTreeView.WybranaKategoria != null && kategorieTreeView.WybranaKategoria.GUID != Enova.Business.Old.DB.Web.KategoriaOld.EnovaRootGuid) { kategoria = kategorieTreeView.WybranaKategoria; } t.Kategoria = kategoria; t.Reload(); } base.Reload(); }
public KategoriaTreeNode(Enova.Business.Old.DB.Web.KategoriaOld kategoria) : this(kategoria, kategoria.Nazwa) { }
public KategoriaTreeNode(Enova.Business.Old.DB.Web.KategoriaOld kategoria, string text) : base(text) { this.kategoria = kategoria; this.initChilds(); }
public KategoriaTreeNode(Enova.Business.Old.DB.Web.KategoriaOld kategoria, string name) : base(name) { this.kategoria = kategoria; loadChildren(); }