Exemple #1
0
        private void Edit_Click()
        {
            if (gridMain.GetSelectedIndex() == -1)
            {
                MsgBox.Show(this, "Please pick an account first.");
                return;
            }
            int acctNum = PIn.PInt(table.Rows[gridMain.GetSelectedIndex()]["AccountNum"].ToString());

            if (acctNum == 0)
            {
                MsgBox.Show(this, "This account is generated automatically, and cannot be edited.");
                return;
            }
            Account         acct  = Accounts.GetAccount(acctNum);
            FormAccountEdit FormA = new FormAccountEdit(acct);

            FormA.ShowDialog();
            FillGrid();
            for (int i = 0; i < table.Rows.Count; i++)
            {
                if (table.Rows[i]["AccountNum"].ToString() == acctNum.ToString())
                {
                    gridMain.SetSelected(i, true);
                }
            }
        }
Exemple #2
0
        private void butUp_Click(object sender, System.EventArgs e)
        {
            if (gridMain.SelectedIndices.Length == 0)
            {
                MsgBox.Show(this, "You must first select a row.");
                return;
            }
            int selected = gridMain.GetSelectedIndex();

            if (selected == 0)
            {
                return;                //already at the top
            }
            Operatory selectedOp      = (Operatory)gridMain.Rows[selected].Tag;
            Operatory aboveSelectedOp = (Operatory)gridMain.Rows[selected - 1].Tag;
            string    strErr;

            if (!CanReorderOps(selectedOp, aboveSelectedOp, out strErr))
            {
                MessageBox.Show(strErr);                 //already translated
                return;
            }
            int selectedItemOrder = selectedOp.ItemOrder;

            //move selected item up
            selectedOp.ItemOrder = aboveSelectedOp.ItemOrder;
            //move the one above it down
            aboveSelectedOp.ItemOrder = selectedItemOrder;
            //Swap positions
            _listOps = _listOps.OrderBy(x => x.ItemOrder).ToList();
            //FillGrid();  //We don't fill grid anymore because it takes too long and we dont need to pull any new data into the DB.
            SwapGridMainLocations(selected, selected - 1);
            gridMain.SetSelected(selected - 1, true);
        }
Exemple #3
0
        private void butSlip_Click(object sender, EventArgs e)
        {
            int idx = gridMain.GetSelectedIndex();

            if (idx == -1)
            {
                MsgBox.Show(this, "Please select a referral first");
                return;
            }
            Referral referral = Referrals.GetReferral(RefAttachList[idx].ReferralNum);
            SheetDef sheetDef;

            if (referral.Slip == 0)
            {
                sheetDef = SheetsInternal.GetSheetDef(SheetInternalType.ReferralSlip);
            }
            else
            {
                sheetDef = SheetDefs.GetSheetDef(referral.Slip);
            }
            Sheet sheet = SheetUtil.CreateSheet(sheetDef, PatNum);

            SheetParameter.SetParameter(sheet, "PatNum", PatNum);
            SheetParameter.SetParameter(sheet, "ReferralNum", referral.ReferralNum);
            SheetFiller.FillFields(sheet);
            SheetUtil.CalculateHeights(sheet, this.CreateGraphics());
            FormSheetFillEdit FormS = new FormSheetFillEdit(sheet);

            FormS.ShowDialog();
            //grid will not be refilled, so no need to reselect.
        }
Exemple #4
0
        private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            SelectedPatNum = AptList[e.Row].PatNum;
            int          currentSelection = gridMain.GetSelectedIndex();
            int          currentScroll    = gridMain.ScrollValue;
            FormApptEdit FormAE           = new FormApptEdit(AptList[e.Row].AptNum);

            FormAE.PinIsVisible = true;
            FormAE.ShowDialog();
            if (FormAE.DialogResult != DialogResult.OK)
            {
                return;
            }
            if (FormAE.PinClicked)
            {
                PinClicked   = true;
                AptSelected  = AptList[e.Row].AptNum;
                DialogResult = DialogResult.OK;
                return;
            }
            else
            {
                FillGrid();
                gridMain.SetSelected(currentSelection, true);
                gridMain.ScrollValue = currentScroll;
            }
        }
        private void FillReqs()
        {
            int schoolCourse = 0;

            if (comboCourse.SelectedIndex != -1)
            {
                schoolCourse = SchoolCourses.List[comboCourse.SelectedIndex].SchoolCourseNum;
            }
            gridReqs.BeginUpdate();
            gridReqs.Columns.Clear();
            ODGridColumn col = new ODGridColumn("", 100);

            gridReqs.Columns.Add(col);
            gridReqs.Rows.Clear();
            if (gridStudents.GetSelectedIndex() == -1)
            {
                gridReqs.EndUpdate();
                return;
            }
            ReqTable = ReqStudents.GetForStudent(StudentList[gridStudents.GetSelectedIndex()].ProvNum, schoolCourse);
            ODGridRow row;

            for (int i = 0; i < ReqTable.Rows.Count; i++)
            {
                row = new ODGridRow();
                row.Cells.Add(ReqTable.Rows[i]["Descript"].ToString());
                gridReqs.Rows.Add(row);
            }
            gridReqs.EndUpdate();
        }
