Beispiel #1
0
        public bool CheckDocInputs()
        {
            Checker c = new Checker();

            match = c.CheckName(txtpracfirstName.Text);
            if (!match.Success)
            {
                txtpracfirstName.Background = Brushes.Pink;
                return(false);
            }
            else
            {
                txtpracfirstName.Background = Brushes.White;
            }

            match = c.CheckName(txtpraclastName.Text);
            if (!match.Success)
            {
                txtpraclastName.Background = Brushes.Pink;
                return(false);
            }
            else
            {
                txtpraclastName.Background = Brushes.White;
            }

            match = c.CheckAddress(txtpracaddress.Text);
            if (!match.Success)
            {
                txtpracaddress.Background = Brushes.Pink;
                return(false);
            }
            else
            {
                txtpracaddress.Background = Brushes.White;
            }

            match = c.CheckMRN(txtpracMRN.Text);
            if (!match.Success)
            {
                txtpracMRN.Background = Brushes.Pink;
                return(false);
            }
            else
            {
                txtpracMRN.Background = Brushes.White;
            }

            match = c.CheckPhone(txtpracHomePhone.Text);
            if (!match.Success)
            {
                txtpracHomePhone.Background = Brushes.Pink;
                return(false);
            }
            else
            {
                txtpracHomePhone.Background = Brushes.White;
            }

            match = c.CheckPhone(txtpracMobile.Text);
            if (!match.Success)
            {
                txtpracMobile.Background = Brushes.Pink;
                return(false);
            }
            else
            {
                txtpracMobile.Background = Brushes.White;
            }

            if (lvDocAvail.SelectedIndex == -1)
            {
                lvDocAvail.Background = Brushes.Pink;
                return(false);
            }
            else
            {
                lvDocAvail.Background = Brushes.White;
            }

            if (cmboDocType.SelectedIndex == -1)
            {
                cmboDocType.Background = Brushes.Pink;
                return(false);
            }
            else
            {
                cmboDocType.Background = Brushes.Gray;
            }

            // Everything Matched The Set Patterns
            return(true);
        }
Beispiel #2
0
        public bool CheckPatInputs()
        {
            Checker c = new Checker();

            match = c.CheckName(txtfirstName.Text);
            if (!match.Success)
            {
                txtfirstName.Background = Brushes.Pink;
                return(false);
            }
            else
            {
                txtfirstName.Background = Brushes.White;
            }

            match = c.CheckName(txtlastName.Text);
            if (!match.Success)
            {
                txtlastName.Background = Brushes.Pink;
                return(false);
            }
            else
            {
                txtlastName.Background = Brushes.White;
            }

            match = c.CheckAddress(txtaddress.Text);
            if (!match.Success)
            {
                txtaddress.Background = Brushes.Pink;
                return(false);
            }
            else
            {
                txtaddress.Background = Brushes.White;
            }

            match = c.CheckMedicare(txtMedicare.Text);
            if (!match.Success)
            {
                txtMedicare.Background = Brushes.Pink;
                return(false);
            }
            else
            {
                txtMedicare.Background = Brushes.White;
            }

            match = c.CheckPhone(txtHomePhone.Text);
            if (!match.Success)
            {
                txtHomePhone.Background = Brushes.Pink;
                return(false);
            }
            else
            {
                txtHomePhone.Background = Brushes.White;
            }

            match = c.CheckPhone(txtMobile.Text);
            if (!match.Success)
            {
                txtMobile.Background = Brushes.Pink;
                return(false);
            }
            else
            {
                txtMobile.Background = Brushes.White;
            }

            // Everything Matched The Set Patterns
            return(true);
        }