Exemplo n.º 1
0
		private void menuItemSetup_Click(object sender,EventArgs e) {
			FormEServicesSetup formPPS=new FormEServicesSetup();
			formPPS.ShowDialog();
			if(formPPS.DialogResult==DialogResult.OK) {
				textPatientPortalURL.Text=PrefC.GetString(PrefName.PatientPortalURL);
			}
		}
Exemplo n.º 2
0
        private void menuItemSetup_Click(object sender, EventArgs e)
        {
            FormEServicesSetup formPPS = new FormEServicesSetup(FormEServicesSetup.EService.PatientPortal);

            formPPS.ShowDialog();
            textPatientPortalURL.Text = PrefC.GetString(PrefName.PatientPortalURL);
        }
Exemplo n.º 3
0
        private void menuItemSetup_Click(object sender, EventArgs e)
        {
            FormEServicesSetup formPPS = new FormEServicesSetup(FormEServicesSetup.EService.PatientPortal);

            formPPS.ShowDialog();
            if (formPPS.DialogResult == DialogResult.OK)
            {
                VerifyInputs();                //Validates preferences that are necessary to sending notification emails.
            }
        }
Exemplo n.º 4
0
		private void menuItemListenerService_Click(object sender,EventArgs e) {
			FormEServicesSetup FormESS=new FormEServicesSetup(FormEServicesSetup.EService.ListenerService);
			FormESS.ShowDialog();
		}
Exemplo n.º 5
0
		private void menuItemWebSched_Click(object sender,EventArgs e) {
			FormEServicesSetup FormESS=new FormEServicesSetup(FormEServicesSetup.EService.WebSched);
			FormESS.ShowDialog();
		}
Exemplo n.º 6
0
		private void menuItemPatientPortal_Click(object sender,EventArgs e) {
			FormEServicesSetup FormESS=new FormEServicesSetup(FormEServicesSetup.EService.PatientPortal);
			FormESS.ShowDialog();
		}
Exemplo n.º 7
0
		private void menuMobileWeb_Click(object sender,EventArgs e) {
			FormEServicesSetup FormESS=new FormEServicesSetup(FormEServicesSetup.EService.MobileNew);
			FormESS.ShowDialog();
		}
Exemplo n.º 8
0
		private void menuItemMobileSync_Click(object sender,EventArgs e) {
			FormEServicesSetup FormESS=new FormEServicesSetup(FormEServicesSetup.EService.MobileOld);
			FormESS.ShowDialog();
		}
Exemplo n.º 9
0
        private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormEServicesSetup FormESS = new FormEServicesSetup(FormEServicesSetup.EService.SmsService);

            FormESS.ShowDialog();
        }
Exemplo n.º 10
0
		private void panelWebSched_MouseClick(object sender,MouseEventArgs e) {
			if(!PrefC.GetBool(PrefName.WebSchedService)) {
				//Office has yet to enable the Web Sched service.
				//Send them to a promotional web site so that they can learn about how great it is.
				try {
					Process.Start(Recalls.GetWebSchedPromoURL());
				}
				catch(Exception) {
					//The promotional web site can't be shown, most likely due to the computer not having a default browser.  Simply do nothing.
				}
				//Automatically open the eService Setup window so that they can easily click the Enable button if they call us to sign up or are already signed up and just need to enable it.
				FormEServicesSetup FormESS=new FormEServicesSetup(FormEServicesSetup.EService.WebSched);
				FormESS.ShowDialog();
				if(!PrefC.GetBool(PrefName.WebSchedService)) {
					//User might not have enabled the Web Sched.
					//No need to waste the time calling our web service if they didn't enable it.
					return;
				}
			}
			//Either the Web Sched service was enabled or they just enabled it.
			//Send off a web request to  WebServiceCustomersUpdates to verify that the office is still valid and is currently paying for the eService.  
			Cursor.Current=Cursors.WaitCursor;
			StringBuilder strbuild=new StringBuilder();
			#region Web Service Call
#if DEBUG
			OpenDental.localhost.Service1 updateService=new OpenDental.localhost.Service1();
#else
			OpenDental.customerUpdates.Service1 updateService=new OpenDental.customerUpdates.Service1();
			updateService.Url=PrefC.GetString(PrefName.UpdateServerAddress);
#endif
			if(PrefC.GetString(PrefName.UpdateWebProxyAddress) !="") {
				IWebProxy proxy = new WebProxy(PrefC.GetString(PrefName.UpdateWebProxyAddress));
				ICredentials cred=new NetworkCredential(PrefC.GetString(PrefName.UpdateWebProxyUserName),PrefC.GetString(PrefName.UpdateWebProxyPassword));
				proxy.Credentials=cred;
				updateService.Proxy=proxy;
			}
			XmlWriterSettings settings = new XmlWriterSettings();
			settings.Indent = true;
			settings.IndentChars = ("    ");
			using(XmlWriter writer=XmlWriter.Create(strbuild,settings)) {
				writer.WriteStartElement("RegistrationKey");
				writer.WriteString(PrefC.GetString(PrefName.RegistrationKey));
				writer.WriteEndElement();
			}
			#endregion
			string result="";
			try {
				result=updateService.ValidateWebSched(strbuild.ToString());
			}
			catch { 
				//Do nothing.  Leaving result empty will display correct error messages later on.
			}
			Cursor.Current=Cursors.Default;
			string error="";
			int errorCode=0;
			if(Recalls.IsWebSchedResponseValid(result,out error,out errorCode)) {
				//Everything went good, the office is active on support and has an active Web Sched repeating charge.
				//Send recall notifications to the selected patients.
				SendWebSchedNotifications();
				return;
			}
			#region Error Handling
			//At this point we know something went wrong.  So we need to give the user a hint as to why they can't enable
			if(errorCode==110) {//Customer not registered for Web Sched monthly service
				//We want to launch our Web Sched page if the user is not signed up:
				try {
					Process.Start(Recalls.GetWebSchedPromoURL());
				}
				catch(Exception) {
					//The promotional web site can't be shown, most likely due to the computer not having a default browser.  Simply do nothing.
				}
			}
			//For every error message returned, we'll show it to the user in a pop up.
			MessageBox.Show(error);
			#endregion
		}
Exemplo n.º 11
0
		private void menuItemSetup_Click(object sender,EventArgs e) {
			FormEServicesSetup formPPS=new FormEServicesSetup();
			formPPS.ShowDialog();
			if(formPPS.DialogResult==DialogResult.OK) {
				VerifyInputs();
			}
		}