void Post(object sender, EventArgs e) { try { this.Cursor = Cursors.WaitCursor; if (m_stocktaking.POSTED) { r_stocktaking.Revise(m_stocktaking.ID); m_stocktaking.POSTED = false; KryptonMessageBox.Show("Transaction has been UNPOSTED", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { r_stocktaking.Confirm(m_stocktaking.ID); m_stocktaking.POSTED = true; KryptonMessageBox.Show("Transaction has been POSTED", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); } //m_stocktaking = (StockTaking)r_stocktaking.Get(m_stocktaking.ID); //m_stocktaking.EMPLOYEE = (Employee)r_employee.GetById(m_stocktaking.EMPLOYEE); //m_stocktaking.WAREHOUSE = (Warehouse)r_warehouse.GetById(m_stocktaking.WAREHOUSE); //m_stocktaking.CURRENCY = (Currency)r_ccy.GetById(m_stocktaking.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 Post() { m_stRep.Confirm(4); }