示例#1
0
        private void btnBrowseBorrower_Click(object sender, EventArgs e)
        {
            BrowseData.frmSearch oFrm = new BrowseData.frmSearch();
            oFrm.oFilterFindOption = ePublicVariable.eVariable.FIND_OPTION.BORROWER;
            oFrm.StartPosition     = FormStartPosition.CenterScreen;
            oFrm.ShowDialog();

            oBorrower            = new DataAccess.Borrower();
            oMBorrower           = new Model.Borrower();
            oMBorrower.PERSON_ID = oFrm.oMBorrower.PERSON_ID;
            if (!oBorrower.HasUnsettledBook(oMBorrower))
            {
                txtBorrowerID.Text = oFrm.oMBorrower.PERSON_ID;
                txtFname.Text      = oFrm.oMBorrower.FIRST_NAME;
                txtMname.Text      = oFrm.oMBorrower.MIDDLE_NAME;
                txtLname.Text      = oFrm.oMBorrower.LAST_NAME;
                txtBirthDate.Text  = oFrm.oMBorrower.DOB;
                txtAge.Text        = oFrm.oMBorrower.AGE;
                txtContactNo.Text  = oFrm.oMBorrower.CONTACT_NO;
                txtAddress.Text    = oFrm.oMBorrower.ADDRESS;
            }
            else
            {
                oFrmMsgBox = new frmMessageBox(eVariable.TransactionMessage.BORROWER_HAS_CURRENTLY_HAVE_ACTIVE_TRANSACTION.ToString().Replace("_", " "));
                oFrmMsgBox.m_MessageType = frmMessageBox.MESSAGE_TYPE.INFO;
                oFrmMsgBox.ShowDialog();
            }
        }
示例#2
0
        private void btnCheck_Click(object sender, EventArgs e)
        {
            oBorrower = new DataAccess.Borrower();

            if (oBorrower.HasUnsettledBook(txtBorrowerID.Text))
            {
                oFrmMsgBox = new frmMessageBox(eVariable.TransactionMessage.BORROWER_HAS_CURRENTLY_HAVE_ACTIVE_TRANSACTION.ToString().Replace("_", " "));
                oFrmMsgBox.m_MessageType = frmMessageBox.MESSAGE_TYPE.INFO;
                oFrmMsgBox.ShowDialog();
                txtBorrowerID.Text   = string.Empty;
                lblMemberStatus.Text = "";
                return;
            }

            if (oBorrower.IsCustomerMember(txtBorrowerID.Text.Trim()))
            {
                lblMemberStatus.Text  = "VALID";
                btnCheck.Enabled      = false;
                txtBorrowerID.Enabled = false;
            }
            else
            {
                lblMemberStatus.Text = "INVALID";
            }
        }