예제 #1
0
        private void CheckIsDone()
        {
            IsDone        = true;
            StrIncomplete = Lan.g("FormSetupWizard", "The following fields need to be corrected: ");
            string phone = textPhone.Text;            //Auto formatting turned off on purpose.

            if (!TelephoneNumbers.IsNumberValidTenDigit(ref phone))
            {
                IsDone         = false;
                StrIncomplete += "\r\n " + Lan.g("FormSetupWizard", "-Practice Phone is invalid.  Must contain exactly ten digits.");
            }
            string fax = textFax.Text;            //Auto formatting turned off on purpose.

            if (!TelephoneNumbers.IsNumberValidTenDigit(ref fax))
            {
                IsDone         = false;
                StrIncomplete += "\r\n " + Lan.g("FormSetupWizard", "-Practice Fax is invalid.  Must contain exactly ten digits.");
            }
            if (listProvider.SelectedIndex == -1 &&      //practice really needs a default prov
                _listProviders.Count > 0)
            {
                listProvider.SelectedIndex = 0;
            }
            if (_listProviders.Count > 0 &&
                _listProviders[listProvider.SelectedIndex].FeeSched == 0)                 //Default provider must have a fee schedule set.
            {
                //listProvider.BackColor = OpenDental.SetupWizard.GetColor(ODSetupStatus.NeedsAttention);
                IsDone         = false;
                StrIncomplete += "\r\n " + Lan.g("FormSetupWizard", "-Practice Provider must have a default fee schedule.");
            }
        }
예제 #2
0
        public void TelephoneNumbers_IsNumberValidTenDigit_TwelveNumbersFormattedWithSpace()
        {
            string phoneNumber = "(800)333-4444 55";

            Assert.IsFalse(TelephoneNumbers.IsNumberValidTenDigit(ref phoneNumber));
        }
예제 #3
0
        public void TelephoneNumbers_IsNumberValidTenDigit_OneAndElevenNumbers()
        {
            string phoneNumber = "180033344445";

            Assert.IsFalse(TelephoneNumbers.IsNumberValidTenDigit(ref phoneNumber));
        }
예제 #4
0
        public void TelephoneNumbers_IsNumberValidTenDigit_TwelveNumbers()
        {
            string phoneNumber = "800333444455";

            Assert.IsFalse(TelephoneNumbers.IsNumberValidTenDigit(ref phoneNumber));
        }
예제 #5
0
        public void TelephoneNumbers_IsNumberValidTenDigit_OneAndTenNumbersFormatted()
        {
            string phoneNumber = "1(800)333-4444";

            Assert.IsFalse(TelephoneNumbers.IsNumberValidTenDigit(ref phoneNumber));
        }
예제 #6
0
        public void TelephoneNumbers_IsNumberValidTenDigit_TenNumbers()
        {
            string phoneNumber = "8003334444";

            Assert.IsTrue(TelephoneNumbers.IsNumberValidTenDigit(ref phoneNumber));
        }