Ejemplo n.º 1
0
        private void PCSspend_Click(object sender, EventArgs e)
        {
            double balance = m_cash.getBalance();
            KeyValuePair <string, string> sel = (KeyValuePair <string, string>)PCScombo.SelectedItem;

            CashCategory catKey;

            if (!Enum.TryParse(sel.Key, true, out catKey))
            {
            }
            double cash;

            if (!double.TryParse(PCSamount.Text, out cash))
            {
                //Cash amount not successfully parsed
            }
            if (cash <= 0.0)
            {
                m_UCs.MessageBoxShow("Please ensure a correct spending amount");
            }
            else if (cash > balance)
            {
                m_UCs.MessageBoxShow("Insufficient funds to complete transaction");
            }
            else
            {
                var r_cash = m_cash.doUpdate(cAcc.accUserName, catKey, cash, AccountAuditType.AAT_CashSpent);
                if (r_cash == null)
                {
                    //Cash not successfully added
                }

                m_UCs.ShowScreen_Transactions();
            }
        }
Ejemplo n.º 2
0
 private void LINtransactions_Click(object sender, EventArgs e)
 {
     m_UCs.ShowScreen_Transactions();
 }