コード例 #1
0
        private bool editMemberId_Validation()
        {
            bool curReturnStatus = true;

            isDataModified    = true;
            isMemberIdChanged = false;
            if (editMemberId.Text.Length == 9)
            {
                if (!(myMemberId.Equals(editMemberId.Text)))
                {
                    if (myMemberIdValidate.checkMemberId(editMemberId.Text))
                    {
                        isMemberIdChanged = true;
                    }
                    else
                    {
                        curReturnStatus = false;
                        if (editMemberId.Text.Substring(0, 7).Equals("0000000"))
                        {
                            MessageBox.Show("Invalid temporary MemberId, must be between 000000010 and 000000099");
                        }
                        else
                        {
                            MessageBox.Show("MemberId is not valid, failed checksum verification");
                        }
                    }
                }
            }
            else if (editMemberId.Text.Length == 0)
            {
                curReturnStatus = false;
                MessageBox.Show("MemberId is a required field");
            }
            else
            {
                curReturnStatus = false;
                MessageBox.Show("MemberId must be 9 characters in length with no dashes ");
            }
            return(curReturnStatus);
        }
コード例 #2
0
        private bool editMemberId_Validation()
        {
            bool curReturnStatus = true;

            isDataModified    = true;
            isMemberIdChanged = false;
            if (editMemberId.Text.Length == 9)
            {
                if (myMemberIdValidate.checkMemberId(editMemberId.Text))
                {
                    if (isEditRequest)
                    {
                        if (!(myMemberId.Equals(editMemberId.Text)))
                        {
                            isMemberIdChanged = true;
                        }
                    }
                }
                else
                {
                    curReturnStatus = false;
                    MessageBox.Show("MemberId is not valid, failed checksum verification");
                }
            }
            else if (editMemberId.Text.Length == 0)
            {
                curReturnStatus = false;
                MessageBox.Show("MemberId is a required field");
            }
            else
            {
                curReturnStatus = false;
                MessageBox.Show("MemberId must be 9 characters in length with no dashes ");
            }
            return(curReturnStatus);
        }