Exemple #6
0
        private void butAddBrand_Click(object sender, System.EventArgs e)
        {
            if (gridMain.GetSelectedIndex() == -1)
            {
                MessageBox.Show(Lan.g(this, "You must first highlight the generic medication from the list.  If it is not already on the list, then you must add it first."));
                return;
            }
            Medication selected = medList[gridMain.GetSelectedIndex()];

            if (selected.MedicationNum != selected.GenericNum)
            {
                MessageBox.Show(Lan.g(this, "The selected medication is not generic."));
                return;
            }
            Medication MedicationCur = new Medication();

            Medications.Insert(MedicationCur);            //so that we will have the primary key
            MedicationCur.GenericNum = selected.MedicationNum;
            FormMedicationEdit FormME = new FormMedicationEdit();

            FormME.MedicationCur = MedicationCur;
            FormME.IsNew         = true;
            FormME.ShowDialog();
            FillGrid();
        }
Exemple #7
0
        private void butUp_Click(object sender, EventArgs e)
        {
            int idx = gridMain.GetSelectedIndex();

            if (idx == -1)
            {
                MsgBox.Show(this, "Please select a fee schedule first.");
                return;
            }
            if (idx == 0)
            {
                return;
            }
            //swap the orders.  This makes it work no matter which types are being viewed.
            int order1 = FeeSchedsForType[idx - 1].ItemOrder;
            int order2 = FeeSchedsForType[idx].ItemOrder;

            FeeSchedsForType[idx - 1].ItemOrder = order2;
            FeeScheds.Update(FeeSchedsForType[idx - 1]);
            FeeSchedsForType[idx].ItemOrder = order1;
            FeeScheds.Update(FeeSchedsForType[idx]);
            changed = true;
            FillGrid();
            gridMain.SetSelected(idx - 1, true);
        }
        private void RxSelected()
        {
            if (gridMain.GetSelectedIndex() == -1)
            {
                //this should never happen
                return;
            }
            RxDef RxDefCur = RxDefList[gridMain.GetSelectedIndex()];

            //Alert
            RxAlert[] alertList = RxAlerts.Refresh(RxDefCur.RxDefNum);
            Disease[] diseases  = Diseases.Refresh(PatCur.PatNum);
            ArrayList matchAL   = new ArrayList();

            for (int i = 0; i < alertList.Length; i++)
            {
                for (int j = 0; j < diseases.Length; j++)
                {
                    if (alertList[i].DiseaseDefNum == diseases[j].DiseaseDefNum)
                    {
                        matchAL.Add(DiseaseDefs.GetName(diseases[j].DiseaseDefNum));
                    }
                }
            }
            if (matchAL.Count > 0)
            {
                string alert = Lan.g(this, "This patient has the following medical conditions or allergies:\r\n");
                for (int i = 0; i < matchAL.Count; i++)
                {
                    alert += "\r\n" + matchAL[i];
                }
                alert += "\r\n\r\n" + Lan.g(this, "Continue anyway?");
                if (MessageBox.Show(alert, "Alert", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation) != DialogResult.OK)
                {
                    return;
                }
            }
            //User OK with alert
            RxPat RxPatCur = new RxPat();

            RxPatCur.RxDate  = DateTime.Today;
            RxPatCur.PatNum  = PatCur.PatNum;
            RxPatCur.Drug    = RxDefCur.Drug;
            RxPatCur.Sig     = RxDefCur.Sig;
            RxPatCur.Disp    = RxDefCur.Disp;
            RxPatCur.Refills = RxDefCur.Refills;
            //Notes not copied: we don't want these kinds of notes cluttering things
            FormRxEdit FormE = new FormRxEdit(PatCur, RxPatCur);

            FormE.IsNew = true;
            FormE.ShowDialog();
            if (FormE.DialogResult != DialogResult.OK)
            {
                return;
            }
            DialogResult = DialogResult.OK;
        }
 private void menuItemGoTo_Click(object sender, EventArgs e)
 {
     if (gridMain.GetSelectedIndex() == -1)
     {
         return;
     }
     SelectedPatNum = PIn.Long(TableRegKeys.Rows[gridMain.GetSelectedIndex()]["PatNum"].ToString());
     Close();
 }
 private void butOK_Click(object sender, EventArgs e)
 {
     if (gridMain.GetSelectedIndex() == -1)
     {
         MsgBox.Show(this, "Please select a provider first.");
         return;
     }
     SelectedProvNum = ProviderC.ListShort[gridMain.GetSelectedIndex()].ProvNum;
     DialogResult    = DialogResult.OK;
 }
 private void butDeleteTurnaround_Click(object sender, EventArgs e)
 {
     if (gridMain.GetSelectedIndex() == -1)
     {
         MsgBox.Show(this, "Please select an item first.");
         return;
     }
     turnaroundList.RemoveAt(gridMain.GetSelectedIndex());
     FillGrid();
 }
 private void PatSelected()
 {
     if (_fillGridThread != null)
     {
         return;//still filtering results (rarely happens)
     }
     //SelectedPatNum=PIn.PInt(PtDataTable.Rows[grid2.CurrentRowIndex][0].ToString());
     SelectedPatNum  = PIn.Long(PtDataTable.Rows[gridMain.GetSelectedIndex()][0].ToString());
     SELECTNAME.Text = "Name: " + PIn.String(PtDataTable.Rows[gridMain.GetSelectedIndex()][2].ToString()) + " " + PIn.String(PtDataTable.Rows[gridMain.GetSelectedIndex()][1].ToString());
 }
