Exemplo n.º 1
0
 ///<summary>Uploads Preferences to the Patient Portal /Mobile Web.</summary>
 public static void UploadPreference(PrefName prefname)
 {
     try {
         if (TestWebServiceExists())
         {
             Prefm prefm = Prefms.GetPrefm(prefname.ToString());
             mb.SetPreference(PrefC.GetString(PrefName.RegistrationKey), prefm);
         }
     }
     catch (Exception ex) {
         MessageBox.Show(ex.Message);                //may not show if called from a thread but that does not matter - the failing of this method should not stop the  the code from proceeding.
     }
 }
Exemplo n.º 2
0
 ///<summary>Uploads Preferences to the Patient Portal /Mobile Web.</summary>
 public static void UploadPreference(PrefName prefname)
 {
     if (PrefC.GetString(PrefName.RegistrationKey) == "")
     {
         return;                //Prevents a bug when using the trial version with no registration key.  Practice edit, OK, was giving error.
     }
     try {
         if (TestWebServiceExists())
         {
             Prefm prefm = Prefms.GetPrefm(prefname.ToString());
             mb.SetPreference(PrefC.GetString(PrefName.RegistrationKey), prefm);
         }
     }
     catch (Exception ex) {
         MessageBox.Show(ex.Message);                //may not show if called from a thread but that does not matter - the failing of this method should not stop the  the code from proceeding.
     }
 }
Exemplo n.º 3
0
 public void SetPreference(String RegistrationKey, Prefm prefm)
 {
     try {
         Logger.Information("In SetPreference");
         customerNum = util.GetDentalOfficeID(RegistrationKey);
         if (customerNum == 0)
         {
             return;
         }
         else
         {
             prefm.CustomerNum = customerNum;
             Prefms.UpdatePreference(prefm);
         }
     }
     catch (Exception ex) {
         Logger.LogError("IpAddress=" + HttpContext.Current.Request.UserHostAddress + " DentalOfficeID=" + customerNum, ex);
         throw new Exception("Exception in SetPreference");
     }
 }
Exemplo n.º 4
0
 public ActionResult Login(LoginModel model, string returnUrl)
 {
     if (ModelState.IsValid)
     {
         HttpCookie DentalOfficeIDCookie = Request.Cookies["DentalOfficeIDCookie"];
         if (DentalOfficeIDCookie != null)
         {
             Int64.TryParse(DentalOfficeIDCookie.Value, out DentalOfficeID);
         }
         Patientm patm = Patientms.GetOne(DentalOfficeID, model.UserName, model.Password);
         if (patm == null)
         {
             ModelState.AddModelError("", "Login Failed, Please Try Again");
         }
         else
         {
             Session["Patient"] = patm;
             Prefms.LoadPreferences();
             return(RedirectToAction("EHRInformation", "Medical"));
         }
     }
     return(View());
 }