Exemplo n.º 1
0
        private void recycleBox_CheckedChange(object sender, EventArgs e)
        {
            try
            {
                // Get the sending object as a checkbox
                CheckBox c = sender as CheckBox;

                // Get the data from the payout
                ChannelData d = new ChannelData();
                Payout.GetDataByChannel(Int32.Parse(c.Name), ref d);

                if (c.Checked)
                {
                    Payout.ChangeNoteRoute(d.Value, d.Currency, false, textBox1);
                }
                else
                {
                    Payout.ChangeNoteRoute(d.Value, d.Currency, true, textBox1);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "EXCEPTION");
                return;
            }
        }
Exemplo n.º 2
0
        private void recycleBoxPayout_CheckedChange(object sender, EventArgs e)
        {
            CheckBox chkbox = sender as CheckBox;

            try
            {
                ChannelData d = new ChannelData();
                Payout.GetDataByChannel(Int32.Parse(chkbox.Name), ref d);

                if (chkbox.Checked)
                {
                    Payout.ChangeNoteRoute(d.Value, d.Currency, false, textBox1);
                }
                else
                {
                    Payout.ChangeNoteRoute(d.Value, d.Currency, true, textBox1);
                }

                // Ensure payout ability is enabled in the validator
                Payout.EnablePayout();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
                return;
            }
        }