Exemple #13
0
 private void butOK_Click(object sender, System.EventArgs e)
 {
     if (gridMain.GetSelectedIndex() == -1)
     {
         MsgBox.Show(this, "Please select an item first.");
         return;
     }
     SelectedLabCaseNum = labCaseList[gridMain.GetSelectedIndex()].LabCaseNum;
     DialogResult       = DialogResult.OK;
 }
Exemple #14
0
 ///<summary>Only available in selection mode.</summary>
 private void butOK_Click(object sender, EventArgs e)
 {
     if (grid.GetSelectedIndex() == -1)
     {
         MsgBox.Show(this, "Please select a deposit first.");
         return;
     }
     SelectedDeposit = DList[grid.GetSelectedIndex()];
     DialogResult    = DialogResult.OK;
 }
Exemple #15
0
 private void butOK_Click(object sender, System.EventArgs e)
 {
     if (gridMain.GetSelectedIndex() == -1)
     {
         MsgBox.Show(this, "Please select an image first.");
         return;
     }
     SelectedDocNum = Docs[gridMain.GetSelectedIndex()].DocNum;
     DialogResult   = DialogResult.OK;
 }
 private void butOK_Click(object sender, System.EventArgs e)
 {
     if (gridMain.GetSelectedIndex() == -1)
     {
         MsgBox.Show(this, "Please select an account first.");
         return;
     }
     SelectedAccount = ((Account)gridMain.Rows[gridMain.GetSelectedIndex()].Tag).Copy();
     DialogResult    = DialogResult.OK;
 }
 private void butOK_Click(object sender, EventArgs e)
 {
     //not even visible unless is selection mode
     if (gridMain.GetSelectedIndex() == -1)
     {
         SelectedInsFilingCodeNum = 0;
     }
     else
     {
         SelectedInsFilingCodeNum = _listInsFilingCodes[gridMain.GetSelectedIndex()].InsFilingCodeNum;
     }
     DialogResult = DialogResult.OK;
 }
        private void butSlip_Click(object sender, EventArgs e)
        {
            int idx = gridMain.GetSelectedIndex();

            if (idx == -1)
            {
                MsgBox.Show(this, "Please select a referral first");
                return;
            }
            Referral referral = ReferralL.GetReferral(((RefAttach)gridMain.ListGridRows[idx].Tag).ReferralNum);

            if (referral == null)
            {
                return;
            }
            SheetDef sheetDef;

            if (referral.Slip == 0)
            {
                sheetDef = SheetsInternal.GetSheetDef(SheetInternalType.ReferralSlip);
            }
            else
            {
                sheetDef = SheetDefs.GetSheetDef(referral.Slip);
            }
            Sheet sheet = SheetUtil.CreateSheet(sheetDef, PatNum);

            SheetParameter.SetParameter(sheet, "PatNum", PatNum);
            SheetParameter.SetParameter(sheet, "ReferralNum", referral.ReferralNum);
            SheetFiller.FillFields(sheet);
            SheetUtil.CalculateHeights(sheet);
            FormSheetFillEdit.ShowForm(sheet);
        }
        private void FillGrid()
        {
            if (comboClass.SelectedIndex == -1 || comboCourse.SelectedIndex == -1)
            {
                return;
            }
            int selected = 0;

            if (gridMain.GetSelectedIndex() != -1)
            {
                selected = PIn.PInt(table.Rows[gridMain.GetSelectedIndex()]["ReqNeededNum"].ToString());
            }
            int scroll       = gridMain.ScrollValue;
            int schoolClass  = SchoolClasses.List[comboClass.SelectedIndex].SchoolClassNum;
            int schoolCourse = SchoolCourses.List[comboCourse.SelectedIndex].SchoolCourseNum;

            table = ReqNeededs.Refresh(schoolClass, schoolCourse);
            gridMain.BeginUpdate();
            gridMain.Columns.Clear();
            ODGridColumn col;

            //col=new ODGridColumn(Lan.g("TableRequirementsNeeded","Class"),100);
            //gridMain.Columns.Add(col);
            //col=new ODGridColumn(Lan.g("TableRequirementsNeeded","Course"),100);
            //gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableRequirementsNeeded", "Description"), 200);
            gridMain.Columns.Add(col);
            gridMain.Rows.Clear();
            ODGridRow row;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                row = new ODGridRow();
                //row.Cells.Add(SchoolClasses.GetDescript(PIn.PInt(table.Rows[i]["SchoolClassNum"].ToString())));
                //row.Cells.Add(SchoolCourses.GetCourseID(PIn.PInt(table.Rows[i]["SchoolCourseNum"].ToString())));
                row.Cells.Add(table.Rows[i]["Descript"].ToString());
                //row.Tag
                gridMain.Rows.Add(row);
            }
            gridMain.EndUpdate();
            for (int i = 0; i < table.Rows.Count; i++)
            {
                if (table.Rows[i]["ReqNeededNum"].ToString() == selected.ToString())
                {
                    gridMain.SetSelected(i, true);
                    break;
                }
            }
            gridMain.ScrollValue = scroll;
        }
