Example #1
0
 private bool SaveToDb()
 {
     if (textProgDesc.Text == "")
     {
         MsgBox.Show(this, "Description may not be blank.");
         return(false);
     }
     if (radioModeTight.Checked && comboDefaultUserGroup.SelectedIndex == -1)
     {
         MsgBox.Show(this, "Please select a default user group first.");
         return(false);
     }
     if (textHL7FolderOut.Text == "")
     {
         MsgBox.Show(this, "HL7 out folder may not be blank.");
         return(false);
     }
     if (radioModeTight.Checked && textHL7FolderIn.Text == "")
     {
         MsgBox.Show(this, "HL7 in folder may not be blank.");
         return(false);
     }
     ProgramCur.ProgDesc = textProgDesc.Text;
     ProgramCur.Enabled  = checkEnabled.Checked;
     Programs.Update(ProgramCur);
     Prefs.UpdateString(PrefName.HL7FolderOut, textHL7FolderOut.Text);
     if (radioModeTight.Checked)
     {
         ProgramProperties.SetProperty(ProgramCur.ProgramNum, "IsStandalone", "0");
         Prefs.UpdateString(PrefName.HL7FolderIn, textHL7FolderIn.Text);
         ProgramProperties.SetProperty(ProgramCur.ProgramNum, "DefaultUserGroup",
                                       UserGroups.List[comboDefaultUserGroup.SelectedIndex].UserGroupNum.ToString());
         if (checkShowImages.Checked)
         {
             ProgramProperties.SetProperty(ProgramCur.ProgramNum, "ShowImagesModule", "1");
         }
         else
         {
             ProgramProperties.SetProperty(ProgramCur.ProgramNum, "ShowImagesModule", "0");
         }
         if (this.checkFeeSchedules.Checked)
         {
             ProgramProperties.SetProperty(ProgramCur.ProgramNum, "FeeSchedulesSetManually", "1");
         }
         else
         {
             ProgramProperties.SetProperty(ProgramCur.ProgramNum, "FeeSchedulesSetManually", "0");
         }
     }
     else              //standalone
     {
         ProgramProperties.SetProperty(ProgramCur.ProgramNum, "IsStandalone", "1");
         Prefs.UpdateString(PrefName.HL7FolderIn, "");
         ProgramProperties.SetProperty(ProgramCur.ProgramNum, "DefaultUserGroup", "0");
         ProgramProperties.SetProperty(ProgramCur.ProgramNum, "ShowImagesModule", "1");
         ProgramProperties.SetProperty(ProgramCur.ProgramNum, "FeeSchedulesSetManually", "0");
     }
     DataValid.SetInvalid(InvalidType.Programs, InvalidType.Prefs);
     return(true);
 }
Example #2
0
        ///<summary>Only save program properties on close</summary>
        private void butOK_Click(object sender, EventArgs e)
        {
            if (!validTaxLockDate.IsValid)
            {
                MsgBox.Show(this, "Enter a valid tax lock date");
                return;
            }
            long progNum = ProgramCur.ProgramNum;

            ProgramCur.Enabled = checkEnabled.Checked;
            Programs.Update(ProgramCur);
            ProgramProperties.SetProperty(progNum, "Test (T) or Production (P)", radioProdEnv.Checked?"P":"T");
            ProgramProperties.SetProperty(progNum, ProgramProperties.PropertyDescs.Username, textUsername.Text);
            ProgramProperties.SetProperty(progNum, ProgramProperties.PropertyDescs.Password, textPassword.Text);
            ProgramProperties.SetProperty(progNum, "Company Code", textCompanyCode.Text);
            ProgramProperties.SetProperty(progNum, "Sales Tax Adjustment Type", POut.Long(_defCurrentSalesTaxAdjType.DefNum));
            ProgramProperties.SetProperty(progNum, "Sales Tax Return Adjustment Type", POut.Long(_defCurrentSalesTaxReturnAdjType.DefNum));
            ProgramProperties.SetProperty(progNum, "Taxable States", string.Join(",", listBoxTaxedStates.Items.Cast <ODBoxItem <string> >().Select(x => x.Tag)));
            ProgramProperties.SetProperty(progNum, "Log Level", POut.Int((int)listBoxLogLevel.GetSelected <LogLevel>()));
            ProgramProperties.SetProperty(progNum, "Prepay Proc Codes", POut.String(textPrePayCodes.Text));
            ProgramProperties.SetProperty(progNum, "Discount Proc Codes", POut.String(textDiscountCodes.Text));
            ProgramProperties.SetProperty(progNum, "Tax Exempt Pat Field Def", _patFieldDefCurrentTaxExempt == null ? "0" : POut.Long(_patFieldDefCurrentTaxExempt.PatFieldDefNum));
            ProgramProperties.SetProperty(progNum, "Tax Code Overrides", POut.String(textOverrides.Text));
            ProgramProperties.SetProperty(progNum, "Tax Lock Date", POut.String(validTaxLockDate.Text));
            DataValid.SetInvalid(InvalidType.Programs);
            DialogResult = DialogResult.OK;
        }
