void Post(object sender, EventArgs e) { try { this.Cursor = Cursors.WaitCursor; if (m_po.POSTED) { r_po.Revise(m_po.ID); m_po.POSTED = false; KryptonMessageBox.Show("Transaction has been UNPOSTED", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { r_po.Confirm(m_po.ID); m_po.POSTED = true; KryptonMessageBox.Show("Transaction has been POSTED", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); } //m_po = (PurchaseOrder)r_po.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; } }
private void TestGet() { TestCreate(); //m_po = (PurchaseOrder)m_rep.Get(3); m_rep.Confirm(m_po.ID); //m_rep.Confirm(4); //m_po = (PurchaseOrder)m_rep.Get(4); //m_rep.Revise(m_po.ID); //m_po = (PurchaseOrder)m_rep.Get(4); //m_rep.Delete(m_po); }