private void zatwierdzButton_Click(object sender, EventArgs e) { przedstawiciel = przedstawicielComboBox.SelectedIndex > 0 ? (string)przedstawicielComboBox.SelectedItem : null; string trasa = trasyComboBox.SelectedIndex == 0 ? null : (string)trasyComboBox.SelectedItem; grupa = (Enova.API.Business.FeatureDefinition)grupaComboBox.SelectedItem; dataOd = dataOdDateTimePicker.Value; dataDo = dataDoDateTimePicker.Value; bezZerowych = bezZerowychCheckBox.Checked; rokWstecz = rokWsteczCheckBox.Checked; kontrahenci = new List <Enova.API.CRM.Kontrahent>(); string filter = null; if (!string.IsNullOrEmpty(trasa) && przedstawiciel != null) { filter = "Features.[TRASY] = '" + "\\" + przedstawiciel + "\\" + trasa + "\\'"; } else if (przedstawiciel != null) { filter = "Features.[przedstawiciel] = '" + przedstawiciel + "'"; } kontrahenci.AddRange(Services.CRMService.Kontrahenci.Get(Session, filter).ToList().OrderBy(r => r.Kod)); podgrupy = grupa.DictionaryList.ToList(); towary = Services.TowaryService.Towary.GetByFeature(Session, grupa.Name, "RESZTA").ToList().OrderBy(r => r.Kod); reportSource = new List <RaportFormularzWgKontrahViewRow>(); Enova.Business.Old.Forms.ProgressForm.StartProgress(new ProgressHandler(this)); }
private void zatwierdzButton_Click(object sender, EventArgs e) { featureDef = (Enova.API.Business.FeatureDefinition)grupyTowaroweComboBox.SelectedItem; kontrahent = kontrahentSelect.Kontrahent; przedstawiciel = kontrahentSelect.Przedstawiciel; dataOd = dtpSprzedazOd.Value; dataDo = dtpSprzedazDo.Value; zwrotyOd = dtpZwrotOd.Value; zwrotyDo = dtpZwrotDo.Value; DataSource = new List <RaportFormularzWgGrupViewRow>(); Enova.Business.Old.Forms.ProgressForm.StartProgress(new ProgressHandler(this)); }
private void zatwierdzButton_Click(object sender, EventArgs e) { przedstawiciel = kontrahentSelect.Przedstawiciel; trasa = kontrahentSelect.Trasa; //grupaTow = (GrupyTowaroweViewRow)grupyTowaroweComboBox.SelectedItem; featureDef = (Enova.API.Business.FeatureDefinition)grupyTowaroweComboBox.SelectedItem; //grupa = grupaTow == null ? "" : grupaTow.Nazwa; grupa = featureDef == null ? null : featureDef.Name; data1Od = dtpData1Od.Value.Date; data1Do = dtpData1Do.Value.Date; data2Od = dtpData2Od.Value.Date; data2Do = dtpData2Do.Value.Date; tylkoPoZwrotach = tylkoPoZwotachCheckBox.Checked; tylkoZObrotemI = tylkoZObrotemICheckBox.Checked; sortujWg = sortujWgComboBox.SelectedIndex; sortujMalejaco = sortujMalejacoCheckBox.Checked; var dc = Enova.Business.Old.Core.ContextManager.DataContext; kontrahenci = new List <Enova.API.CRM.Kontrahent>(); var crm = Session.GetModule <Enova.API.CRM.CRMModule>(); if (kontrahentSelect.KontrahenciIDChecked != null && kontrahentSelect.KontrahenciIDChecked.Count > 0) { foreach (var id in kontrahentSelect.KontrahenciIDChecked) { kontrahenci.Add((Enova.API.CRM.Kontrahent)crm.Kontrahenci[(int)id]); } } else { string filter = null; if (!string.IsNullOrEmpty(trasa) && !string.IsNullOrEmpty(przedstawiciel)) { var path = "\\" + przedstawiciel + "\\" + trasa + "\\"; filter = "Features.[TRASY] = '" + path + "'"; } else if (!string.IsNullOrEmpty(przedstawiciel)) { filter = "Features.[przedstawiciel] = '" + przedstawiciel + "'"; } var view = crm.Kontrahenci.CreateView(); view.Filter = filter; foreach (Enova.API.CRM.Kontrahent k in view) { kontrahenci.Add(k); } } reportSource = new List <AnalizaZwrotowWgGrupRow>(); Enova.Business.Old.Forms.ProgressForm.StartProgress(new ProgressHandler(this)); }
public DictionaryTreeNode(Enova.API.Business.FeatureDefinition featureDef, Enova.API.Business.DictionaryItem item) : base(item.Value) { this.dictionaryItem = item; this.featureDef = featureDef; }
public FeatureDefTreeNode(Enova.API.Business.FeatureDefinition featureDef) : base(featureDef.Name) { this.featureDef = featureDef; this.loadDictionary(); }