private bool SaveForm(int patientId, int providerId) { bool objReturn = false; //if (ServiceInterfaceManager.REFERRAL_PATIENT_EXISTS(HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId, patientId)) //{ // lblResult.Text = "The selected Patient has already been added to this Registry.<br /><br />"; //} //else //{ int referralId = ServiceInterfaceManager.REFERRAL_SAVE_MANUAL(HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId, patientId, providerId); if (referralId > 0) { REFERRAL r = ServiceInterfaceManager.REFERRAL_GET(HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId, referralId); if (r != null) { UserSession.CurrentRegistryId = r.STD_REGISTRY_ID; UserSession.CurrentReferralId = r.REFERRAL_ID; UserSession.CurrentPatientId = r.PATIENT_ID; UserSession.CurrentProviderId = r.PROVIDER_ID.GetValueOrDefault(); } objReturn = true; } else { lblResult.Text = "An error occurred while attempting to save, please try again.<br /><br />"; } //} return(objReturn); }