private void FormPatFieldDefs_FormClosing(object sender, FormClosingEventArgs e) { //Fix the item order just in case there was a duplicate. for (int i = 0; i < _listPatFieldDefs.Count; i++) { if (_listPatFieldDefs[i].ItemOrder != i) { _hasChanged = true; } _listPatFieldDefs[i].ItemOrder = i; } if (_hasChanged) { PatFieldDefs.Sync(_listPatFieldDefs, _listPatFieldDefsOld); //Update if anything has changed DataValid.SetInvalid(InvalidType.PatFields); } }
private void butDeleteRules_Click(object sender, EventArgs e) { if (gridRules.SelectedIndices.Length == 0) { MsgBox.Show(this, "Please select one or more Rules to delete."); return; } if (!MsgBox.Show(this, MsgBoxButtons.YesNo, "Are you sure you want to delete all selected Rules?")) { return; } List <long> listTimeCardRuleNums = gridRules.SelectedTags <TimeCardRule>().Select(x => x.TimeCardRuleNum).ToList(); TimeCardRules.DeleteMany(listTimeCardRuleNums); DataValid.SetInvalid(InvalidType.TimeCardRules); FillRules(); }
private void butOK_Click(object sender, EventArgs e) { //Prefs if (Prefs.UpdateBool(PrefName.WikiDetectLinks, checkDetectLinks.Checked) | Prefs.UpdateBool(PrefName.WikiCreatePageFromLink, checkCreatePageFromLinks.Checked)) { DataValid.SetInvalid(InvalidType.Prefs); } //Master Page WikiPage masterPage = WikiPages.MasterPage; masterPage.PageContent = textMaster.Text; masterPage.UserNum = Security.CurUser.UserNum; WikiPages.InsertAndArchive(masterPage); DataValid.SetInvalid(InvalidType.Wiki); DialogResult = DialogResult.OK; }
private void FormQuickPaste_FormClosing(object sender, FormClosingEventArgs e) { for (int i = 0; i < _listNotes.Count; i++) { _listNotes[i].ItemOrder = i; //Fix item orders. } for (int i = 0; i < _listCats.Count; i++) { _listCats[i].ItemOrder = i; //Fix item orders. } _hasChanges |= QuickPasteCats.Sync(_listCats, _listCatsOld); if (QuickPasteNotes.Sync(_listNotes, _listNotesOld) || _hasChanges) { SecurityLogs.MakeLogEntry(Permissions.AutoNoteQuickNoteEdit, 0, "Quick Paste Notes/Cats Changed"); DataValid.SetInvalid(InvalidType.QuickPaste); } }
private void butClose_Click(object sender, System.EventArgs e) { //Pref pattern below is followed from FormMisc and allows additional prefs to be updated. bool changed = false; if (Prefs.UpdateString(PrefName.ADPCompanyCode, textADPCompanyCode.Text) //| Prefs.UpdateString(PrefName.ADPCompanyCode,textADPCompanyCode.Text) ) { changed = true; } if (changed) { DataValid.SetInvalid(InvalidType.Prefs); } Close(); }
private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e) { PrefName prefName = gridMain.SelectedTag <PrefName>(); FormRecallMessageEdit FormR = new FormRecallMessageEdit(prefName); FormR.MessageVal = PrefC.GetString(prefName); FormR.ShowDialog(); if (FormR.DialogResult != DialogResult.OK) { return; } if (Prefs.UpdateString(prefName, FormR.MessageVal)) { DataValid.SetInvalid(InvalidType.Prefs); } FillGrid(); }
private void butChange_Click(object sender, EventArgs e) { FormRegistrationKey formR = new FormRegistrationKey(); formR.ShowDialog(); DataValid.SetInvalid(InvalidType.Prefs); string regkey = PrefC.GetString(PrefName.RegistrationKey); if (regkey.Length == 16) { textRegKey.Text = regkey.Substring(0, 4) + "-" + regkey.Substring(4, 4) + "-" + regkey.Substring(8, 4) + "-" + regkey.Substring(12, 4); } else { textRegKey.Text = regkey; } }
///<summary>Adds a new disease. New diseases get blank (not null) fields for ICD9, ICD10, and SnoMedCodes ///if they are not specified from FormDiseaseDefEdit so that we can do string searches on them.</summary> private void butAdd_Click(object sender, System.EventArgs e) { if (!Security.IsAuthorized(Permissions.ProblemEdit)) { return; } //initialise the new DiseaseDef with blank fields instead of null so we can filter on them. DiseaseDef def = new DiseaseDef() { ICD9Code = "", Icd10Code = "", SnomedCode = "", ItemOrder = DiseaseDefs.GetCount() }; FormDiseaseDefEdit FormD = new FormDiseaseDefEdit(def, true); //also sets ItemOrder correctly if using alphabetical during the insert diseaseDef call. FormD.IsNew = true; FormD.ShowDialog(); if (FormD.DialogResult != DialogResult.OK) { return; } _listSecurityLogMsgs.Add(FormD.SecurityLogMsgText); //Need to invalidate cache for selection mode so that the new problem shows up. if (IsSelectionMode) { //In Middle Tier, the Sync in FormClosing() was not updating the PKs for the objects in each row tag for gridMain. //This was the assumption of what would happen to retain selection when going back to the calling form (ex. FormMedical). //As a result, any new defs added here did not have a PK when being sent to the calling form via grid.SelectedTags and threw a UE. DiseaseDefs.Insert(FormD.DiseaseDefCur); DataValid.SetInvalid(InvalidType.Diseases); //No need to re-order as the ItemOrder given is already at the end of the list, and you can't change item order in selection mode. _listDiseaseDefsOld.Add(FormD.DiseaseDefCur); _listDiseaseDefs.Add(FormD.DiseaseDefCur); //Sync on FormClosing() will not happen; we don't need it since Adding a new DiseaseDef is the only change user can make in SelectionMode. } else { //Items are already in the right order in the DB, re-order in memory list to match _listDiseaseDefs.FindAll(x => x.ItemOrder >= def.ItemOrder).ForEach(x => x.ItemOrder++); _listDiseaseDefs.Add(def); _listDiseaseDefs.Sort(DiseaseDefs.SortItemOrder); _isChanged = true; } FillGrid(); }
private void butOK_Click(object sender, System.EventArgs e) { if (textRight.errorProvider1.GetError(textRight) != "" || textDown.errorProvider1.GetError(textDown) != "" || textDaysPast.errorProvider1.GetError(textDaysPast) != "" || textDaysFuture.errorProvider1.GetError(textDaysFuture) != "") { MsgBox.Show(this, "Please fix data entry errors first."); return; } if (textPostcardsPerSheet.Text != "1" && textPostcardsPerSheet.Text != "3" && textPostcardsPerSheet.Text != "4") { MsgBox.Show(this, "The value in postcards per sheet must be 1, 3, or 4"); return; } Prefs.UpdateString("RecallPattern", textPattern.Text); Prefs.UpdateString("RecallProcedures", textProcs.Text); Prefs.UpdateString("RecallBW", textBW.Text); Prefs.UpdateString("RecallPostcardMessage", textPostcardMessage.Text); Prefs.UpdateString("RecallPostcardFamMsg", textPostcardFamMsg.Text); Prefs.UpdateString("ConfirmPostcardMessage", textConfirmPostcardMessage.Text); Prefs.UpdateString("RecallPostcardsPerSheet", textPostcardsPerSheet.Text); Prefs.UpdateBool("RecallCardsShowReturnAdd", checkReturnAdd.Checked); Prefs.UpdateBool("RecallGroupByFamily", checkGroupFamilies.Checked); Prefs.UpdateInt("RecallDaysPast", PIn.PInt(textDaysPast.Text)); Prefs.UpdateInt("RecallDaysFuture", PIn.PInt(textDaysFuture.Text)); Prefs.UpdateDouble("RecallAdjustRight", PIn.PDouble(textRight.Text)); Prefs.UpdateDouble("RecallAdjustDown", PIn.PDouble(textDown.Text)); DataValid.SetInvalid(InvalidTypes.Prefs); DialogResult = DialogResult.OK; }
private void butWebMailNotify_Click(object sender, EventArgs e) { if (gridMain.GetSelectedIndex() == -1) { MsgBox.Show(this, "Please select a row first."); return; } if (gridMain.SelectedTag <EmailAddress>().UserNum > 0) { MsgBox.Show(this, "User email address cannot be set as WebMail Notify."); return; } if (Prefs.UpdateLong(PrefName.EmailNotifyAddressNum, _listEmailAddresses[gridMain.GetSelectedIndex()].EmailAddressNum)) { DataValid.SetInvalid(InvalidType.Prefs); } FillGrid(); }
private bool SavePrefs(bool includeAutoFillBirthdatePref = false) { Cursor = Cursors.WaitCursor; if (!WebForms_Preferences.SetPreferences(_webFormPref, urlOverride: textboxWebHostAddress.Text.Trim())) { Cursor = Cursors.Default; MsgBox.Show(this, "Either the registration key provided by the dental office is incorrect or the Host Server Address cannot be found."); return(false); } _webFormPrefOld = _webFormPref.Copy(); if (Prefs.UpdateString(PrefName.WebHostSynchServerURL, textboxWebHostAddress.Text.Trim()) || (includeAutoFillBirthdatePref && Prefs.UpdateBool(PrefName.WebFormsAutoFillNameAndBirthdate, checkAutoFillNameAndBirthdate.Checked))) { DataValid.SetInvalid(InvalidType.Prefs); } Cursor = Cursors.Default; return(true); }
private void butOK_Click(object sender, EventArgs e) { bool changed = false; for (int i = 0; i < UserList.Count; i++) { if (UserList[i].TaskListInBox != UserListOld[i].TaskListInBox) { Userods.Update(UserList[i]); changed = true; } } if (changed) { DataValid.SetInvalid(InvalidType.Security); } DialogResult = DialogResult.OK; }
private void butOK_Click(object sender, System.EventArgs e) { if (textDate.errorProvider1.GetError(textDate) != "") { MsgBox.Show(this, "Please fix error first."); return; } int days = PIn.Int(textDays.Text); DateTime date = PIn.Date(textDate.Text); if (Prefs.UpdateString(PrefName.SecurityLockDate, POut.Date(date, false)) | Prefs.UpdateInt(PrefName.SecurityLockDays, days) | Prefs.UpdateBool(PrefName.SecurityLockIncludesAdmin, checkAdmin.Checked)) { DataValid.SetInvalid(InvalidType.Prefs); } DialogResult = DialogResult.OK; }
private void butOK_Click(object sender, System.EventArgs e) { /*if(IsSelectMode){ * if(listEmp.SelectedIndices.Count!=1){ * Employers.Cur=new Employer(); * //MessageBox.Show(Lan.g(this,"Please select one item first.")); * //return; * } * else * Employers.Cur=ListEmployers[listEmp.SelectedIndices[0]]; * } * else{ * //update the other computers: * //DataValid.SetInvalid();//not needed due to intelligent refreshing * }*/ DataValid.SetInvalid(InvalidType.Employers); DialogResult = DialogResult.OK; }
private void listComputers_Click(object sender, EventArgs e) { //Cache needs to be saved to the database. if (SigButDefs.UpdateButtonIndexIfChanged(_arraySigButDefs)) { DataValid.SetInvalid(InvalidType.SigMessages); } if (listComputers.SelectedIndex == 0) { _arraySigButDefs = SigButDefs.GetByComputer(""); } else { //remember, defaults are mixed into this list unless overridden: _arraySigButDefs = SigButDefs.GetByComputer(_listComputers[listComputers.SelectedIndex - 1].CompName); } FillList(); }
private void butDefaultMedical_Click(object sender, EventArgs e) { if (gridMain.SelectedRow == -1) { MsgBox.Show(this, "Please select a row first."); return; } Clearinghouse ch = Clearinghouses.Listt[gridMain.SelectedRow]; if (ch.Eformat != ElectronicClaimFormat.x837_5010_med_inst) //anything except the med/inst format { MsgBox.Show(this, "The selected clearinghouse must first be set to the med/inst e-claim format."); return; } Prefs.UpdateLong(PrefName.ClearinghouseDefaultMed, Clearinghouses.Listt[gridMain.SelectedRow].ClearinghouseNum); FillGrid(); DataValid.SetInvalid(InvalidType.Prefs); }
private void butOK_Click(object sender, EventArgs e) { if (!changed) { DialogResult = DialogResult.OK; return; } if (category == DisplayFieldCategory.OrthoChart) { DisplayFields.SaveListForOrthoChart(ListShowing); } else { DisplayFields.SaveListForCategory(ListShowing, category); } DataValid.SetInvalid(InvalidType.DisplayFields); DialogResult = DialogResult.OK; }
private void butOK_Click(object sender, System.EventArgs e) { if (textDoc.errorProvider1.GetError(textDoc) != "") { MessageBox.Show(Lan.g(this, "Please fix data entry errors first.")); return; } Prefs.UpdateInt("ScannerCompression", PIn.PInt(textDoc.Text)); Prefs.UpdateInt("ImageWindowingMin", slider.MinVal); Prefs.UpdateInt("ImageWindowingMax", slider.MaxVal); computerPrefs.SensorType = comboType.Text; computerPrefs.SensorPort = (int)upDownPort.Value; computerPrefs.SensorExposure = (int)upDownExposure.Value; computerPrefs.SensorBinned = checkBinned.Checked; ComputerPrefs.Update(computerPrefs); DataValid.SetInvalid(InvalidTypes.Prefs); DialogResult = DialogResult.OK; }
private void butOK_Click(object sender, System.EventArgs e) { if (textDateCalc.errorProvider1.GetError(textDateCalc) != "" ) { MsgBox.Show(this, "Please fix data entry errors first."); return; } Cursor = Cursors.WaitCursor; Ledgers.ComputeAging(0, PIn.Date(textDateCalc.Text), false); if (Prefs.UpdateString(PrefName.DateLastAging, POut.Date(PIn.Date(textDateCalc.Text), false))) { DataValid.SetInvalid(InvalidType.Prefs); } Cursor = Cursors.Default; MsgBox.Show(this, "Aging Complete"); DialogResult = DialogResult.OK; }
private void butOK_Click(object sender, System.EventArgs e) { Prefs.UpdateBool(PrefName.EasyHideCapitation, !checkCapitation.Checked); Prefs.UpdateBool(PrefName.EasyHideMedicaid, !checkMedicaid.Checked); Prefs.UpdateBool(PrefName.EasyHidePublicHealth, !checkPublicHealth.Checked); Prefs.UpdateBool(PrefName.EasyHideDentalSchools, !checkDentalSchools.Checked); Prefs.UpdateBool(PrefName.EasyHideHospitals, !checkHospitals.Checked); Prefs.UpdateBool(PrefName.EasyHideInsurance, !checkInsurance.Checked); Prefs.UpdateBool(PrefName.EasyHideClinical, !checkClinical.Checked); Prefs.UpdateBool(PrefName.EasyBasicModules, checkBasicModules.Checked); Prefs.UpdateBool(PrefName.EasyNoClinics, !checkNoClinics.Checked); Prefs.UpdateBool(PrefName.EasyHideRepeatCharges, !checkRepeatCharges.Checked); Prefs.UpdateBool(PrefName.ShowFeatureMedicalInsurance, checkMedicalIns.Checked); Prefs.UpdateBool(PrefName.ShowFeatureEhr, checkEhr.Checked); Prefs.UpdateBool(PrefName.ShowFeatureSuperfamilies, checkSuperFam.Checked); DataValid.SetInvalid(InvalidType.Prefs); DialogResult = DialogResult.OK; }
private void butOK_Click(object sender, System.EventArgs e) { //generic num already handled MedicationCur.MedName = textMedName.Text; if (MedicationCur.MedName == "") { MsgBox.Show(this, "Not allowed to save a medication without a Drug Name."); return; } if (CultureInfo.CurrentCulture.Name.EndsWith("US")) //United States { if (MedicationCur.RxCui == 0 && !MsgBox.Show(this, true, "Warning: RxNorm was not picked. " + "RxNorm uniquely identifies drugs in the United States and helps you keep your medications organized. " + "RxNorm is used to send information to and from eRx if you are using or plan to use eRx.\r\n" + "Click OK to continue without an RxNorm, or click Cancel to stay in this window.")) { return; } else if (MedicationCur.RxCui != 0) { List <Medication> listExistingMeds = Medications.GetAllMedsByRxCui(MedicationCur.RxCui); if (listExistingMeds.FindAll(x => x.MedicationNum != MedicationCur.MedicationNum).Count > 0) { MsgBox.Show(this, "A medication in the medication list is already using the selected RxNorm.\r\n" + "Please select a different RxNorm or use the other medication instead."); return; } } } if (MedicationCur.MedicationNum == MedicationCur.GenericNum) { MedicationCur.Notes = textNotes.Text; } else { MedicationCur.Notes = ""; } //MedicationCur has its RxCui set when the butRxNormSelect button is pressed. //The following behavior must match what happens when the user clicks the RxNorm column in FormMedications to pick RxCui. Medications.Update(MedicationCur); MedicationPats.UpdateRxCuiForMedication(MedicationCur.MedicationNum, MedicationCur.RxCui); DataValid.SetInvalid(InvalidType.Medications); DialogResult = DialogResult.OK; }
private void SaveTabWebSchedNewPat() { Prefs.UpdateString(PrefName.WebSchedNewPatApptMessage, textWebSchedNewPatApptMessage.Text); List <ClinicPref> listClinicPrefs = new List <ClinicPref>(); foreach (Control control in panelHostedURLs.Controls) { if (control.GetType() != typeof(ContrNewPatHostedURL)) { continue; } ContrNewPatHostedURL urlPanel = (ContrNewPatHostedURL)control; long clinicNum = urlPanel.GetClinicNum(); string allowChildren = urlPanel.GetPrefValue(PrefName.WebSchedNewPatAllowChildren); string verifyInfo = urlPanel.GetPrefValue(PrefName.WebSchedNewPatVerifyInfo); string doAuthEmail = urlPanel.GetPrefValue(PrefName.WebSchedNewPatDoAuthEmail); string doAuthText = urlPanel.GetPrefValue(PrefName.WebSchedNewPatDoAuthText); string webFormsURL = urlPanel.GetPrefValue(PrefName.WebSchedNewPatWebFormsURL); if (clinicNum == 0) { Prefs.UpdateString(PrefName.WebSchedNewPatAllowChildren, allowChildren); Prefs.UpdateString(PrefName.WebSchedNewPatVerifyInfo, verifyInfo); Prefs.UpdateString(PrefName.WebSchedNewPatDoAuthEmail, doAuthEmail); Prefs.UpdateString(PrefName.WebSchedNewPatDoAuthText, doAuthText); Prefs.UpdateString(PrefName.WebSchedNewPatWebFormsURL, webFormsURL); continue; } listClinicPrefs.Add(GetClinicPrefToSave(clinicNum, PrefName.WebSchedNewPatAllowChildren, allowChildren)); listClinicPrefs.Add(GetClinicPrefToSave(clinicNum, PrefName.WebSchedNewPatVerifyInfo, verifyInfo)); listClinicPrefs.Add(GetClinicPrefToSave(clinicNum, PrefName.WebSchedNewPatDoAuthEmail, doAuthEmail)); listClinicPrefs.Add(GetClinicPrefToSave(clinicNum, PrefName.WebSchedNewPatDoAuthText, doAuthText)); listClinicPrefs.Add(GetClinicPrefToSave(clinicNum, PrefName.WebSchedNewPatWebFormsURL, webFormsURL)); } if (ClinicPrefs.Sync(listClinicPrefs, _listClinicPrefsWebSchedNewPats)) { DataValid.SetInvalid(InvalidType.ClinicPrefs); } if (comboWSNPConfirmStatuses.SelectedIndex != -1) { Prefs.UpdateLong(PrefName.WebSchedNewPatConfirmStatus, comboWSNPConfirmStatuses.GetSelectedDefNum()); } Prefs.UpdateBool(PrefName.WebSchedNewPatAllowProvSelection, checkNewPatAllowProvSelection.Checked); Prefs.UpdateInt(PrefName.WebSchedNewPatApptDoubleBooking, checkWSNPDoubleBooking.Checked?1:0); }
private void butOK_Click(object sender, EventArgs e) { if (comboClinics.SelectedIndex == -1) { MsgBox.Show(this, "Please select a clinic."); return; } _clinicErxCur.ClinicNum = comboClinics.GetSelected <Clinic>().ClinicNum; Program progErx = Programs.GetCur(ProgramName.eRx); ProgramProperty ppClinicID = _listClinicIDs.FirstOrDefault(x => x.ClinicNum == _clinicErxCur.ClinicNum); if (ppClinicID == null) { ppClinicID = new ProgramProperty(); ppClinicID.ProgramNum = progErx.ProgramNum; ppClinicID.ClinicNum = _clinicErxCur.ClinicNum; ppClinicID.PropertyDesc = Erx.PropertyDescs.ClinicID; ppClinicID.PropertyValue = _clinicErxCur.ClinicId; ProgramProperties.Insert(ppClinicID); } else { ppClinicID.PropertyValue = _clinicErxCur.ClinicId; ProgramProperties.Update(ppClinicID); } ProgramProperty ppClinicKey = _listClinicKeys.FirstOrDefault(x => x.ClinicNum == _clinicErxCur.ClinicNum); if (ppClinicKey == null) { ppClinicKey = new ProgramProperty(); ppClinicKey.ProgramNum = progErx.ProgramNum; ppClinicKey.ClinicNum = _clinicErxCur.ClinicNum; ppClinicKey.PropertyDesc = Erx.PropertyDescs.ClinicKey; ppClinicKey.PropertyValue = _clinicErxCur.ClinicKey; ProgramProperties.Insert(ppClinicKey); } else { ppClinicKey.PropertyValue = _clinicErxCur.ClinicKey; ProgramProperties.Update(ppClinicKey); } DataValid.SetInvalid(InvalidType.Programs); DialogResult = DialogResult.OK; }
private void butOK_Click(object sender, EventArgs e) { if (Prefs.UpdateInt(PrefName.ReportsPPOwriteoffDefaultToProcDate, comboReportWriteoff.SelectedIndex) | Prefs.UpdateBool(PrefName.ReportsShowPatNum, checkReportsShowPatNum.Checked) | Prefs.UpdateBool(PrefName.ReportPandIschedProdSubtractsWO, checkReportProdWO.Checked) | Prefs.UpdateBool(PrefName.ReportPandIhasClinicInfo, checkReportPIClinicInfo.Checked) | Prefs.UpdateBool(PrefName.ReportPandIhasClinicBreakdown, checkReportPIClinic.Checked) | Prefs.UpdateBool(PrefName.ProviderPayrollAllowToday, checkProviderPayrollAllowToday.Checked) | Prefs.UpdateBool(PrefName.NetProdDetailUseSnapshotToday, checkNetProdDetailUseSnapshotToday.Checked) | Prefs.UpdateBool(PrefName.ReportsWrapColumns, checkReportPrintWrapColumns.Checked) | Prefs.UpdateBool(PrefName.ReportsIncompleteProcsNoNotes, checkReportsIncompleteProcsNoNotes.Checked) | Prefs.UpdateBool(PrefName.ReportsIncompleteProcsUnsigned, checkReportsIncompleteProcsUnsigned.Checked) | Prefs.UpdateBool(PrefName.TreatFinderProcsAllGeneral, checkBenefitAssumeGeneral.Checked) | Prefs.UpdateBool(PrefName.ReportsShowHistory, checkReportsShowHistory.Checked) | Prefs.UpdateBool(PrefName.OutstandingInsReportDateFilterTab, checkOutstandingRpDateTab.Checked) | Prefs.UpdateBool(PrefName.ReportsDoShowHiddenTPPrepayments, checkReportDisplayUnearnedTP.Checked) ) { changed = true; } if (UpdateReportingServer()) { ConnectionStore.ClearConnectionDictionary(); changed = true; } if (changed) { DataValid.SetInvalid(InvalidType.Prefs); } if (Security.IsAuthorized(Permissions.SecurityAdmin)) { GroupPermissions.Sync(userControlReportSetup.ListGroupPermissionsForReports, userControlReportSetup.ListGroupPermissionsOld); if (userControlReportSetup.ListGroupPermissionsForReports.Exists(x => x.UserGroupNum == _userGroupNum)) { HasReportPerms = true; } DataValid.SetInvalid(InvalidType.Security); } if (DisplayReports.Sync(userControlReportSetup.ListDisplayReportAll)) { DataValid.SetInvalid(InvalidType.DisplayReports); } DialogResult = DialogResult.OK; }
private void butOK_Click(object sender, System.EventArgs e) { if (textDateCalc.errorProvider1.GetError(textDateCalc) != "") { MsgBox.Show(this, "Please fix data entry errors first."); return; } DateTime dateCalc = PIn.Date(textDateCalc.Text); if (PrefC.GetBool(PrefName.AgingIsEnterprise)) { //if this is true, dateCalc has to be DateTime.Today and aging calculated daily not monthly. if (!RunAgingEnterprise(dateCalc)) { //Errors displayed from RunAgingEnterprise return; } } else { SecurityLogs.MakeLogEntry(Permissions.AgingRan, 0, "Aging Ran - Aging Form"); Cursor = Cursors.WaitCursor; bool result = true; ODProgress.ShowAction(() => Ledgers.ComputeAging(0, dateCalc), startingMessage: Lan.g(this, "Calculating aging for all patients as of") + " " + dateCalc.ToShortDateString() + "...", actionException: ex => { Ledgers.AgingExceptionHandler(ex, this); result = false; } ); Cursor = Cursors.Default; if (!result) { DialogResult = DialogResult.Cancel; return; } if (Prefs.UpdateString(PrefName.DateLastAging, POut.Date(dateCalc, false))) { DataValid.SetInvalid(InvalidType.Prefs); } } MsgBox.Show(this, "Aging Complete"); DialogResult = DialogResult.OK; }
private void FormClearinghouses_Closing(object sender, System.ComponentModel.CancelEventArgs e) { if (PrefC.GetLong(PrefName.ClearinghouseDefaultDent) == 0) { if (!MsgBox.Show(this, MsgBoxButtons.OKCancel, "A default clearinghouse should be set. Continue anyway?")) { e.Cancel = true; return; } } //validate that the default dental clearinghouse is not type mismatched. Clearinghouse chDent = Clearinghouses.GetClearinghouse(PrefC.GetLong(PrefName.ClearinghouseDefaultDent)); if (chDent != null) { if (chDent.Eformat == ElectronicClaimFormat.x837_5010_med_inst) //mismatch { if (!MsgBox.Show(this, MsgBoxButtons.OKCancel, "The default dental clearinghouse should be set to a dental e-claim format. Continue anyway?")) { e.Cancel = true; return; } } } //validate medical clearinghouse Clearinghouse chMed = Clearinghouses.GetClearinghouse(PrefC.GetLong(PrefName.ClearinghouseDefaultMed)); if (chMed != null) { if (chMed.Eformat != ElectronicClaimFormat.x837_5010_med_inst) //mismatch { if (!MsgBox.Show(this, MsgBoxButtons.OKCancel, "The default medical clearinghouse should be set to a med/inst e-claim format. Continue anyway?")) { e.Cancel = true; return; } } } if (listHasChanged) { //update all computers including this one: DataValid.SetInvalid(InvalidType.ClearHouses); } }
private void butOK_Click(object sender, System.EventArgs e) { if (textDate.errorProvider1.GetError(textDate) != "") { MsgBox.Show(this, "Please fix error first."); return; } int days = 0; if (!int.TryParse(textDays.Text, out days) && !string.IsNullOrEmpty(textDays.Text)) { MsgBox.Show(this, "Invalid number of days."); return; } if (days < 0) { days = 0; } if (days > 3650) { switch (MessageBox.Show("Lock days set to greater than ten years, would you like to disable lock days instead?", "", MessageBoxButtons.YesNoCancel)) { case DialogResult.Cancel: return; case DialogResult.OK: case DialogResult.Yes: days = 0; //disable instead of using large value. break; default: break; } } DateTime date = PIn.Date(textDate.Text); if (Prefs.UpdateString(PrefName.SecurityLockDate, POut.Date(date, false)) | Prefs.UpdateInt(PrefName.SecurityLockDays, days) | Prefs.UpdateBool(PrefName.SecurityLockIncludesAdmin, checkAdmin.Checked)) { DataValid.SetInvalid(InvalidType.Prefs); } DialogResult = DialogResult.OK; }
private void butClinicLink_Click(object sender, EventArgs e) { //Get the users total list of unrestricted clinics, then acquire their list of ProgramProperties so we can tell which PL buttons //should be hidden based upon ProgramProperty.PropertyDesc/ClinicNum. List <Clinic> listClinics = Clinics.GetForUserod(Security.CurUser, doIncludeHQ: true, hqClinicName: Lan.g(this, "HQ")); //Include HQ if user not restricted. //Filter the list of all Hidden button ProgramProperties down to the clinics the user has access to. This will be passed to FormProgramLinkHideClinics. List <ProgramProperty> listPropsForUser = ProgramProperties.GetForProgram(ProgramCur.ProgramNum) .Where(x => x.PropertyDesc == ProgramProperties.PropertyDescs.ClinicHideButton && x.ClinicNum.In(listClinics.Select(y => y.ClinicNum))) .ToList(); FormProgramLinkHideClinics formProgramLinkHideClinics = new FormProgramLinkHideClinics(ProgramCur, listPropsForUser, listClinics); if (formProgramLinkHideClinics.ShowDialog() == DialogResult.OK) { //Ensure other WS update their "hidden by clinic" properties. DataValid.SetInvalid(InvalidType.Programs, InvalidType.ToolBut); } ShowPLButHiddenLabel(); //Set the "Hide Button for Clinics" button based on the updated list. }
private void butOK_Click(object sender, System.EventArgs e) { if (textRight.errorProvider1.GetError(textRight) != "" || textDown.errorProvider1.GetError(textDown) != "") { MsgBox.Show(this, "Please fix data entry errors first."); return; } bool changed = false; if (Prefs.UpdateBool("RxOrientVert", radioVertical.Checked) | Prefs.UpdateDouble("RxAdjustRight", PIn.PDouble(textRight.Text)) | Prefs.UpdateDouble("RxAdjustDown", PIn.PDouble(textDown.Text))) { changed = true; } if (radioGeneric.Checked) { if (Prefs.UpdateInt("RxGeneric", 0)) { changed = true; } } else if (radioNeither.Checked) { if (Prefs.UpdateInt("RxGeneric", 1)) { changed = true; } } else if (radioTwoSig.Checked) { if (Prefs.UpdateInt("RxGeneric", 2)) { changed = true; } } if (changed) { DataValid.SetInvalid(InvalidTypes.Prefs); } DialogResult = DialogResult.OK; }
private void butDelete_Click(object sender, System.EventArgs e) { //button is disabled for users without Query Admin permission. if (UserQueryCur == null) { MsgBox.Show(this, "Please select an item first."); return; } if (MessageBox.Show(Lan.g(this, "Delete Item?"), "", MessageBoxButtons.OKCancel) != DialogResult.OK) { return; } UserQueries.Delete(UserQueryCur); DataValid.SetInvalid(InvalidType.UserQueries); gridMain.SetSelected(false); UserQueryCur = null; FillGrid(); textQuery.Text = ""; }