Example #3
0
        private void butOK_Click(object sender, System.EventArgs e)
        {
            if (prog == null)
            {
                MsgBox.Show(this, "X-Charge entry is missing from the database.");               //should never happen
                return;
            }
            if (!File.Exists(textPath.Text))
            {
                MsgBox.Show(this, "Path is not valid.");
                return;
            }
            if (comboPaymentType.SelectedIndex == -1)
            {
                MsgBox.Show(this, "Please select a payment type first.");
                return;
            }
            prog.Enabled = checkEnabled.Checked;
            prog.Path    = textPath.Text;
            Programs.Update(prog);
            string paymentType = DefC.Short[(int)DefCat.PaymentTypes][comboPaymentType.SelectedIndex].DefNum.ToString();

            ProgramProperties.SetProperty(prog.ProgramNum, "PaymentType", paymentType);
            ProgramProperties.SetProperty(prog.ProgramNum, "Username", textUser.Text);
            ProgramProperties.SetProperty(prog.ProgramNum, "Password", textPassword.Text);
            DataValid.SetInvalid(InvalidType.Programs);
            DialogResult = DialogResult.OK;
        }
Example #4
0
		private void butDiagnostic_Click(object sender,EventArgs e) {
			//no need to validate all the other fields on the page.
			ProgramProperties.SetProperty(ProgramCur.ProgramNum,"eCWServer",textECWServer.Text);//this property will not exist if using Oracle, eCW will never use Oracle
			DataValid.SetInvalid(InvalidType.Programs);
			FormEcwDiag FormECWD=new FormEcwDiag();
			FormECWD.ShowDialog();
		}
        private void butOK_Click(object sender, EventArgs e)
        {
            Cursor = Cursors.WaitCursor;
            if (!Directory.Exists(textExportFolder.Text))
            {
                Cursor = Cursors.Default;
                MsgBox.Show(this, "Export folder does not exist.");
                return;
            }
            if (comboBillType.SelectedIndex == -1)
            {
                Cursor = Cursors.Default;
                MsgBox.Show(this, "Please select a billing type.");
                return;
            }
            if (!Regex.IsMatch(textPassword.Text, @"^[A-Z]{2}\d{4}$"))
            {
                Cursor = Cursors.Default;
                MsgBox.Show(this, "Password is not in correct format. Must be like this: AB1234");
                return;
            }
            long billtype   = _listBillingTypeDefs[comboBillType.SelectedIndex].DefNum;
            bool hasChanges = false;

            if (_progCur.Enabled != checkEnabled.Checked)
            {
                _progCur.Enabled = checkEnabled.Checked;
                Programs.Update(_progCur);
                hasChanges = true;
            }
            if (hasChanges
                | ProgramProperties.SetProperty(_progCur.ProgramNum, "FolderPath", textExportFolder.Text) > 0
                | ProgramProperties.SetProperty(_progCur.ProgramNum, "BillingType", billtype.ToString()) > 0
                | ProgramProperties.SetProperty(_progCur.ProgramNum, "Password", textPassword.Text) > 0)
            {
                DataValid.SetInvalid(InvalidType.Programs);
            }
            Cursor       = Cursors.Default;
            DialogResult = DialogResult.OK;
        }
