Example #1
0
        private void btnAProceed_Click(object sender, EventArgs e)
        {
            customers             = new VO.CustomersVO();
            customers.Custcode    = txtBoxCustCode.Text;
            customers.Companyname = txtBoxCompany.Text;
            String[] getScammer      = customers.ReadCheckoutInfo();
            Double   creditlimit     = 0;
            Double   customerbalance = 0;
            Double   currentbalance  = 0;

            customerbalance = Convert.ToDouble(getScammer[0]);
            creditlimit     = Convert.ToDouble(getScammer[1]);
            currentbalance  = customerbalance + Convert.ToDouble(lblTotalAmountAR.Text);
            //
            if (creditlimit == 0)
            {
                Custcode = txtBoxCustCode.Text;
                Company  = txtBoxCompany.Text;
                IsARTX   = true;
                this.Close();
            }
            if (creditlimit >= currentbalance)
            {
                Custcode = txtBoxCustCode.Text;
                Company  = txtBoxCompany.Text;
                IsARTX   = true;
                this.Close();
            }
            else
            {
                cstDlgAlert alert = new cstDlgAlert();
                alert.MsgDiri = "Account has Exceeded \nP " + creditlimit.ToString("#,###,##0.00") + " Credit Limit";
                alert.ShowDialog();
            }
        }