public void WystawKorekty(Enova.API.Business.Session session) { if (!Enova.API.EnovaService.Instance.IsLogined) { throw new Exception("Nie jesteś zalogowany do programu Enova"); } try { throw new NotImplementedException(); /* * * foreach (var adh in this.Dokumenty.Where(d => d.WystawicKorekte)) * { * //var korekta = Enova.API.EnovaServiceAttribute.EnovaService.HandelModule.KorektaDoZwrotu(DateTime.Now.Date, adh, true); * //var korekta = this.EnovaSession.GetModule<API.Handel.IHandelModule>().KorektaDoZwrotu(DateTime.Now.Date, adh, true); * var korekta = session.GetModule<API.Handel.IHandelModule>().KorektaDoZwrotu(DateTime.Now.Date, adh, true); * } * * this.session.Save(); */ } catch (Exception ex) { //MessageBox.Show(ex.InnerException != null ? ex.InnerException.Message : ex.Message); BAL.Business.AppController.ThrowException(ex); } }
protected override void OnClosed(EventArgs e) { if (session != null) { session.Dispose(); } session = null; base.OnClosed(e); }
public Dictionary <string, object> GetCechy(Enova.API.Business.Session session) { Dictionary <string, object> cechy = new Dictionary <string, object>(); //cechy.Add("KONTRAHENT", this.Zamowienie.Kontrahent); //using (var session = Enova.API.EnovaService.Instance.CreateSession()) //{ cechy.Add("KONTRAHENT", session.GetModule <Enova.API.CRM.CRMModule>().Kontrahenci[this.Zamowienie.Kontrahent.Guid.Value]); //} if (!string.IsNullOrEmpty(this.Zamowienie.Pakowacz)) { cechy.Add("PAKOWACZ", this.Zamowienie.Pakowacz); } if (!string.IsNullOrEmpty(sezonyComboBox.Text)) { cechy.Add("SEZON", sezonyComboBox.Text); } if (!string.IsNullOrEmpty(przedstawicielComboBox.Text)) { cechy.Add("PRZEDSTAWICIEL", przedstawicielComboBox.Text); } if (przewoznikComboBox.SelectedIndex > 0) { cechy.Add("PRZEWOŻNIK", przewoznikComboBox.Text); } if (!string.IsNullOrEmpty(nrListuTextBox.Text)) { cechy.Add("NR LISTU", nrListuTextBox.Text); } if (!string.IsNullOrEmpty(iloscPaczekTextBox.Text)) { cechy.Add("ILOSC PACZEK", iloscPaczekTextBox.Text); } if (placiWysylkeComboBox.SelectedIndex > 0) { cechy.Add("PŁACI WYSYŁKĘ", placiWysylkeComboBox.Text); } if (zaPobraniemCheckBox.Checked) { cechy.Add("ZA POBRANIEM", true); } return(cechy); }
public AnalizaWgGrupTowarowychForm() { this.session = Enova.API.EnovaService.Instance.CreateSession(); InitializeComponent(); }
protected override API.Business.Table <API.Handel.DokumentHandlowy> CreateTable(Enova.API.Business.Session session) { return(session.GetModule <Enova.API.Handel.HandelModule>().DokHandlowe); }