Example #6
0
 private bool SaveToDb()
 {
     if ((radioModeTight.Checked || radioModeFull.Checked) && comboDefaultUserGroup.SelectedIndex == -1)
     {
         MsgBox.Show(this, "Please select a default user group first.");
         return(false);
     }
     if (checkEnabled.Checked)
     {
         if (textProgDesc.Text == "")
         {
             MsgBox.Show(this, "Description may not be blank.");
             return(false);
         }
         if (!HL7Defs.IsExistingHL7Enabled())
         {
             if ((radioModeTight.Checked || radioModeFull.Checked) && textHL7FolderIn.Text == "")
             {
                 MsgBox.Show(this, "HL7 in folder may not be blank.");
                 return(false);
             }
             if (textHL7FolderOut.Text == "")
             {
                 MsgBox.Show(this, "HL7 out folder may not be blank.");
                 return(false);
             }
             if (textHL7Server.Text == "")
             {
                 MsgBox.Show(this, "HL7 Server may not be blank.");
                 return(false);
             }
             if (textHL7ServiceName.Text == "")
             {
                 MsgBox.Show(this, "HL7 Service Name may not be blank.");
                 return(false);
             }
         }
     }
     ProgramCur.ProgDesc = textProgDesc.Text;
     ProgramCur.Enabled  = checkEnabled.Checked;
     Programs.Update(ProgramCur);
     Prefs.UpdateString(PrefName.HL7FolderOut, textHL7FolderOut.Text);
     ProgramProperties.SetProperty(ProgramCur.ProgramNum, "HL7Server", textHL7Server.Text);
     ProgramProperties.SetProperty(ProgramCur.ProgramNum, "HL7ServiceName", textHL7ServiceName.Text);
     ProgramProperties.SetProperty(ProgramCur.ProgramNum, "MedicalPanelUrl", textMedPanelURL.Text);
     if (radioModeTight.Checked || radioModeFull.Checked)
     {
         if (radioModeTight.Checked)
         {
             ProgramProperties.SetProperty(ProgramCur.ProgramNum, "eClinicalWorksMode", "0");                  //Tight
         }
         else
         {
             ProgramProperties.SetProperty(ProgramCur.ProgramNum, "eClinicalWorksMode", "2");                  //Full
         }
         ProgramProperties.SetProperty(ProgramCur.ProgramNum, "eCWServer", textECWServer.Text);
         Prefs.UpdateString(PrefName.HL7FolderIn, textHL7FolderIn.Text);
         ProgramProperties.SetProperty(ProgramCur.ProgramNum, "DefaultUserGroup",
                                       UserGroups.List[comboDefaultUserGroup.SelectedIndex].UserGroupNum.ToString());
         if (checkShowImages.Checked)
         {
             ProgramProperties.SetProperty(ProgramCur.ProgramNum, "ShowImagesModule", "1");
         }
         else
         {
             ProgramProperties.SetProperty(ProgramCur.ProgramNum, "ShowImagesModule", "0");
         }
         if (this.checkFeeSchedules.Checked)
         {
             ProgramProperties.SetProperty(ProgramCur.ProgramNum, "FeeSchedulesSetManually", "1");
         }
         else
         {
             ProgramProperties.SetProperty(ProgramCur.ProgramNum, "FeeSchedulesSetManually", "0");
         }
     }
     else if (radioModeStandalone.Checked)
     {
         ProgramProperties.SetProperty(ProgramCur.ProgramNum, "eClinicalWorksMode", "1");
         Prefs.UpdateString(PrefName.HL7FolderIn, "");
         ProgramProperties.SetProperty(ProgramCur.ProgramNum, "DefaultUserGroup", "0");
         ProgramProperties.SetProperty(ProgramCur.ProgramNum, "ShowImagesModule", "1");
         ProgramProperties.SetProperty(ProgramCur.ProgramNum, "FeeSchedulesSetManually", "0");
     }
     DataValid.SetInvalid(InvalidType.Programs, InvalidType.Prefs);
     return(true);
 }
