void Post(object sender, EventArgs e) { try { this.Cursor = Cursors.WaitCursor; if (m_si.POSTED) { r_si.Revise(m_si.ID); m_si.POSTED = false; KryptonMessageBox.Show("Transaction has been UNPOSTED", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { r_si.Confirm(m_si.ID); m_si.POSTED = true; KryptonMessageBox.Show("Transaction has been POSTED", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); } //m_po = (CustomerInvoice)r_si.Get(m_po.ID); //m_po.EMPLOYEE = (Employee)r_employee.GetById(m_po.EMPLOYEE); //m_po.WAREHOUSE = (Warehouse)r_warehouse.GetById(m_po.WAREHOUSE); //m_po.CURRENCY = (Currency)r_ccy.GetById(m_po.CURRENCY); //loadData(); setEnableForm(false); setEditMode(EditMode.View); } catch (Exception x) { KryptonMessageBox.Show(x.Message, "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); } finally { this.Cursor = Cursors.Default; } }