Exemple #20
0
 private void butOK_Click(object sender, EventArgs e)
 {
     //not even visible unless is selection mode
     if (gridMain.GetSelectedIndex() == -1)
     {
         //	MsgBox.Show(this,"Please select an item first.");
         //	return;
         SelectedPharmacyNum = 0;
     }
     else
     {
         SelectedPharmacyNum = _listPharmacies[gridMain.GetSelectedIndex()].PharmacyNum;
     }
     DialogResult = DialogResult.OK;
 }
Exemple #21
0
        private void FillGrid()
        {
            if (comboClassFrom.SelectedIndex == -1 || comboCourseFrom.SelectedIndex == -1)
            {
                return;
            }
            long selectedReqNum = 0;

            if (gridMain.GetSelectedIndex() != -1)
            {
                selectedReqNum = _listReqsInGrid[gridMain.GetSelectedIndex()].ReqNeededNum;
            }
            long schoolClass  = _listSchoolClasses[comboClassFrom.SelectedIndex].SchoolClassNum;
            long schoolCourse = _listSchoolCourses[comboCourseFrom.SelectedIndex].SchoolCourseNum;
            int  scroll       = gridMain.ScrollValue;

            gridMain.BeginUpdate();
            gridMain.Columns.Clear();
            ODGridColumn col;

            col = new ODGridColumn(Lan.g("TableRequirementsNeeded", "Description"), 200);
            gridMain.Columns.Add(col);
            gridMain.Rows.Clear();
            ODGridRow row;

            _listReqsInGrid = new List <ReqNeeded>();
            for (int i = 0; i < _listReqsAll.Count; i++)
            {
                if (_listReqsAll[i].SchoolClassNum == schoolClass && _listReqsAll[i].SchoolCourseNum == schoolCourse)
                {
                    _listReqsInGrid.Add(_listReqsAll[i].Copy());
                }
            }
            _listReqsInGrid = _listReqsInGrid.OrderBy(x => x.Descript).ToList();
            for (int i = 0; i < _listReqsInGrid.Count; i++)
            {
                row = new ODGridRow();
                row.Cells.Add(_listReqsInGrid[i].Descript);
                gridMain.Rows.Add(row);
                if (_listReqsInGrid[i].ReqNeededNum == selectedReqNum)
                {
                    gridMain.SetSelected(i, true);
                    continue;
                }
            }
            gridMain.EndUpdate();
            gridMain.ScrollValue = scroll;
        }
