public EpicorFacade() { this.Session = EpicorFacade.createEpicorSession(); this.SessionMod = new SessionMod(this.Session.ConnectionPool); this.PartRevSearchBO = new PartRevSearch(this.Session.ConnectionPool); this.AttachmentBO = new Attachment(this.Session.ConnectionPool); this.XFileRefBO = new XFileRef(this.Session.ConnectionPool); }
public UpdateAttachmentForm(EpicorFacade efInstance) { this.epicor = efInstance; this.FormBorderStyle = FormBorderStyle.FixedDialog; InitializeComponent(); toolStripProgressBar1.Step = 20; toolStripStatusLabel1.Text = EpicorFacade.sessionCredentials(); dataGridViewAttachments.AutoGenerateColumns = false; openFileDialog1.FileOk += openFileDialog1_FileOk; textBoxPartNumber.Validated += textBoxPartNumberValidated; listBoxStatusUpdates.SelectedIndexChanged += ListBoxStatusUpdates_SelectedIndexChanged; }
static void Main() { // instantiate Epicor Facade class EpicorFacade epicor = new EpicorFacade(); // application template stuff Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new UpdateAttachmentForm(epicor)); // revise Application.ApplicationExit event to make sure we kill our licensed session before the program exits (for any reason) Application.ApplicationExit += new EventHandler(epicor.OnApplicationExit); }