Example #7
0
 private bool SaveToDb()
 {
     if ((radioModeTight.Checked || radioModeFull.Checked) && comboDefaultUserGroup.SelectedIndex == -1)
     {
         MsgBox.Show(this, "Please select a default user group first.");
         return(false);
     }
     if (checkEnabled.Checked)
     {
         if (textProgDesc.Text == "")
         {
             MsgBox.Show(this, "Description may not be blank.");
             return(false);
         }
         if (!HL7Defs.IsExistingHL7Enabled())
         {
             if ((radioModeTight.Checked || radioModeFull.Checked) && textHL7FolderIn.Text == "")
             {
                 MsgBox.Show(this, "HL7 in folder may not be blank.");
                 return(false);
             }
             if (textHL7FolderOut.Text == "")
             {
                 MsgBox.Show(this, "HL7 out folder may not be blank.");
                 return(false);
             }
             if (textHL7Server.Text == "")
             {
                 MsgBox.Show(this, "HL7 Server may not be blank.");
                 return(false);
             }
             if (textHL7ServiceName.Text == "")
             {
                 MsgBox.Show(this, "HL7 Service Name may not be blank.");
                 return(false);
             }
         }
     }
     ProgramCur.ProgDesc = textProgDesc.Text;
     ProgramCur.Enabled  = checkEnabled.Checked;
     Programs.Update(ProgramCur);
     Prefs.UpdateString(PrefName.HL7FolderOut, textHL7FolderOut.Text);
     ProgramProperties.SetProperty(ProgramCur.ProgramNum, "HL7Server", textHL7Server.Text);           //this property will not exist if using Oracle, eCW will never use Oracle
     ProgramProperties.SetProperty(ProgramCur.ProgramNum, "HL7ServiceName", textHL7ServiceName.Text); //this property will not exist if using Oracle, eCW will never use Oracle
     ProgramProperties.SetProperty(ProgramCur.ProgramNum, "MedicalPanelUrl", textMedPanelURL.Text);   //this property will not exist if using Oracle, eCW will never use Oracle
     if (checkLBSessionId.Checked)
     {
         ProgramProperties.SetProperty(ProgramCur.ProgramNum, "IsLBSessionIdExcluded", "1");
     }
     else
     {
         ProgramProperties.SetProperty(ProgramCur.ProgramNum, "IsLBSessionIdExcluded", "0");
     }
     if (checkQuadAsToothNum.Checked)
     {
         ProgramProperties.SetProperty(ProgramCur.ProgramNum, "IsQuadAsToothNum", "1");              //this property will not exist if using Oracle, eCW will never use Oracle
     }
     else
     {
         ProgramProperties.SetProperty(ProgramCur.ProgramNum, "IsQuadAsToothNum", "0");              //this property will not exist if using Oracle, eCW will never use Oracle
     }
     if (checkHideButChartRx.Checked)
     {
         ProgramProperties.SetProperty(ProgramCur.ProgramNum, "HideChartRxButtons", "1");              //this property will not exist if using Oracle, eCW will never use Oracle
     }
     else
     {
         ProgramProperties.SetProperty(ProgramCur.ProgramNum, "HideChartRxButtons", "0");              //this property will not exist if using Oracle, eCW will never use Oracle
     }
     if (checkProcRequireSignature.Checked)
     {
         ProgramProperties.SetProperty(ProgramCur.ProgramNum, "ProcRequireSignature", "1");
     }
     else
     {
         ProgramProperties.SetProperty(ProgramCur.ProgramNum, "ProcRequireSignature", "0");
     }
     if (checkProcNotesNoIncomplete.Checked)
     {
         ProgramProperties.SetProperty(ProgramCur.ProgramNum, "ProcNotesNoIncomplete", "1");
     }
     else
     {
         ProgramProperties.SetProperty(ProgramCur.ProgramNum, "ProcNotesNoIncomplete", "0");
     }
     if (radioModeTight.Checked || radioModeFull.Checked)
     {
         if (radioModeTight.Checked)
         {
             ProgramProperties.SetProperty(ProgramCur.ProgramNum, "eClinicalWorksMode", "0");                  //Tight
         }
         else
         {
             ProgramProperties.SetProperty(ProgramCur.ProgramNum, "eClinicalWorksMode", "2");                //Full
         }
         ProgramProperties.SetProperty(ProgramCur.ProgramNum, "eCWServer", textECWServer.Text);              //this property will not exist if using Oracle, eCW will never use Oracle
         Prefs.UpdateString(PrefName.HL7FolderIn, textHL7FolderIn.Text);
         ProgramProperties.SetProperty(ProgramCur.ProgramNum, "DefaultUserGroup",
                                       _listUserGroups[comboDefaultUserGroup.SelectedIndex].UserGroupNum.ToString());
         if (checkShowImages.Checked)
         {
             ProgramProperties.SetProperty(ProgramCur.ProgramNum, "ShowImagesModule", "1");
         }
         else
         {
             ProgramProperties.SetProperty(ProgramCur.ProgramNum, "ShowImagesModule", "0");
         }
         if (this.checkFeeSchedules.Checked)
         {
             ProgramProperties.SetProperty(ProgramCur.ProgramNum, "FeeSchedulesSetManually", "1");
         }
         else
         {
             ProgramProperties.SetProperty(ProgramCur.ProgramNum, "FeeSchedulesSetManually", "0");
         }
     }
     else if (radioModeStandalone.Checked)
     {
         ProgramProperties.SetProperty(ProgramCur.ProgramNum, "eClinicalWorksMode", "1");
         Prefs.UpdateString(PrefName.HL7FolderIn, "");
         ProgramProperties.SetProperty(ProgramCur.ProgramNum, "DefaultUserGroup", "0");
         ProgramProperties.SetProperty(ProgramCur.ProgramNum, "ShowImagesModule", "1");
         ProgramProperties.SetProperty(ProgramCur.ProgramNum, "FeeSchedulesSetManually", "0");
     }
     DataValid.SetInvalid(InvalidType.Programs, InvalidType.Prefs);
     return(true);
 }