Exemple #22
0
        private void butCopy2_Click(object sender, EventArgs e)
        {
            //This button is not enabled unless user has appropriate permission for setup.
            if (grid2.GetSelectedIndex() == -1)
            {
                MsgBox.Show(this, "Please select a sheet from the list above first.");
                return;
            }
            SheetDef sheetdef = grid2.SelectedTag <SheetDef>();

            sheetdef.Description = sheetdef.Description + "2";
            SheetDefs.GetFieldsAndParameters(sheetdef);
            sheetdef.IsNew = true;
            SheetDefs.InsertOrUpdate(sheetdef, isOldSheetDuplicate: sheetdef.DateTCreated.Year < 1880);
            FillGrid2(sheetdef.SheetDefNum);
        }
Exemple #23
0
        private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            int     currentSelection = gridMain.GetSelectedIndex();
            int     currentScroll    = gridMain.ScrollValue;
            Patient pat = Patients.GetPat(_listPlannedAppts[e.Row].PatNum);          //Only one can be selected at a time in this grid.

            FormOpenDental.S_Contr_PatientSelected(pat, true);
            FormApptEdit FormAE = new FormApptEdit(_listPlannedAppts[e.Row].AptNum);

            FormAE.PinIsVisible = true;
            FormAE.ShowDialog();
            if (FormAE.DialogResult != DialogResult.OK)
            {
                return;
            }
            if (FormAE.PinClicked)
            {
                SendPinboard_Click();
                DialogResult = DialogResult.OK;
            }
            else
            {
                RefreshAptList();
                FillGrid();
                gridMain.SetSelected(currentSelection, true);
                gridMain.ScrollValue = currentScroll;
            }
        }
 private void butOK_Click(object sender, System.EventArgs e)
 {
     if (gridMain.GetSelectedIndex() == -1)
     {
         MessageBox.Show(Lan.g(this, "Please select a plan first."));
         return;
     }
     if (ViewRelat && listRelat.SelectedIndex == -1)
     {
         MessageBox.Show(Lan.g(this, "Please select a relationship first."));
         return;
     }
     if (ViewRelat)
     {
         PatRelat = (Relat)listRelat.SelectedIndex;
     }
     SelectedPlan = PlanList[gridMain.GetSelectedIndex()];
     DialogResult = DialogResult.OK;
 }
Exemple #25
0
        private void RxSelected()
        {
            if (gridMain.GetSelectedIndex() == -1)
            {
                //this should never happen
                return;
            }
            RxDef RxDefCur = RxDefList[gridMain.GetSelectedIndex()];

            //Alert
            if (!RxAlertL.DisplayAlerts(PatCur.PatNum, 0, RxDefCur.RxDefNum))
            {
                return;
            }
            //User OK with alert
            RxPat RxPatCur = new RxPat();

            RxPatCur.RxDate       = DateTime.Today;
            RxPatCur.PatNum       = PatCur.PatNum;
            RxPatCur.Drug         = RxDefCur.Drug;
            RxPatCur.IsControlled = RxDefCur.IsControlled;
            RxPatCur.Sig          = RxDefCur.Sig;
            RxPatCur.Disp         = RxDefCur.Disp;
            RxPatCur.Refills      = RxDefCur.Refills;
            if (PrefC.GetBool(PrefName.RxSendNewToQueue))
            {
                RxPatCur.SendStatus = RxSendStatus.InElectQueue;
            }
            else
            {
                RxPatCur.SendStatus = RxSendStatus.Unsent;
            }
            //Notes not copied: we don't want these kinds of notes cluttering things
            FormRxEdit FormE = new FormRxEdit(PatCur, RxPatCur);

            FormE.IsNew = true;
            FormE.ShowDialog();
            if (FormE.DialogResult != DialogResult.OK)
            {
                return;
            }
            DialogResult = DialogResult.OK;
        }
