コード例 #1
0
        private void FinePay_Click(object sender, EventArgs e)
        {
            PayDialog pay = new PayDialog(("'" + userName + "'"), fine, 0, true);

            this.DialogResult = DialogResult.None;
            pay.ShowDialog();
            if (pay.DialogResult == DialogResult.OK)
            {
                fine            = pay.value;
                fine_Value.Text = fine + " $";
            }
        }
コード例 #2
0
        private void buttonPay_Click(object sender, EventArgs e)
        {
            int       cost    = Convert.ToInt32(costValue.Text.ToString());
            int       paidInt = Convert.ToInt32(paid.Text.ToString().Split(' ')[0]);
            PayDialog pay     = new PayDialog(id.ToString(), (cost - paidInt), paidInt);

            pay.Owner         = this;
            this.DialogResult = DialogResult.None;
            pay.ShowDialog(this);
            if (pay.DialogResult == DialogResult.OK)
            {
                this.paid.Text = pay.value + " $";
            }
        }