Exemplo n.º 1
0
 private void butOK_Click(object sender, System.EventArgs e)
 {
     if (textFeeAmt.errorProvider1.GetError(textFeeAmt) != "" ||
         textPriInsAmt.errorProvider1.GetError(textPriInsAmt) != "" ||
         textSecInsAmt.errorProvider1.GetError(textSecInsAmt) != "" ||
         textDiscount.errorProvider1.GetError(textDiscount) != "" ||
         textPatAmt.errorProvider1.GetError(textPatAmt) != ""
         )
     {
         MsgBox.Show(this, "Please fix data entry errors first.");
         return;
     }
     if (comboPriority.SelectedIndex == 0)
     {
         ProcCur.Priority = 0;
     }
     else
     {
         ProcCur.Priority = DefB.Short[(int)DefCat.TxPriorities][comboPriority.SelectedIndex - 1].DefNum;
     }
     ProcCur.ToothNumTP = textToothNumTP.Text;
     ProcCur.Surf       = textSurf.Text;
     ProcCur.ProcCode   = textCode.Text;
     ProcCur.Descript   = textDescript.Text;
     ProcCur.FeeAmt     = PIn.PDouble(textFeeAmt.Text);
     ProcCur.PriInsAmt  = PIn.PDouble(textPriInsAmt.Text);
     ProcCur.SecInsAmt  = PIn.PDouble(textSecInsAmt.Text);
     ProcCur.Discount   = PIn.PDouble(textDiscount.Text);
     ProcCur.PatAmt     = PIn.PDouble(textPatAmt.Text);
     ProcTPs.InsertOrUpdate(ProcCur, false);           //IsNew not applicable here
     DialogResult = DialogResult.OK;
 }
Exemplo n.º 2
0
 private void butOK_Click(object sender, System.EventArgs e)
 {
     if (textFeeAmt.errorProvider1.GetError(textFeeAmt) != "" ||
         textPriInsAmt.errorProvider1.GetError(textPriInsAmt) != "" ||
         textSecInsAmt.errorProvider1.GetError(textSecInsAmt) != "" ||
         textDiscount.errorProvider1.GetError(textDiscount) != "" ||
         textPatAmt.errorProvider1.GetError(textPatAmt) != "" ||
         !textFeeAllowed.IsValid
         )
     {
         MsgBox.Show(this, "Please fix data entry errors first.");
         return;
     }
     if (comboPriority.SelectedIndex == 0)
     {
         ProcCur.Priority = 0;
     }
     else
     {
         ProcCur.Priority = _listTxPriorityDefs[comboPriority.SelectedIndex - 1].DefNum;
     }
     ProcCur.ToothNumTP = textToothNumTP.Text;
     ProcCur.Surf       = textSurf.Text;
     ProcCur.ProcCode   = textCode.Text;
     ProcCur.Descript   = textDescript.Text;
     ProcCur.FeeAmt     = PIn.Double(textFeeAmt.Text);
     ProcCur.PriInsAmt  = PIn.Double(textPriInsAmt.Text);
     ProcCur.SecInsAmt  = PIn.Double(textSecInsAmt.Text);
     ProcCur.Discount   = PIn.Double(textDiscount.Text);
     ProcCur.PatAmt     = PIn.Double(textPatAmt.Text);
     ProcCur.Prognosis  = textPrognosis.Text;
     ProcCur.Dx         = textDx.Text;
     ProcCur.ProcAbbr   = textProcAbbr.Text;
     ProcCur.FeeAllowed = PIn.Double(textFeeAllowed.Text);
     ProcTPs.InsertOrUpdate(ProcCur, false);           //IsNew not applicable here
     SecurityLogs.MakeLogEntry(Permissions.TreatPlanEdit, ProcCur.PatNum, "Edit proc: " + ProcCur.Descript);
     DialogResult = DialogResult.OK;
 }