Exemple #26
0
 private void butOK_Click(object sender, System.EventArgs e)
 {
     if (gridMain.GetSelectedIndex() == -1)
     {
         MessageBox.Show(Lan.g(this, "Please select a plan first."));
         return;
     }
     if (ViewRelat && listRelat.SelectedIndex == -1)
     {
         MessageBox.Show(Lan.g(this, "Please select a relationship first."));
         return;
     }
     if (ViewRelat)
     {
         PatRelat = (Relat)listRelat.SelectedIndex;
     }
     SelectedSub  = (InsSub)gridMain.ListGridRows[gridMain.GetSelectedIndex()].Tag;
     SelectedPlan = InsPlans.GetPlan(SelectedSub.PlanNum, PlanList);
     DialogResult = DialogResult.OK;
 }
Exemple #27
0
        private void Reconcile_Click()
        {
            int            selectedRow = gridMain.GetSelectedIndex();
            int            scrollValue = gridMain.ScrollValue;
            FormReconciles FormR       = new FormReconciles(AccountCur.AccountNum);

            FormR.ShowDialog();
            FillGrid();
            gridMain.SetSelected(selectedRow, true);
            gridMain.ScrollValue = scrollValue;
        }
Exemple #28
0
 private void butOK_Click(object sender, System.EventArgs e)
 {
     if (gridMain.GetSelectedIndex() == -1)
     {
         MsgBox.Show(this, "Please select an account first.");
         return;
     }
     if (IsQuickBooks)
     {
         for (int i = 0; i < gridMain.SelectedIndices.Length; i++)
         {
             SelectedAccountsQB.Add((string)(gridMain.Rows[gridMain.SelectedIndices[i]].Tag));
         }
     }
     else
     {
         SelectedAccount = ((Account)gridMain.Rows[gridMain.GetSelectedIndex()].Tag).Clone();
     }
     DialogResult = DialogResult.OK;
 }
        private void butUp_Click(object sender, EventArgs e)
        {
            int selected = gridMain.GetSelectedIndex();

            try{
                QuestionDefs.MoveUp(selected, QuestionList);
            }
            catch (ApplicationException ex) {
                MessageBox.Show(ex.Message);
                return;
            }
            FillGrid();
            if (selected == 0)
            {
                gridMain.SetSelected(0, true);
            }
            else
            {
                gridMain.SetSelected(selected - 1, true);
            }
        }
        private void butTransfer_Click(object sender, EventArgs e)
        {
            if (gridBal.GetSelectedIndex() == -1)
            {
                MsgBox.Show(this, "Please select a row from the Family Balances grid first.");
                return;
            }
            if (comboProv.SelectedIndex == -1)
            {
                MsgBox.Show(this, "Please select a provider first.");
                return;
            }
            double amt = PIn.PDouble(tableBalances.Rows[gridBal.GetSelectedIndex()]["StartBal"].ToString());
            //From-----------------------------------------------------------------------------------
            PaySplit split = new PaySplit();

            split.PatNum   = PatNum;
            split.PayNum   = PaymentCur.PayNum;
            split.ProcDate = PIn.PDate(textDate.Text);         //this may be updated upon closing
            split.DatePay  = PIn.PDate(textDate.Text);         //this may be updated upon closing
            split.ProvNum  = PIn.PInt(tableBalances.Rows[gridBal.GetSelectedIndex()]["ProvNum"].ToString());
            split.SplitAmt = amt;
            SplitList.Add(split);
            //To-----------------------------------------------------------------------------------
            split          = new PaySplit();
            split.PatNum   = PatNum;
            split.PayNum   = PaymentCur.PayNum;
            split.ProcDate = PIn.PDate(textDate.Text);
            split.DatePay  = PIn.PDate(textDate.Text);
            split.ProvNum  = Providers.List[comboProv.SelectedIndex].ProvNum;
            split.SplitAmt = -amt;
            SplitList.Add(split);
            FillMain();
        }