protected override void OnInitParam(DataContextParamEventArgs e) { base.OnInitParam(e); if (e.Param.Name == "activeParam") { this.activeComboBox = (System.Windows.Forms.ComboBox)e.Control; this.activeComboBox.Items.Add("Razem"); this.activeComboBox.Items.Add("Aktywne"); this.activeComboBox.Items.Add("Nieaktywne"); this.activeComboBox.SelectedIndex = 0; this.activeComboBox.SelectionChangeCommitted += (sender, args) => { int idx = this.activeComboBox.SelectedIndex; ((Enova.Business.Old.Web.TowaryAtrybutyTable) this.Table).Aktywne = idx == 1 ? true : (idx == 2 ? false : (bool?)null); this.Reload(); }; } else if (e.Param.Name == "availableParam") { this.availableComboBox = (System.Windows.Forms.ComboBox)e.Control; this.availableComboBox.Items.Add("Razem"); this.availableComboBox.Items.Add("Dostepne"); this.availableComboBox.Items.Add("Niedostępne"); this.availableComboBox.SelectedIndex = 0; this.availableComboBox.SelectionChangeCommitted += (sender, args) => { int idx = this.availableComboBox.SelectedIndex; ((Enova.Business.Old.Web.TowaryAtrybutyTable) this.Table).Dostepne = idx == 1 ? true : (idx == 2 ? false : (bool?)null); this.Reload(); }; } }
protected override void OnInitParam(DataContextParamEventArgs e) { base.OnInitParam(e); switch (e.Param.Name) { case "przedstawicielParam": this.przedstawicieleComboBox = e.Control as System.Windows.Forms.ComboBox; this.przedstawicieleComboBox.DisplayMember = "Kod"; this.przedstawicieleComboBox.ValueMember = "ID"; this.przedstawicieleComboBox.Items.Add("Wszyscy"); this.przedstawicieleComboBox.SelectedIndex = 0; //foreach (var pr in CRMModule.GetInstance(this).Kontrahenci.WgCzyAgent[true].ToList().OrderBy(r=>r.Kod)) foreach (var pr in DbContext.Kontrahenci.Where(r => r.CzyAgent == true).OrderBy(r => r.Kod).ToList()) { this.przedstawicieleComboBox.Items.Add(pr); } this.przedstawicieleComboBox.SelectionChangeCommitted += new EventHandler(przedstawicieleComboBox_SelectionChangeCommitted); firePrzedstawicielChange = true; break; } }
protected override void OnParamValueChanged(DataContextParamEventArgs e) { base.OnParamValueChanged(e); if (e.Param.Name == "kontrahentParam") { this.kontrahent = (CRM.Kontrahent)((IValue)e.Control).Value; this.Reload(); } }
protected override void OnParamValueChanged(DataContextParamEventArgs e) { this.table = null; this.Reload(); /* * this.initTable(); * this.Reset(); */ base.OnParamValueChanged(e); }
protected override void OnInitParam(DataContextParamEventArgs e) { switch (e.Param.Name) { case "fromToParam": fromToControls = e.Control as BAL.Forms.Controls.DateFromToControl; break; case "kontrahentParam": kotrahentSelect = e.Control as Enova.Forms.Controls.KontrahentEnovaSelect; break; } }
protected override void OnInitParam(DataContextParamEventArgs e) { switch (e.Param.Name) { case "kontrahentSelectParam": kontrachentSelect = e.Control as BAL.Forms.Controls.ComboBox; kontrachentSelect.Width = 300; kontrachentSelect.DisplayMember = "Kod"; //kontrachentSelect.DataContext = new KontrahenciEnovaView(); kontrachentSelect.DataContext = new Enova.Forms.CRM.KontrahenciView(); break; } base.OnInitParam(e); }
protected override void OnInitParam(DataContextParamEventArgs e) { switch (e.Param.Name) { case "kategoriaParam": kategoriaComboBox = (System.Windows.Forms.ComboBox)e.Control; //kategoriaComboBox.DataSource = CoreModule.GetInstance(this).KategorieStatusowDokumentow; kategoriaComboBox.DataSource = new AbakTools.Core.KategorieStatusowDokumentow(); kategoriaComboBox.SelectedIndex = 0; kategoriaComboBox.SelectionChangeCommitted += (sender, args) => { this.Reload(); }; break; } base.OnInitParam(e); }
protected override void OnInitParam(DataContextParamEventArgs e) { if (e.Param.Name == "przedstawicielParam") { agentComboBox = (System.Windows.Forms.ComboBox)e.Control; agentComboBox.Items.Add("-----------"); agentComboBox.SelectedIndex = 0; foreach (var pr in DbContext.Kontrahenci.Where(r => r.CzyAgent == true).OrderBy(r => r.Kod)) { agentComboBox.Items.Add(pr.Kod); } agentComboBox.SelectionChangeCommitted += new EventHandler(agentComboBox_SelectionChangeCommitted); } base.OnInitParam(e); }
protected override void OnInitParam(DataContextParamEventArgs e) { switch (e.Param.Name) { case "DefinicjaParam": this.definicjaComboBox = e.Control as System.Windows.Forms.ComboBox; this.initDefinicjaComboBox(); break; case "DataParam": this.okresControl = e.Control as BAL.Forms.Controls.DateFromToControl; break; case "KontrahentParam": this.kontrahentControl = e.Control as Enova.Forms.Controls.KontrahentEnovaCheckBoxSelect; break; } base.OnInitParam(e); }
protected override void OnParamValueChanged(DataContextParamEventArgs e) { base.OnParamValueChanged(e); switch (e.Param.Name) { case "kontrahentParam": //this.kontrahent = (CRM.Kontrahent)((IValue)e.Control).Value; this.kontrahent = (Enova.Business.Old.DB.Web.Kontrahent)((IValue)e.Control).Value; break; case "okresParam": var c = (Enova.Business.Old.Controls.DateTimeSpanControl)e.Control; this.dateFrom = c.DateFrom; this.dateTo = c.DateTo; break; } this.Reload(); }
protected override void OnInitParam(DataContextParamEventArgs e) { switch (e.Param.Name) { case "DataParam": this.okresControl = e.Control as Enova.Business.Old.Controls.DateTimeSpanControl; break; case "KontrahentParam": //this.kontrahentControl = e.Control as Enova.Business.Old.Controls.KontrahentSelectControl; this.kontrahentControl = e.Control as Enova.Forms.Controls.KontrahentEnovaCheckBoxSelect; break; case "SezonParam": this.sezonControl = e.Control as BAL.Forms.Controls.ComboBox; this.sezonControl.Width = 200; this.sezonControl.DataContext = new Handel.Forms.EnovaSezonyView(); break; } base.OnInitParam(e); }
protected override void OnParamValueChanged(DataContextParamEventArgs e) { this.Reload(); base.OnParamValueChanged(e); }
protected override void OnParamValueChanged(DataContextParamEventArgs e) { this.initTable(); this.Reset(); base.OnParamValueChanged(e); }