Beispiel #1
0
        private void FillCarePlans()
        {
            gridCarePlans.BeginUpdate();
            gridCarePlans.Columns.Clear();
            int colDatePixCount         = 66;
            int variablePixCount        = gridCarePlans.Width - 10 - colDatePixCount;
            int colGoalPixCount         = variablePixCount / 2;
            int colInstructionsPixCount = variablePixCount - colGoalPixCount;

            gridCarePlans.Columns.Add(new UI.ODGridColumn("Date", colDatePixCount));
            gridCarePlans.Columns.Add(new UI.ODGridColumn("Goal", colGoalPixCount));
            gridCarePlans.Columns.Add(new UI.ODGridColumn("Instructions", colInstructionsPixCount));
            gridCarePlans.EndUpdate();
            gridCarePlans.BeginUpdate();
            gridCarePlans.Rows.Clear();
            _listCarePlans = EhrCarePlans.Refresh(_patCur.PatNum);
            for (int i = 0; i < _listCarePlans.Count; i++)
            {
                UI.ODGridRow row = new UI.ODGridRow();
                row.Cells.Add(_listCarePlans[i].DatePlanned.ToShortDateString());                //Date
                Snomed snomedEducation = Snomeds.GetByCode(_listCarePlans[i].SnomedEducation);
                if (snomedEducation == null)
                {
                    row.Cells.Add("");                    //We allow blank or "NullFlavor" SNOMEDCT codes when exporting CCDAs, so we allow them to be blank when displaying here as well.
                }
                else
                {
                    row.Cells.Add(snomedEducation.Description);               //GoalDescript
                }
                row.Cells.Add(_listCarePlans[i].Instructions);                //Instructions
                gridCarePlans.Rows.Add(row);
            }
            gridCarePlans.EndUpdate();
        }
        private void FillGrid()
        {
            if (IsSelectionMode)
            {
                DList = Deposits.GetUnattached();
            }
            else
            {
                DList = Deposits.Refresh();
            }
            grid.BeginUpdate();
            grid.Columns.Clear();
            ODGridColumn col = new ODGridColumn(Lan.g("TableDepositSlips", "Date"), 80);

            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableDepositSlips", "Amount"), 90);
            grid.Columns.Add(col);
            grid.Rows.Clear();
            OpenDental.UI.ODGridRow row;
            for (int i = 0; i < DList.Length; i++)
            {
                row = new OpenDental.UI.ODGridRow();
                row.Cells.Add(DList[i].DateDeposit.ToShortDateString());
                row.Cells.Add(DList[i].Amount.ToString("F"));
                grid.Rows.Add(row);
            }
            grid.EndUpdate();
            grid.ScrollToEnd();
        }
Beispiel #3
0
        private void FillGrid()
        {
            PayPeriods.RefreshCache();
            gridMain.BeginUpdate();
            gridMain.Columns.Clear();
            ODGridColumn col = new ODGridColumn("Start Date", 80);

            gridMain.Columns.Add(col);
            col = new ODGridColumn("End Date", 80);
            gridMain.Columns.Add(col);
            col = new ODGridColumn("Paycheck Date", 100);
            gridMain.Columns.Add(col);
            gridMain.Rows.Clear();
            UI.ODGridRow row;
            for (int i = 0; i < PayPeriods.List.Length; i++)
            {
                row = new OpenDental.UI.ODGridRow();
                row.Cells.Add(PayPeriods.List[i].DateStart.ToShortDateString());
                row.Cells.Add(PayPeriods.List[i].DateStop.ToShortDateString());
                if (PayPeriods.List[i].DatePaycheck.Year < 1880)
                {
                    row.Cells.Add("");
                }
                else
                {
                    row.Cells.Add(PayPeriods.List[i].DatePaycheck.ToShortDateString());
                }
                gridMain.Rows.Add(row);
            }
            gridMain.EndUpdate();
        }
Beispiel #4
0
 private void FillProviders()
 {
     gridProviders.BeginUpdate();
     gridProviders.Rows.Clear();
     gridProviders.Columns.Clear();
     gridProviders.Columns.Add(new UI.ODGridColumn("Type", 74, HorizontalAlignment.Left));        //Column width determined in LayoutProviders().
     gridProviders.Columns.Add(new UI.ODGridColumn("IsEnabled", 74, HorizontalAlignment.Center)); //Column width determined in LayoutProviders().
     gridProviders.Columns.Add(new UI.ODGridColumn("IsIDPd", 74, HorizontalAlignment.Center));    //Column width determined in LayoutProviders().
     gridProviders.Columns.Add(new UI.ODGridColumn("IsEPCS", 74, HorizontalAlignment.Center));
     gridProviders.Columns.Add(new UI.ODGridColumn("NPI", 0, HorizontalAlignment.Left));          //Column width determined in LayoutProviders().
     //Gets from db.  Better to call db than to use cache at HQ, since cache might be large.
     //Only get Legacy eRx items.  Other types will be in the BroadcasterMonitor.
     _listProvErxs = ProviderErxs.Refresh(_patCur.PatNum).FindAll(x => x.ErxType == ErxOption.Legacy);
     for (int i = 0; i < _listProvErxs.Count; i++)
     {
         UI.ODGridRow row = new UI.ODGridRow();
         row.Tag = _listProvErxs[i];
         row.Cells.Add(new UI.ODGridCell(_listProvErxs[i].ErxType.ToString()));
         string status = "";
         if (_listProvErxs[i].IsEnabled == ErxStatus.Enabled)
         {
             status = "X";
         }
         else if (_listProvErxs[i].IsEnabled != ErxStatus.Disabled)
         {
             status = "P";
         }
         row.Cells.Add(new UI.ODGridCell(status));
         row.Cells.Add(new UI.ODGridCell(_listProvErxs[i].IsIdentifyProofed?"X":""));
         row.Cells.Add(new UI.ODGridCell(_listProvErxs[i].IsEpcs?"X":""));
         row.Cells.Add(new UI.ODGridCell(_listProvErxs[i].NationalProviderID));
         gridProviders.Rows.Add(row);
     }
     gridProviders.EndUpdate();
 }
Beispiel #5
0
        private void FillGrid()
        {
            AppointmentRules.Refresh();
            gridMain.BeginUpdate();
            gridMain.Columns.Clear();
            ODGridColumn col = new ODGridColumn("Description", 200);

            gridMain.Columns.Add(col);
            col = new ODGridColumn("Start Code", 100);
            gridMain.Columns.Add(col);
            col = new ODGridColumn("End Code", 100);
            gridMain.Columns.Add(col);
            col = new ODGridColumn("Enabled", 50, HorizontalAlignment.Center);
            gridMain.Columns.Add(col);
            gridMain.Rows.Clear();
            UI.ODGridRow row;
            for (int i = 0; i < AppointmentRules.List.Length; i++)
            {
                row = new OpenDental.UI.ODGridRow();
                row.Cells.Add(AppointmentRules.List[i].RuleDesc);
                row.Cells.Add(AppointmentRules.List[i].ADACodeStart);
                row.Cells.Add(AppointmentRules.List[i].ADACodeEnd);
                if (AppointmentRules.List[i].IsEnabled)
                {
                    row.Cells.Add("X");
                }
                else
                {
                    row.Cells.Add("");
                }
                gridMain.Rows.Add(row);
            }
            gridMain.EndUpdate();
        }
Beispiel #6
0
        private void FillRules()
        {
            TimeCardRules.RefreshCache();
            gridRules.BeginUpdate();
            gridRules.Columns.Clear();
            ODGridColumn col = new ODGridColumn("Employee", 150);

            gridRules.Columns.Add(col);
            col = new ODGridColumn("OT after x Hours", 110);
            gridRules.Columns.Add(col);
            col = new ODGridColumn("OT after x Time", 70);
            gridRules.Columns.Add(col);
            gridRules.Rows.Clear();
            UI.ODGridRow row;
            for (int i = 0; i < TimeCardRules.Listt.Count; i++)
            {
                row = new OpenDental.UI.ODGridRow();
                if (TimeCardRules.Listt[i].EmployeeNum == 0)
                {
                    row.Cells.Add(Lan.g(this, "All Employees"));
                }
                else
                {
                    Employee emp = Employees.GetEmp(TimeCardRules.Listt[i].EmployeeNum);
                    row.Cells.Add(emp.FName + " " + emp.LName);
                }
                row.Cells.Add(TimeCardRules.Listt[i].OverHoursPerDay.ToStringHmm());
                row.Cells.Add(TimeCardRules.Listt[i].AfterTimeOfDay.ToStringHmm());
                gridRules.Rows.Add(row);
            }
            gridRules.EndUpdate();
        }
        private void FillGrid()
        {
            LanList     = Lan.GetListForCat(ClassType);
            ListForType = LanguageForeigns.GetListForType(ClassType);
            LanguageForeigns.Refresh(CultureInfo.CurrentCulture);
            gridLan.BeginUpdate();
            gridLan.Columns.Clear();
            ODGridColumn column = new ODGridColumn("English", 220);

            gridLan.Columns.Add(column);
            column = new ODGridColumn(CultureInfo.CurrentCulture.DisplayName, 220);
            gridLan.Columns.Add(column);
            column = new ODGridColumn("Other " + CultureInfo.CurrentCulture.Parent.DisplayName + " Translation", 220);
            gridLan.Columns.Add(column);
            column = new ODGridColumn(CultureInfo.CurrentCulture.DisplayName + " Comments", 220);
            gridLan.Columns.Add(column);
            //gridLan.Columns[1].Heading=;
            //gridLan.Columns[2].Heading="Other "+CultureInfo.CurrentCulture.Parent.DisplayName+" Translation";
            //gridLan.Columns[3].Heading=CultureInfo.CurrentCulture.DisplayName+" Comments";
            gridLan.Rows.Clear();
            UI.ODGridRow    row;
            LanguageForeign lanForeign;
            LanguageForeign lanForeignOther;

            for (int i = 0; i < LanList.Length; i++)
            {
                row = new OpenDental.UI.ODGridRow();
                row.Cells.Add(LanList[i].English);
                lanForeign      = LanguageForeigns.GetForCulture(ListForType, LanList[i].English, CultureInfo.CurrentCulture.Name);
                lanForeignOther = LanguageForeigns.GetOther(ListForType, LanList[i].English, CultureInfo.CurrentCulture.Name);
                if (lanForeign == null)
                {
                    row.Cells.Add("");
                }
                else
                {
                    row.Cells.Add(lanForeign.Translation);
                }
                if (lanForeignOther == null)
                {
                    row.Cells.Add("");
                }
                else
                {
                    row.Cells.Add(lanForeignOther.Translation);
                }
                if (lanForeign == null)
                {
                    row.Cells.Add("");
                }
                else
                {
                    row.Cells.Add(lanForeign.Comments);
                }
                gridLan.Rows.Add(row);
            }
            gridLan.EndUpdate();
        }
 private void FillGrid()
 {
     //Currently only working for X-Charge. If more added then move this check out of FillGrid.
     #region XCharge Check
     if (prog == null)
     {
         MsgBox.Show(this, "X-Charge entry is missing from the database.");               //should never happen
         return;
     }
     if (!prog.Enabled)
     {
         if (Security.IsAuthorized(Permissions.Setup))
         {
             FormXchargeSetup FormX = new FormXchargeSetup();
             FormX.ShowDialog();
         }
         return;
     }
     if (!File.Exists(xPath))
     {
         MsgBox.Show(this, "Path is not valid.");
         if (Security.IsAuthorized(Permissions.Setup))
         {
             FormXchargeSetup FormX = new FormXchargeSetup();
             FormX.ShowDialog();
         }
         return;
     }
     #endregion
     table = CreditCards.GetRecurringChargeList();
     gridMain.BeginUpdate();
     gridMain.Columns.Clear();
     ODGridColumn col = new ODGridColumn(Lan.g("TableRecurring", "PatNum"), 110);
     gridMain.Columns.Add(col);
     col = new ODGridColumn(Lan.g("TableRecurring", "Name"), 250);
     gridMain.Columns.Add(col);
     col = new ODGridColumn(Lan.g("TableRecurring", "Total Bal"), 90, HorizontalAlignment.Right);
     gridMain.Columns.Add(col);
     col = new ODGridColumn(Lan.g("TableRecurring", "ChargeAmt"), 100, HorizontalAlignment.Right);
     gridMain.Columns.Add(col);
     gridMain.Rows.Clear();
     OpenDental.UI.ODGridRow row;
     for (int i = 0; i < table.Rows.Count; i++)
     {
         row = new OpenDental.UI.ODGridRow();
         Double famBalTotal = PIn.Double(table.Rows[i]["FamBalTotal"].ToString());
         Double chargeAmt   = PIn.Double(table.Rows[i]["ChargeAmt"].ToString());
         row.Cells.Add(table.Rows[i]["PatNum"].ToString());
         row.Cells.Add(table.Rows[i]["PatName"].ToString());
         row.Cells.Add(famBalTotal.ToString("c"));
         row.Cells.Add(chargeAmt.ToString("c"));
         gridMain.Rows.Add(row);
     }
     gridMain.EndUpdate();
     labelTotal.Text    = Lan.g(this, "Total=") + table.Rows.Count.ToString();
     labelSelected.Text = Lan.g(this, "Selected=") + gridMain.SelectedIndices.Length.ToString();
 }
Beispiel #9
0
        private void FillGrid()
        {
            if (!PrefC.HasClinicsEnabled)
            {
                if (IsSelectionMode)
                {
                    DList = Deposits.GetUnattached();
                }
                else
                {
                    DList = Deposits.Refresh();
                }
            }
            else
            {
                List <long> listSelectedClinicNums = new List <long>();
                if (!Security.CurUser.ClinicIsRestricted && comboClinic.SelectedIndices.Contains(0))                 //All is an option in comboClinic and is selected.
                //Blank by design for Deposits.GetForClinics(...).
                {
                }
                else
                {
                    int listStep = (Security.CurUser.ClinicIsRestricted?0:1);                  //If the All option is available, then all indices are offset by 1.
                    comboClinic.ListSelectedIndices.ForEach(x => listSelectedClinicNums.Add(_listClinics[x - listStep].ClinicNum));
                }
                DList = Deposits.GetForClinics(listSelectedClinicNums, IsSelectionMode);
            }
            grid.BeginUpdate();
            grid.Columns.Clear();
            ODGridColumn col = new ODGridColumn(Lan.g("TableDepositSlips", "Date"), 80);

            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableDepositSlips", "Amount"), 90, HorizontalAlignment.Right);
            grid.Columns.Add(col);
            if (PrefC.HasClinicsEnabled)
            {
                col = new ODGridColumn(Lan.g("TableDepositSlips", "Clinic"), 150);
                grid.Columns.Add(col);
            }
            grid.Rows.Clear();
            OpenDental.UI.ODGridRow row;
            for (int i = 0; i < DList.Length; i++)
            {
                row = new OpenDental.UI.ODGridRow();
                row.Cells.Add(DList[i].DateDeposit.ToShortDateString());
                row.Cells.Add(DList[i].Amount.ToString("F"));
                if (PrefC.HasClinicsEnabled)
                {
                    row.Cells.Add(" " + DList[i].ClinicAbbr);                  //padding left with space to add separation between amount and clinic abbr
                }
                grid.Rows.Add(row);
            }
            grid.EndUpdate();
            grid.ScrollToEnd();
        }
        private void FillDunning()
        {
            dunningList = Dunnings.Refresh();
            gridDun.BeginUpdate();
            gridDun.Columns.Clear();
            ODGridColumn col = new ODGridColumn("Billing Type", 100);

            gridDun.Columns.Add(col);
            col = new ODGridColumn("Aging", 70);
            gridDun.Columns.Add(col);
            col = new ODGridColumn("Ins", 40);
            gridDun.Columns.Add(col);
            col = new ODGridColumn("Message", 356);
            gridDun.Columns.Add(col);
            gridDun.Rows.Clear();
            OpenDental.UI.ODGridRow row;
            //string text;
            for (int i = 0; i < dunningList.Length; i++)
            {
                row = new OpenDental.UI.ODGridRow();
                if (dunningList[i].BillingType == 0)
                {
                    row.Cells.Add(Lan.g(this, "all"));
                }
                else
                {
                    row.Cells.Add(DefB.GetName(DefCat.BillingTypes, dunningList[i].BillingType));
                }
                if (dunningList[i].AgeAccount == 0)
                {
                    row.Cells.Add(Lan.g(this, "any"));
                }
                else
                {
                    row.Cells.Add(Lan.g(this, "Over ") + dunningList[i].AgeAccount.ToString());
                }
                if (dunningList[i].InsIsPending == YN.Unknown)
                {
                    row.Cells.Add(Lan.g(this, "any"));
                }
                else if (dunningList[i].InsIsPending == YN.Yes)
                {
                    row.Cells.Add(Lan.g(this, "Y"));
                }
                else if (dunningList[i].InsIsPending == YN.No)
                {
                    row.Cells.Add(Lan.g(this, "N"));
                }
                row.Cells.Add(dunningList[i].DunMessage);
                gridDun.Rows.Add(row);
            }
            gridDun.EndUpdate();
        }
Beispiel #11
0
        private void FillGrid()
        {
            Automations.RefreshCache();
            _listAutomations = Automations.GetDeepCopy();
            gridMain.BeginUpdate();
            gridMain.Columns.Clear();
            ODGridColumn col = new ODGridColumn("Description", 200);

            gridMain.Columns.Add(col);
            col = new ODGridColumn("Trigger", 150);
            gridMain.Columns.Add(col);
            col = new ODGridColumn("Action", 150);
            gridMain.Columns.Add(col);
            col = new ODGridColumn("Details", 200);
            gridMain.Columns.Add(col);
            gridMain.Rows.Clear();
            UI.ODGridRow row;
            string       detail;

            for (int i = 0; i < _listAutomations.Count; i++)
            {
                row = new OpenDental.UI.ODGridRow();
                row.Cells.Add(_listAutomations[i].Description);
                if (_listAutomations[i].Autotrigger == AutomationTrigger.CompleteProcedure)
                {
                    row.Cells.Add(_listAutomations[i].ProcCodes);
                }
                else
                {
                    row.Cells.Add(_listAutomations[i].Autotrigger.ToString());
                }
                row.Cells.Add(_listAutomations[i].AutoAction.ToString());
                //details:
                detail = "";
                if (_listAutomations[i].AutoAction == AutomationAction.CreateCommlog)
                {
                    detail += Defs.GetName(DefCat.CommLogTypes, _listAutomations[i].CommType)
                              + ".  " + _listAutomations[i].MessageContent;
                }
                else if (_listAutomations[i].AutoAction == AutomationAction.PrintPatientLetter)
                {
                    detail += SheetDefs.GetDescription(_listAutomations[i].SheetDefNum);
                }
                else if (_listAutomations[i].AutoAction == AutomationAction.PrintReferralLetter)
                {
                    detail += SheetDefs.GetDescription(_listAutomations[i].SheetDefNum);
                }
                row.Cells.Add(detail);
                gridMain.Rows.Add(row);
            }
            gridMain.EndUpdate();
        }
        private void AddRow(UI.ODGrid grid, ProcedureCode procCode)
        {
            UI.ODGridRow row = new UI.ODGridRow();
            row.Tag = procCode;
            row.Cells.Add(procCode.ProcCode);
            row.Cells.Add(procCode.AbbrDesc);
            row.Cells.Add(Lan.g("enumSubstitutionCondition", procCode.SubstOnlyIf.ToString()));
            row.Cells.Add(procCode.SubstitutionCode);
            ProcedureCode procCodeSubst = _listAllProcCodes.FirstOrDefault(x => x.ProcCode == procCode.SubstitutionCode);

            row.Cells.Add((procCodeSubst == null)?"":procCodeSubst.AbbrDesc);
            grid.Rows.Add(row);
        }
 private void FillGridEobs()
 {
     gridEobs.BeginUpdate();
     gridEobs.Columns.Clear();
     gridEobs.Columns.Add(new UI.ODGridColumn("", 0));
     gridEobs.Rows.Clear();
     for (int i = 0; i < _listEobTranIds.Count; i++)
     {
         UI.ODGridRow row = new UI.ODGridRow();
         row.Cells.Add(_listEobTranIds[i]);
         gridEobs.Rows.Add(row);
     }
     gridEobs.EndUpdate();
 }
        private void FillGrid()
        {
            Operatories.Refresh();
            gridMain.BeginUpdate();
            gridMain.Columns.Clear();
            ODGridColumn col = new ODGridColumn(Lan.g("TableOperatories", "Op Name"), 150);

            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableOperatories", "Abbrev"), 70);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableOperatories", "IsHidden"), 64, HorizontalAlignment.Center);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableOperatories", "Clinic"), 80);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableOperatories", "Dentist"), 70);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableOperatories", "Hygienist"), 70);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableOperatories", "IsHygiene"), 72, HorizontalAlignment.Center);
            gridMain.Columns.Add(col);
            gridMain.Rows.Clear();
            UI.ODGridRow row;
            for (int i = 0; i < Operatories.List.Length; i++)
            {
                row = new OpenDental.UI.ODGridRow();
                row.Cells.Add(Operatories.List[i].OpName);
                row.Cells.Add(Operatories.List[i].Abbrev);
                if (Operatories.List[i].IsHidden)
                {
                    row.Cells.Add("X");
                }
                else
                {
                    row.Cells.Add("");
                }
                row.Cells.Add(Clinics.GetDesc(Operatories.List[i].ClinicNum));
                row.Cells.Add(Providers.GetAbbr(Operatories.List[i].ProvDentist));
                row.Cells.Add(Providers.GetAbbr(Operatories.List[i].ProvHygienist));
                if (Operatories.List[i].IsHygiene)
                {
                    row.Cells.Add("X");
                }
                else
                {
                    row.Cells.Add("");
                }
                gridMain.Rows.Add(row);
            }
            gridMain.EndUpdate();
        }
Beispiel #15
0
		private void FillGrid() {
			//Currently only working for X-Charge. If more added then move this check out of FillGrid.
			#region XCharge Check
			if(prog==null){
				MsgBox.Show(this,"X-Charge entry is missing from the database.");//should never happen
				return;
			}
			if(!prog.Enabled) {
				if(Security.IsAuthorized(Permissions.Setup)) {
					FormXchargeSetup FormX=new FormXchargeSetup();
					FormX.ShowDialog();
				}
				return;
			}
			if(!File.Exists(xPath)) {
				MsgBox.Show(this,"Path is not valid.");
				if(Security.IsAuthorized(Permissions.Setup)){
					FormXchargeSetup FormX=new FormXchargeSetup();
					FormX.ShowDialog();
				}
				return;
			}
			#endregion
			table=CreditCards.GetRecurringChargeList();
			gridMain.BeginUpdate();
			gridMain.Columns.Clear();
			ODGridColumn col=new ODGridColumn(Lan.g("TableRecurring","PatNum"),110);
			gridMain.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableRecurring","Name"),250);
			gridMain.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableRecurring","Total Bal"),90,HorizontalAlignment.Right);
			gridMain.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableRecurring","ChargeAmt"),100,HorizontalAlignment.Right);
			gridMain.Columns.Add(col);
			gridMain.Rows.Clear();
			OpenDental.UI.ODGridRow row;
			for(int i=0;i<table.Rows.Count;i++) {
				row=new OpenDental.UI.ODGridRow();
				Double famBalTotal=PIn.Double(table.Rows[i]["FamBalTotal"].ToString());
				Double chargeAmt=PIn.Double(table.Rows[i]["ChargeAmt"].ToString());
				row.Cells.Add(table.Rows[i]["PatNum"].ToString());
				row.Cells.Add(table.Rows[i]["PatName"].ToString());
				row.Cells.Add(famBalTotal.ToString("c"));
				row.Cells.Add(chargeAmt.ToString("c"));
				gridMain.Rows.Add(row);
			}
			gridMain.EndUpdate();
			labelTotal.Text=Lan.g(this,"Total=")+table.Rows.Count.ToString();
			labelSelected.Text=Lan.g(this,"Selected=")+gridMain.SelectedIndices.Length.ToString();
		}
 private void FillGridEras()
 {
     gridEras.BeginUpdate();
     gridEras.Columns.Clear();
     gridEras.Columns.Add(new UI.ODGridColumn(Lan.g(this, "Date Received"), 0));
     gridEras.Rows.Clear();
     for (int i = 0; i < _listEtrans.Count; i++)
     {
         UI.ODGridRow row = new UI.ODGridRow();
         row.Cells.Add(_listEtrans[i].DateTimeTrans.ToShortDateString());
         gridEras.Rows.Add(row);
     }
     gridEras.EndUpdate();
 }
        private void gridClaims_CellDoubleClick(object sender, UI.ODGridClickEventArgs e)
        {
            if (!Security.IsAuthorized(Permissions.ClaimView))
            {
                return;
            }
            FormClaimEdit formCE = new FormClaimEdit((Claim)gridClaims.Rows[e.Row].Tag, Patients.GetPat(_patNum), Patients.GetFamily(_patNum));

            formCE.ShowDialog();
            Claim claim = Claims.GetClaim(((Claim)gridClaims.Rows[e.Row].Tag).ClaimNum); //This is the easiest way to determine if the claim was deleted.

            if (claim == null)                                                           //Was deleted.
            {
                gridClaims.BeginUpdate();
                gridClaims.Rows.RemoveAt(e.Row);                //This will also deselect the row.
                gridClaims.EndUpdate();
                return;
            }
            if (formCE.DialogResult == DialogResult.OK)
            {
                //Update row
                UI.ODGridRow row = new UI.ODGridRow();
                row.Tag = claim;
                row.Cells.Add(claim.DateService.ToShortDateString());                           //DOS
                row.Cells.Add(Carriers.GetName(InsPlans.RefreshOne(claim.PlanNum).CarrierNum)); //Carrier
                row.Cells.Add(Claims.GetClaimStatusString(claim.ClaimStatus));                  //Status
                if (!PrefC.GetBool(PrefName.EasyNoClinics))                                     //Using clinics
                {
                    Clinic clinic = Clinics.GetClinic(claim.ClinicNum);
                    if (clinic == null)
                    {
                        row.Cells.Add("");                        //Clinic
                    }
                    else
                    {
                        row.Cells.Add(clinic.Description);                        //Clinic
                    }
                }
                row.Cells.Add(claim.ClaimFee.ToString("f"));                //Claimfee
                gridClaims.BeginUpdate();
                gridClaims.Rows[e.Row] = row;
                gridClaims.EndUpdate();
                gridClaims.SetSelected(e.Row, true);               //Reselect Row
            }
        }
Beispiel #18
0
 private void FillGridInsPlanFiles()
 {
     gridInsPlanFiles.BeginUpdate();
     if (gridInsPlanFiles.Columns.Count == 0)
     {
         gridInsPlanFiles.Columns.Add(new UI.ODGridColumn("FileName", 300, UI.GridSortingStrategy.StringCompare));
         _colDateIndex = gridInsPlanFiles.Columns.Count;
         gridInsPlanFiles.Columns.Add(new UI.ODGridColumn("Date", 80, UI.GridSortingStrategy.StringCompare));
         _colPatCountIndex = gridInsPlanFiles.Columns.Count;
         gridInsPlanFiles.Columns.Add(new UI.ODGridColumn("PatCount", 80, UI.GridSortingStrategy.AmountParse));
         _colPlanCountIndex = gridInsPlanFiles.Columns.Count;
         gridInsPlanFiles.Columns.Add(new UI.ODGridColumn("PlanCount", 80, UI.GridSortingStrategy.AmountParse));
         _colErrorIndex = gridInsPlanFiles.Columns.Count;
         gridInsPlanFiles.Columns.Add(new UI.ODGridColumn("Errors", 0, UI.GridSortingStrategy.StringCompare));
     }
     gridInsPlanFiles.Rows.Clear();
     gridInsPlanFiles.EndUpdate();
     if (!Directory.Exists(textImportPath.Text))
     {
         return;
     }
     gridInsPlanFiles.BeginUpdate();
     _arrayImportFilePaths = Directory.GetFiles(textImportPath.Text);
     for (int i = 0; i < _arrayImportFilePaths.Length; i++)
     {
         UI.ODGridRow row = new UI.ODGridRow();
         gridInsPlanFiles.Rows.Add(row);
         string filePath = _arrayImportFilePaths[i];
         row.Tag = filePath;
         string fileName = Path.GetFileName(filePath);
         row.Cells.Add(fileName);          //FileName
         row.Cells.Add("");                //Date - This value will be filled in when WorkerParse834() runs below.
         row.Cells.Add("");                //PatCount - This value will be filled in when WorkerParse834() runs below.
         row.Cells.Add("");                //PlanCount - This value will be filled in when WorkerParse834() runs below.
         row.Cells.Add("Loading file..."); //Errors - This value will be filled in when WorkerParse834() runs below.
     }
     gridInsPlanFiles.EndUpdate();
     Application.DoEvents();
     if (_odThread != null)
     {
         _odThread.QuitSync(0);
     }
     _odThread = new ODThread(WorkerParse834);
     _odThread.Start();
 }
Beispiel #19
0
 private void butEnable_Click(object sender, EventArgs e)
 {
     if (gridProviders.SelectedIndices.Length == 0)
     {
         MsgBox.Show(this, "At least one provider must be selected.");
         return;
     }
     gridProviders.BeginUpdate();
     for (int i = 0; i < gridProviders.SelectedIndices.Length; i++)
     {
         int          index = gridProviders.SelectedIndices[i];
         UI.ODGridRow row   = gridProviders.Rows[index];
         row.Cells[1].Text = "X";
         ProviderErx provErx = (ProviderErx)row.Tag;
         provErx.IsEnabled = ErxStatus.Enabled;
     }
     gridProviders.EndUpdate();
 }
 private void FillOfficeInfoGrid(BugSubmission sub)
 {
     gridOfficeInfo.BeginUpdate();
     if (gridOfficeInfo.Columns.Count == 0)
     {
         gridOfficeInfo.Columns.Add(new ODGridColumn("Field", 130));
         gridOfficeInfo.Columns.Add(new ODGridColumn("Value", 125));
     }
     gridOfficeInfo.Rows.Clear();
     if (sub != null)
     {
         gridOfficeInfo.Rows.Add(new ODGridRow("Preferences", "")
         {
             ColorBackG = gridOfficeInfo.HeaderColor, Bold = true, Tag = true
         });
         List <PrefName> listPrefNames = sub.Info.DictPrefValues.Keys.ToList();
         foreach (PrefName prefName in listPrefNames)
         {
             ODGridRow row = new ODGridRow();
             row.Cells.Add(prefName.ToString());
             row.Cells.Add(sub.Info.DictPrefValues[prefName]);
             gridOfficeInfo.Rows.Add(row);
         }
         gridOfficeInfo.Rows.Add(new ODGridRow("Other", "")
         {
             ColorBackG = gridOfficeInfo.HeaderColor, Bold = true, Tag = true
         });
         gridOfficeInfo.Rows.Add(new ODGridRow("CountClinics", sub.Info.CountClinics.ToString()));
         gridOfficeInfo.Rows.Add(new ODGridRow("EnabledPlugins", string.Join(",", sub.Info.EnabledPlugins?.Select(x => x).ToList() ?? new List <string>())));
         gridOfficeInfo.Rows.Add(new ODGridRow("ClinicNumCur", sub.Info.ClinicNumCur.ToString()));
         gridOfficeInfo.Rows.Add(new ODGridRow("UserNumCur", sub.Info.UserNumCur.ToString()));
         gridOfficeInfo.Rows.Add(new ODGridRow("PatientNumCur", sub.Info.PatientNumCur.ToString()));
         gridOfficeInfo.Rows.Add(new ODGridRow("ModuleNameCur", sub.Info.ModuleNameCur?.ToString()));
         gridOfficeInfo.Rows.Add(new ODGridRow("IsOfficeOnReplication", sub.Info.IsOfficeOnReplication.ToString()));
         gridOfficeInfo.Rows.Add(new ODGridRow("IsOfficeUsingMiddleTier", sub.Info.IsOfficeUsingMiddleTier.ToString()));
         gridOfficeInfo.Rows.Add(new ODGridRow("WindowsVersion", sub.Info.WindowsVersion?.ToString()));
         gridOfficeInfo.Rows.Add(new ODGridRow("CompName", sub.Info.CompName?.ToString()));
         gridOfficeInfo.Rows.Add(new ODGridRow("PreviousUpdateVersion", sub.Info.PreviousUpdateVersion));
         gridOfficeInfo.Rows.Add(new ODGridRow("PreviousUpdateTime", sub.Info.PreviousUpdateTime.ToString()));
         gridOfficeInfo.Rows.Add(new ODGridRow("ThreadName", sub.Info.ThreadName?.ToString()));
         gridOfficeInfo.Rows.Add(new ODGridRow("DatabaseName", sub.Info.DatabaseName?.ToString()));
     }
     gridOfficeInfo.EndUpdate();
 }
 private void FillObservations()
 {
     gridObservations.BeginUpdate();
     gridObservations.Columns.Clear();
     gridObservations.Columns.Add(new UI.ODGridColumn("Question", 150));
     gridObservations.Columns.Add(new UI.ODGridColumn("Value", 0));
     gridObservations.EndUpdate();
     gridObservations.BeginUpdate();
     gridObservations.Rows.Clear();
     for (int i = 0; i < _listVaccineObservations.Count; i++)
     {
         VaccineObs   vaccineObs = _listVaccineObservations[i];
         UI.ODGridRow row        = new UI.ODGridRow();
         row.Tag = vaccineObs;
         row.Cells.Add(new UI.ODGridCell(vaccineObs.IdentifyingCode.ToString()));
         row.Cells.Add(new UI.ODGridCell(vaccineObs.ValReported));
         gridObservations.Rows.Add(row);
     }
     if (_listVaccineObservationGroups == null)
     {
         _listVaccineObservationGroups = new List <VaccineObs>();
         for (int i = 0; i < _listVaccineObservations.Count; i++)
         {
             VaccineObs vaccineObs = _listVaccineObservations[i];
             if (vaccineObs.VaccineObsNumGroup == 0 || vaccineObs.VaccineObsNumGroup == vaccineObs.VaccineObsNum)
             {
                 _listVaccineObservationGroups.Add(vaccineObs);
             }
             else
             {
                 for (int j = 0; j < _listVaccineObservations.Count; j++)
                 {
                     if (j != i && _listVaccineObservations[j].VaccineObsNum == _listVaccineObservations[i].VaccineObsNumGroup)
                     {
                         _listVaccineObservationGroups.Add(_listVaccineObservations[j]);
                         break;
                     }
                 }
             }
         }
     }
     gridObservations.EndUpdate();
 }
Beispiel #22
0
        private void FillGrid()
        {
            List <object> listSelectedTags = new List <object>();         //This list is used to maintain previous selections.

            foreach (int index in gridMain.SelectedIndices)
            {
                listSelectedTags.Add(gridMain.Rows[index].Tag);
            }
            gridMain.BeginUpdate();
            gridMain.Rows.Clear();            //Clears the selections also.
            gridMain.Columns.Clear();
            ODGridColumn col = new ODGridColumn();

            gridMain.Columns.Add(col);
            ODGridRow row;

            for (int i = 0; i < _listItems.Count; i++)
            {
                row     = new ODGridRow();
                row.Tag = _listItems[i];
                row.Cells.Add(_listItems[i].ToString());
                gridMain.Rows.Add(row);
            }
            gridMain.EndUpdate();
            for (int i = 0; i < gridMain.Rows.Count; i++)
            {
                if (listSelectedTags.Contains(gridMain.Rows[i].Tag))
                {
                    gridMain.SetSelected(i, true);
                }
            }
            int heightTotal = 0;

            for (int i = 0; i < gridMain.Rows.Count; i++)
            {
                heightTotal += gridMain.Rows[i].RowHeight;
            }
            gridMain.Height = heightTotal + 3;        //1 (for upper grid border) +1 (for lower grid border) +1 (for toolbar magic space at top) = 3
            if (gridMain.Height > _maxDropDownHeight)
            {
                gridMain.Height = _maxDropDownHeight;
            }
        }
        private void FillGridTabNames()
        {
            gridTabNames.BeginUpdate();
            gridTabNames.Rows.Clear();
            gridTabNames.Columns.Clear();
            int isHiddenWidth = 100;
            int tabNameWidth  = gridTabNames.Width - 10 - isHiddenWidth;     //10 for scrollbar.

            gridTabNames.Columns.Add(new UI.ODGridColumn("Tab Name", tabNameWidth, HorizontalAlignment.Left));
            gridTabNames.Columns.Add(new UI.ODGridColumn("Is Hidden", isHiddenWidth, HorizontalAlignment.Center));
            foreach (OrthoChartTab orthoChartTab in _listNewOrthoChartTabs)
            {
                UI.ODGridRow row = new UI.ODGridRow();
                row.Tag = orthoChartTab;
                row.Cells.Add(orthoChartTab.TabName);
                row.Cells.Add(orthoChartTab.IsHidden?"X":"");
                gridTabNames.Rows.Add(row);
            }
            gridTabNames.EndUpdate();
        }
Beispiel #24
0
        ///<summary>Does not refresh the cached list.  Make sure any updates to _listPayPeriods are done before calling this method.</summary>
        private void FillGrid()
        {
            PayPeriods.RefreshCache();
            _listPayPeriods = PayPeriods.GetDeepCopy().OrderBy(x => x.DateStart).ToList();
            gridMain.BeginUpdate();
            gridMain.Columns.Clear();
            ODGridColumn col = new ODGridColumn("Start Date", 80);

            gridMain.Columns.Add(col);
            col = new ODGridColumn("End Date", 80);
            gridMain.Columns.Add(col);
            col = new ODGridColumn("Paycheck Date", 100);
            gridMain.Columns.Add(col);
            gridMain.Rows.Clear();
            UI.ODGridRow row;
            foreach (PayPeriod payPeriodCur in _listPayPeriods)
            {
                if (checkHideOlder.Checked && payPeriodCur.DateStart < DateTimeOD.Today.AddMonths(-6))
                {
                    continue;
                }
                row = new OpenDental.UI.ODGridRow();
                row.Cells.Add(payPeriodCur.DateStart.ToShortDateString());
                row.Cells.Add(payPeriodCur.DateStop.ToShortDateString());
                if (payPeriodCur.DatePaycheck.Year < 1880)
                {
                    row.Cells.Add("");
                }
                else
                {
                    row.Cells.Add(payPeriodCur.DatePaycheck.ToShortDateString());
                }
                row.Tag = payPeriodCur;
                if (payPeriodCur.DateStart <= DateTimeOD.Today && payPeriodCur.DateStop >= DateTimeOD.Today)
                {
                    row.ColorBackG = Color.LightCyan;
                }
                gridMain.Rows.Add(row);
            }
            gridMain.EndUpdate();
        }
Beispiel #25
0
        private void FillGrid()
        {
            RList = Reconciles.GetList(AccountNum);
            grid.BeginUpdate();
            grid.Columns.Clear();
            ODGridColumn col = new ODGridColumn(Lan.g("TableReconciles", "Date"), 80);

            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableReconciles", "Ending Bal"), 100, HorizontalAlignment.Right);
            grid.Columns.Add(col);
            grid.Rows.Clear();
            OpenDental.UI.ODGridRow row;
            for (int i = 0; i < RList.Length; i++)
            {
                row = new OpenDental.UI.ODGridRow();
                row.Cells.Add(RList[i].DateReconcile.ToShortDateString());
                row.Cells.Add(RList[i].EndingBal.ToString("F"));
                grid.Rows.Add(row);
            }
            grid.EndUpdate();
        }
Beispiel #26
0
 private void butNotIdpd_Click(object sender, EventArgs e)
 {
     if (gridProviders.SelectedIndices.Length == 0)
     {
         MsgBox.Show(this, "At least one provider must be selected.");
         return;
     }
     if (!MsgBox.Show(this, true, "Only use this button if the selected providers were set to IDP'd accidentally.  Continue?"))
     {
         return;
     }
     gridProviders.BeginUpdate();
     for (int i = 0; i < gridProviders.SelectedIndices.Length; i++)
     {
         int          index = gridProviders.SelectedIndices[i];
         UI.ODGridRow row   = gridProviders.Rows[index];
         row.Cells[2].Text = "";
         ProviderErx provErx = (ProviderErx)row.Tag;
         provErx.IsIdentifyProofed = false;
     }
     gridProviders.EndUpdate();
 }
Beispiel #27
0
 private void butDisable_Click(object sender, EventArgs e)
 {
     if (gridProviders.SelectedIndices.Length == 0)
     {
         MsgBox.Show(this, "At least one provider must be selected.");
         return;
     }
     if (!MsgBox.Show(this, true, "Only use this button if the selected providers were Enabled accidentally or if the provider has canceled eRx.  "
                      + "Continue?"))
     {
         return;
     }
     gridProviders.BeginUpdate();
     for (int i = 0; i < gridProviders.SelectedIndices.Length; i++)
     {
         int          index = gridProviders.SelectedIndices[i];
         UI.ODGridRow row   = gridProviders.Rows[index];
         row.Cells[1].Text = "";
         ProviderErx provErx = (ProviderErx)row.Tag;
         provErx.IsEnabled = ErxStatus.Disabled;
     }
     gridProviders.EndUpdate();
 }
 public void FillAttachments()
 {
     _listEmailAttachDisplayed = new List <EmailAttach>();
     if (!_isComposing)
     {
         SetSig(null);
     }
     gridAttachments.BeginUpdate();
     gridAttachments.Rows.Clear();
     gridAttachments.Columns.Clear();
     gridAttachments.Columns.Add(new OpenDental.UI.ODGridColumn("", 0));           //No name column, since there is only one column.
     for (int i = 0; i < _emailMessage.Attachments.Count; i++)
     {
         if (_emailMessage.Attachments[i].DisplayedFileName.ToLower() == "smime.p7s")
         {
             if (!_isComposing)
             {
                 string smimeP7sFilePath = FileAtoZ.CombinePaths(EmailAttaches.GetAttachPath(), _emailMessage.Attachments[i].ActualFileName);
                 string localFile        = PrefC.GetRandomTempFile(".p7s");
                 FileAtoZ.Copy(smimeP7sFilePath, localFile, FileAtoZSourceDestination.AtoZToLocal, doOverwrite: true);
                 SetSig(EmailMessages.GetEmailSignatureFromSmimeP7sFile(localFile));
             }
             //Do not display email signatures in the attachment list, because "smime.p7s" has no meaning to a user
             //Also, Windows will install the smime.p7s into an useless place in the Windows certificate store.
             continue;
         }
         OpenDental.UI.ODGridRow row = new UI.ODGridRow();
         row.Cells.Add(_emailMessage.Attachments[i].DisplayedFileName);
         gridAttachments.Rows.Add(row);
         _listEmailAttachDisplayed.Add(_emailMessage.Attachments[i]);
     }
     gridAttachments.EndUpdate();
     if (gridAttachments.Rows.Count > 0)
     {
         gridAttachments.SetSelected(0, true);
     }
 }
Beispiel #29
0
        private void FillTable()
        {
            gridBill.BeginUpdate();
            gridBill.Columns.Clear();
            ODGridColumn col = new ODGridColumn(Lan.g("TableBilling", "Name"), 180);

            gridBill.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableBilling", "Total"), 100, HorizontalAlignment.Right);
            gridBill.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableBilling", "-InsuranceEst"), 100, HorizontalAlignment.Right);
            gridBill.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableBilling", "=Amount"), 100, HorizontalAlignment.Right);
            gridBill.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableBilling", "LastStatement"), 111);
            gridBill.Columns.Add(col);
            gridBill.Rows.Clear();
            OpenDental.UI.ODGridRow row;
            for (int i = 0; i < AgingList.Length; i++)
            {
                row = new OpenDental.UI.ODGridRow();
                row.Cells.Add(AgingList[i].PatName);
                row.Cells.Add(AgingList[i].BalTotal.ToString("F"));
                row.Cells.Add(AgingList[i].InsEst.ToString("F"));
                row.Cells.Add(AgingList[i].AmountDue.ToString("F"));
                if (AgingList[i].DateLastStatement.Year < 1880)
                {
                    row.Cells.Add("");
                }
                else
                {
                    row.Cells.Add(AgingList[i].DateLastStatement.ToShortDateString());
                }
                gridBill.Rows.Add(row);
            }
            gridBill.EndUpdate();
        }
Beispiel #30
0
		//private void butClear_Click(object sender, System.EventArgs e) {
			//textMessage.Clear();
			//textMessage.Select();
		//}

		private void FillEmps(){
			gridEmp.BeginUpdate();
			gridEmp.Columns.Clear();
			ODGridColumn col=new ODGridColumn(Lan.g("TableEmpClock","Employee"),180);
			gridEmp.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableEmpClock","Status"),104);
			gridEmp.Columns.Add(col);
			gridEmp.Rows.Clear();
			UI.ODGridRow row;
			_listEmployees=Employees.GetEmpsForClinic(FormOpenDental.ClinicNum);
			for(int i=0;i<_listEmployees.Count;i++) {
				row=new OpenDental.UI.ODGridRow();
				row.Cells.Add(Employees.GetNameFL(_listEmployees[i]));
				row.Cells.Add(_listEmployees[i].ClockStatus);
				gridEmp.Rows.Add(row);
			}
			gridEmp.EndUpdate();
			listStatus.Items.Clear();
			for(int i=0;i<Enum.GetNames(typeof(TimeClockStatus)).Length;i++){
				listStatus.Items.Add(Lan.g("enumTimeClockStatus",Enum.GetNames(typeof(TimeClockStatus))[i]));
			}
			for(int i=0;i<_listEmployees.Count;i++) {
				if(_listEmployees[i].EmployeeNum==Security.CurUser.EmployeeNum) {
					SelectEmpI(i);
					return;
				}
			}
			SelectEmpI(-1);
		}
		//private void listProv_Click(object sender,EventArgs e) {
		//	FillGrid();
		//}

		private void FillGrid(){
			//int provNum=0;
			//if(comboProv.SelectedIndex!=0) {
			//	provNum=ProviderC.List[comboProv.SelectedIndex-1].ProvNum;
			//}
			if(IsSelectionMode){
				DList=Deposits.GetUnattached();
			}
			else{
				DList=Deposits.Refresh();
			}
			grid.BeginUpdate();
			grid.Columns.Clear();
			ODGridColumn col=new ODGridColumn(Lan.g("TableDepositSlips","Date"),80);
			grid.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableDepositSlips","Amount"),90);
			grid.Columns.Add(col);
			grid.Rows.Clear();
			OpenDental.UI.ODGridRow row;
			for(int i=0;i<DList.Length;i++){
				row=new OpenDental.UI.ODGridRow();
				row.Cells.Add(DList[i].DateDeposit.ToShortDateString());
				row.Cells.Add(DList[i].Amount.ToString("F"));
				grid.Rows.Add(row);
			}
			grid.EndUpdate();
			grid.ScrollToEnd();
		}
Beispiel #32
0
 private void FillGrid()
 {
     RList=Reconciles.GetList(AccountNum);
     grid.BeginUpdate();
     grid.Columns.Clear();
     ODGridColumn col=new ODGridColumn(Lan.g("TableReconciles","Date"),80);
     grid.Columns.Add(col);
     col=new ODGridColumn(Lan.g("TableReconciles","Ending Bal"),100,HorizontalAlignment.Right);
     grid.Columns.Add(col);
     grid.Rows.Clear();
     OpenDental.UI.ODGridRow row;
     for(int i=0;i<RList.Length;i++){
         row=new OpenDental.UI.ODGridRow();
         row.Cells.Add(RList[i].DateReconcile.ToShortDateString());
         row.Cells.Add(RList[i].EndingBal.ToString("F"));
         grid.Rows.Add(row);
     }
     grid.EndUpdate();
     grid.ScrollToEnd();
 }
Beispiel #33
0
		///<summary></summary>
		private void FillGrids(){
			if(IsNew){
				DateTime dateStart=PIn.Date(textDateStart.Text);
				long clinicNum=0;
				if(comboClinic.SelectedIndex!=0){
					clinicNum=Clinics.List[comboClinic.SelectedIndex-1].ClinicNum;
				}
				List<long> payTypes=new List<long>();//[listPayType.SelectedIndices.Count];
				for(int i=0;i<listPayType.SelectedIndices.Count;i++) {
					payTypes.Add(DefC.Short[(int)DefCat.PaymentTypes][listPayType.SelectedIndices[i]].DefNum);
				}
				List<long> insPayTypes=new List<long>();
				for(int i=0;i<listInsPayType.SelectedIndices.Count;i++) {
					insPayTypes.Add(_insPayDefNums[listInsPayType.SelectedIndices[i]]);
				}
				PatPayList=new List<Payment>();
				if(payTypes.Count!=0) {
					PatPayList=Payments.GetForDeposit(dateStart,clinicNum,payTypes);
				}
				ClaimPayList=new ClaimPayment[0];
				if(insPayTypes.Count!=0) {
					ClaimPayList=ClaimPayments.GetForDeposit(dateStart,clinicNum,insPayTypes);
				}
			}
			else{
				PatPayList=Payments.GetForDeposit(DepositCur.DepositNum);
				ClaimPayList=ClaimPayments.GetForDeposit(DepositCur.DepositNum);
			}
			//Fill Patient Payment Grid---------------------------------------
			List<long> patNums=new List<long>();
			for(int i=0;i<PatPayList.Count;i++){
				patNums.Add(PatPayList[i].PatNum);
			}
			Patient[] pats=Patients.GetMultPats(patNums);
			gridPat.BeginUpdate();
			gridPat.Columns.Clear();
			ODGridColumn col=new ODGridColumn(Lan.g("TableDepositSlipPat","Date"),80);
			gridPat.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableDepositSlipPat","Patient"),150);
			gridPat.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableDepositSlipPat","Type"),70);
			gridPat.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableDepositSlipPat","Check Number"),95);
			gridPat.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableDepositSlipPat","Bank-Branch"),80);
			gridPat.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableDepositSlipPat","Amount"),80);
			gridPat.Columns.Add(col);
			gridPat.Rows.Clear();
			OpenDental.UI.ODGridRow row;
			for(int i=0;i<PatPayList.Count;i++){
				row=new OpenDental.UI.ODGridRow();
				row.Cells.Add(PatPayList[i].PayDate.ToShortDateString());
				row.Cells.Add(Patients.GetOnePat(pats,PatPayList[i].PatNum).GetNameLF());
				row.Cells.Add(DefC.GetName(DefCat.PaymentTypes,PatPayList[i].PayType));
				row.Cells.Add(PatPayList[i].CheckNum);
				row.Cells.Add(PatPayList[i].BankBranch);
				row.Cells.Add(PatPayList[i].PayAmt.ToString("F"));
				gridPat.Rows.Add(row);
			}
			gridPat.EndUpdate();
			//Fill Insurance Payment Grid-------------------------------------
			gridIns.BeginUpdate();
			gridIns.Columns.Clear();
			col=new ODGridColumn(Lan.g("TableDepositSlipIns","Date"),80);
			gridIns.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableDepositSlipIns","Carrier"),150);
			gridIns.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableDepositSlipIns","Type"),70);
			gridIns.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableDepositSlipIns","Check Number"),95);
			gridIns.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableDepositSlipIns","Bank-Branch"),80);
			gridIns.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableDepositSlipIns","Amount"),90);
			gridIns.Columns.Add(col);
			gridIns.Rows.Clear();
			for(int i=0;i<ClaimPayList.Length;i++){
				row=new OpenDental.UI.ODGridRow();
				row.Cells.Add(ClaimPayList[i].CheckDate.ToShortDateString());
				row.Cells.Add(ClaimPayList[i].CarrierName);
				row.Cells.Add(DefC.GetName(DefCat.InsurancePaymentType,ClaimPayList[i].PayType));
				row.Cells.Add(ClaimPayList[i].CheckNum);
				row.Cells.Add(ClaimPayList[i].BankBranch);
				row.Cells.Add(ClaimPayList[i].CheckAmt.ToString("F"));
				gridIns.Rows.Add(row);
			}
			gridIns.EndUpdate();
		}
Beispiel #34
0
		private void FillDunning(){
			dunningList=Dunnings.Refresh();
			gridDun.BeginUpdate();
			gridDun.Columns.Clear();
			ODGridColumn col=new ODGridColumn("Billing Type",80);
			gridDun.Columns.Add(col);
			col=new ODGridColumn("Aging",70);
			gridDun.Columns.Add(col);
			col=new ODGridColumn("Ins",40);
			gridDun.Columns.Add(col);
			col=new ODGridColumn("Message",150);
			gridDun.Columns.Add(col);
			col=new ODGridColumn("Bold Message",150);
			gridDun.Columns.Add(col);
			col=new ODGridColumn("Email",30, HorizontalAlignment.Center);
			gridDun.Columns.Add(col);
			gridDun.Rows.Clear();
			OpenDental.UI.ODGridRow row;
			//string text;
			OpenDental.UI.ODGridCell cell;
			for(int i=0;i<dunningList.Length;i++){
				row=new OpenDental.UI.ODGridRow();
				if(dunningList[i].BillingType==0){
					row.Cells.Add(Lan.g(this,"all"));
				}
				else{
					row.Cells.Add(DefC.GetName(DefCat.BillingTypes,dunningList[i].BillingType));
				}
				if(dunningList[i].AgeAccount==0){
					row.Cells.Add(Lan.g(this,"any"));
				}
				else{
					row.Cells.Add(Lan.g(this,"Over ")+dunningList[i].AgeAccount.ToString());
				}
				if(dunningList[i].InsIsPending==YN.Unknown){
					row.Cells.Add(Lan.g(this,"any"));
				}
				else if(dunningList[i].InsIsPending==YN.Yes){
					row.Cells.Add(Lan.g(this,"Y"));
				}
				else if(dunningList[i].InsIsPending==YN.No){
					row.Cells.Add(Lan.g(this,"N"));
				}
				row.Cells.Add(dunningList[i].DunMessage);
				cell=new ODGridCell(dunningList[i].MessageBold);
				cell.Bold=YN.Yes;
				cell.ColorText=Color.DarkRed;
				row.Cells.Add(cell);
				if(dunningList[i].EmailBody!="" || dunningList[i].EmailSubject!="") {
					row.Cells.Add("X");
				}
				else {
					row.Cells.Add("");
				}
				gridDun.Rows.Add(row);
			}
			gridDun.EndUpdate();
		}
Beispiel #35
0
		private void FillGrid(){
			AppointmentRules.RefreshCache();
			gridMain.BeginUpdate();
			gridMain.Columns.Clear();
			ODGridColumn col=new ODGridColumn("Description",200);
			gridMain.Columns.Add(col);
			col=new ODGridColumn("Start Code",100);
			gridMain.Columns.Add(col);
			col=new ODGridColumn("End Code",100);
			gridMain.Columns.Add(col);
			col=new ODGridColumn("Enabled",50,HorizontalAlignment.Center);
			gridMain.Columns.Add(col);
			gridMain.Rows.Clear();
			UI.ODGridRow row;
			for(int i=0;i<AppointmentRuleC.List.Length;i++){
				row=new OpenDental.UI.ODGridRow();
				row.Cells.Add(AppointmentRuleC.List[i].RuleDesc);
				row.Cells.Add(AppointmentRuleC.List[i].CodeStart);
				row.Cells.Add(AppointmentRuleC.List[i].CodeEnd);
				if(AppointmentRuleC.List[i].IsEnabled){
					row.Cells.Add("X");
				}
				else{
					row.Cells.Add("");
				}
				gridMain.Rows.Add(row);
			}
			gridMain.EndUpdate();
		}
Beispiel #36
0
		private void FillGrid(){
			LanList=Lans.GetListForCat(ClassType);
			ListForType=LanguageForeigns.GetListForType(ClassType);
			LanguageForeigns.Refresh(CultureInfo.CurrentCulture.Name,CultureInfo.CurrentCulture.TwoLetterISOLanguageName);
			gridLan.BeginUpdate();
			gridLan.Columns.Clear();
			ODGridColumn column=new ODGridColumn("English",220);
			gridLan.Columns.Add(column);
			column=new ODGridColumn(CultureInfo.CurrentCulture.DisplayName,220);
			gridLan.Columns.Add(column);
			column=new ODGridColumn("Other "+CultureInfo.CurrentCulture.Parent.DisplayName+" Translation",220);
			gridLan.Columns.Add(column);
			column=new ODGridColumn(CultureInfo.CurrentCulture.DisplayName+" Comments",220);
			gridLan.Columns.Add(column);
			//gridLan.Columns[1].Heading=;
			//gridLan.Columns[2].Heading="Other "+CultureInfo.CurrentCulture.Parent.DisplayName+" Translation";
			//gridLan.Columns[3].Heading=CultureInfo.CurrentCulture.DisplayName+" Comments";
			gridLan.Rows.Clear();
			UI.ODGridRow row;
			LanguageForeign lanForeign;
			LanguageForeign lanForeignOther;
			for(int i=0;i<LanList.Length;i++){
				row=new OpenDental.UI.ODGridRow();
				row.Cells.Add(LanList[i].English);
				lanForeign=LanguageForeigns.GetForCulture(ListForType,LanList[i].English,CultureInfo.CurrentCulture.Name);
				lanForeignOther=LanguageForeigns.GetOther(ListForType,LanList[i].English,CultureInfo.CurrentCulture.Name);
				if(lanForeign==null){
					row.Cells.Add("");
				}
				else{
					row.Cells.Add(lanForeign.Translation);
				}
				if(lanForeignOther==null){
					row.Cells.Add("");
				}
				else{
					row.Cells.Add(lanForeignOther.Translation);
				}
				if(lanForeign==null){
					row.Cells.Add("");
				}
				else{
					row.Cells.Add(lanForeign.Comments);
				}
				gridLan.Rows.Add(row);
			}
			gridLan.EndUpdate();
		}
Beispiel #37
0
		private void FillEmps(){
			gridEmp.BeginUpdate();
			gridEmp.Columns.Clear();
			ODGridColumn col;
			col=new ODGridColumn(Lan.g("TableEmpClock","Ext"),25);
			gridEmp.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableEmpClock","Employee"),60);
			gridEmp.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableEmpClock","Status"),80);
			gridEmp.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableEmpClock","Phone"),50);
			gridEmp.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableEmpClock","InOut"),35);
			gridEmp.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableEmpClock","Customer"),90);
			gridEmp.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableEmpClock","Time"),70);
			gridEmp.Columns.Add(col);
			gridEmp.Rows.Clear();
			UI.ODGridRow row;
			PhoneList=Phones.GetPhoneList();
			DateTime dateTimeStart;
			TimeSpan span;
			DateTime timeOfDay;//because TimeSpan does not have good formatting.
			for(int i=0;i<PhoneList.Count;i++){
				row=new OpenDental.UI.ODGridRow();
				row.Cells.Add(PhoneList[i].Extension.ToString());
				row.Cells.Add(PhoneList[i].EmployeeName);
				if(PhoneList[i].ClockStatus==ClockStatusEnum.None){
					row.Cells.Add("");
				}
				else{
					row.Cells.Add(PhoneList[i].ClockStatus.ToString());
				}
				row.Cells.Add(PhoneList[i].Description);
				row.Cells.Add(PhoneList[i].InOrOut);
				row.Cells.Add(PhoneList[i].CustomerNumber);
				dateTimeStart=PhoneList[i].DateTimeStart;
				if(dateTimeStart.Date==DateTime.Today){
					span=DateTime.Now-dateTimeStart+timeDelta;
					timeOfDay=DateTime.Today+span;
					row.Cells.Add(timeOfDay.ToString("H:mm:ss"));
				}
				else{
					row.Cells.Add("");
				}
				row.ColorBackG=PhoneList[i].ColorBar;
				row.ColorText=PhoneList[i].ColorText;
				gridEmp.Rows.Add(row);
			}
			gridEmp.EndUpdate();
			gridEmp.SetSelected(false);
		}
Beispiel #38
0
		private void FillGrid(){
			gridMain.BeginUpdate();
			gridMain.Columns.Clear();
			ODGridColumn col=new ODGridColumn(Lan.g("TableOperatories","Op Name"),150);
			gridMain.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableOperatories","Abbrev"),70);
			gridMain.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableOperatories","IsHidden"),64,HorizontalAlignment.Center);
			gridMain.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableOperatories","Clinic"),80);
			gridMain.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableOperatories","Dentist"),70);
			gridMain.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableOperatories","Hygienist"),70);
			gridMain.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableOperatories","IsHygiene"),72,HorizontalAlignment.Center);
			gridMain.Columns.Add(col);
			gridMain.Rows.Clear();
			UI.ODGridRow row;
			for(int i=0;i<_listOps.Count;i++){
				row=new OpenDental.UI.ODGridRow();
				row.Cells.Add(_listOps[i].OpName);
				row.Cells.Add(_listOps[i].Abbrev);
				if(_listOps[i].IsHidden){
					row.Cells.Add("X");
				}
				else{
					row.Cells.Add("");
				}
				row.Cells.Add(Clinics.GetDesc(_listOps[i].ClinicNum));
				row.Cells.Add(Providers.GetAbbr(_listOps[i].ProvDentist));
				row.Cells.Add(Providers.GetAbbr(_listOps[i].ProvHygienist));
				if(_listOps[i].IsHygiene){
					row.Cells.Add("X");
				}
				else{
					row.Cells.Add("");
				}
				gridMain.Rows.Add(row);
			}
			gridMain.EndUpdate();
		}
Beispiel #39
0
        private void FillEmps()
        {
            gridEmp.BeginUpdate();
            gridEmp.Columns.Clear();
            ODGridColumn col;

            col = new ODGridColumn(Lan.g("TableEmpClock", "Ext"), 25);
            gridEmp.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableEmpClock", "Employee"), 60);
            gridEmp.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableEmpClock", "Status"), 80);
            gridEmp.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableEmpClock", "Phone"), 50);
            gridEmp.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableEmpClock", "InOut"), 35);
            gridEmp.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableEmpClock", "Customer"), 90);
            gridEmp.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableEmpClock", "Time"), 70);
            gridEmp.Columns.Add(col);
            gridEmp.Rows.Clear();
            UI.ODGridRow row;
            PhoneList = Phones.GetPhoneList();
            DateTime dateTimeStart;
            TimeSpan span;
            DateTime timeOfDay;            //because TimeSpan does not have good formatting.

            for (int i = 0; i < PhoneList.Count; i++)
            {
                row = new OpenDental.UI.ODGridRow();
                row.Cells.Add(PhoneList[i].Extension.ToString());
                row.Cells.Add(PhoneList[i].EmployeeName);
                if (PhoneList[i].ClockStatus == ClockStatusEnum.None)
                {
                    row.Cells.Add("");
                }
                else
                {
                    row.Cells.Add(PhoneList[i].ClockStatus.ToString());
                }
                row.Cells.Add(PhoneList[i].Description);
                row.Cells.Add(PhoneList[i].InOrOut);
                row.Cells.Add(PhoneList[i].CustomerNumber);
                dateTimeStart = PhoneList[i].DateTimeStart;
                if (dateTimeStart.Date == DateTime.Today)
                {
                    span      = DateTime.Now - dateTimeStart + timeDelta;
                    timeOfDay = DateTime.Today + span;
                    row.Cells.Add(timeOfDay.ToString("H:mm:ss"));
                }
                else
                {
                    row.Cells.Add("");
                }
                row.ColorBackG = PhoneList[i].ColorBar;
                row.ColorText  = PhoneList[i].ColorText;
                gridEmp.Rows.Add(row);
            }
            gridEmp.EndUpdate();
            gridEmp.SetSelected(false);
        }
Beispiel #40
0
 private void FillRules()
 {
     TimeCardRules.RefreshCache();
     gridRules.BeginUpdate();
     gridRules.Columns.Clear();
     ODGridColumn col=new ODGridColumn("Employee",150);
     gridRules.Columns.Add(col);
     col=new ODGridColumn("OT after x Hours",110);
     gridRules.Columns.Add(col);
     col=new ODGridColumn("OT after x Time",70);
     gridRules.Columns.Add(col);
     gridRules.Rows.Clear();
     UI.ODGridRow row;
     for(int i=0;i<TimeCardRules.Listt.Count;i++){
         row=new OpenDental.UI.ODGridRow();
         if(TimeCardRules.Listt[i].EmployeeNum==0){
             row.Cells.Add(Lan.g(this,"All Employees"));
         }
         else{
             Employee emp=Employees.GetEmp(TimeCardRules.Listt[i].EmployeeNum);
             row.Cells.Add(emp.FName+" "+emp.LName);
         }
         row.Cells.Add(TimeCardRules.Listt[i].OverHoursPerDay.ToStringHmm());
         row.Cells.Add(TimeCardRules.Listt[i].AfterTimeOfDay.ToStringHmm());
         gridRules.Rows.Add(row);
     }
     gridRules.EndUpdate();
 }
Beispiel #41
0
 private void FillGrid()
 {
     PayPeriods.RefreshCache();
     gridMain.BeginUpdate();
     gridMain.Columns.Clear();
     ODGridColumn col=new ODGridColumn("Start Date",80);
     gridMain.Columns.Add(col);
     col=new ODGridColumn("End Date",80);
     gridMain.Columns.Add(col);
     col=new ODGridColumn("Paycheck Date",100);
     gridMain.Columns.Add(col);
     gridMain.Rows.Clear();
     UI.ODGridRow row;
     for(int i=0;i<PayPeriods.List.Length;i++){
         row=new OpenDental.UI.ODGridRow();
         row.Cells.Add(PayPeriods.List[i].DateStart.ToShortDateString());
         row.Cells.Add(PayPeriods.List[i].DateStop.ToShortDateString());
         if(PayPeriods.List[i].DatePaycheck.Year<1880){
             row.Cells.Add("");
         }
         else{
             row.Cells.Add(PayPeriods.List[i].DatePaycheck.ToShortDateString());
         }
         gridMain.Rows.Add(row);
     }
     gridMain.EndUpdate();
 }
Beispiel #42
0
 ///<summary></summary>
 public bool Contains(ODGridRow value)
 {
     //If value is not of type ODGridRow, this will return false.
     return(List.Contains(value));
 }
Beispiel #43
0
 ///<summary>We will always try to preserve the selected bills as well as the scroll postition.</summary>
 private void FillGrid()
 {
     if(textDateStart.errorProvider1.GetError(textDateStart)!=""
         || textDateEnd.errorProvider1.GetError(textDateEnd)!="")
     {
         ignoreRefreshOnce=true;
         MsgBox.Show(this,"Please fix data entry errors first.");
         return;
     }
     int scrollPos=gridBill.ScrollValue;
     List<long> selectedKeys=new List<long>();
     for(int i=0;i<gridBill.SelectedIndices.Length;i++){
         selectedKeys.Add(PIn.Long(table.Rows[gridBill.SelectedIndices[i]]["StatementNum"].ToString()));
     }
     DateTime dateFrom=DateTime.MinValue;
     DateTime dateTo=new DateTime(2200,1,1);
     if(textDateStart.Text!=""){
         dateFrom=PIn.Date(textDateStart.Text);
     }
     if(textDateEnd.Text!=""){
         dateTo=PIn.Date(textDateEnd.Text);
     }
     ClinicNum=0;
     if(comboClinic.SelectedIndex>0) {
         ClinicNum=Clinics.List[comboClinic.SelectedIndex-1].ClinicNum;
     }
     table=Statements.GetBilling(radioSent.Checked,comboOrder.SelectedIndex,dateFrom,dateTo,ClinicNum);
     gridBill.BeginUpdate();
     gridBill.Columns.Clear();
     ODGridColumn col=new ODGridColumn(Lan.g("TableBilling","Name"),180);
     gridBill.Columns.Add(col);
     col=new ODGridColumn(Lan.g("TableBilling","BillType"),110);
     gridBill.Columns.Add(col);
     col=new ODGridColumn(Lan.g("TableBilling","Mode"),80);
     gridBill.Columns.Add(col);
     col=new ODGridColumn(Lan.g("TableBilling","LastStatement"),100);
     gridBill.Columns.Add(col);
     col=new ODGridColumn(Lan.g("TableBilling","BalTot"),70,HorizontalAlignment.Right);
     gridBill.Columns.Add(col);
     col=new ODGridColumn(Lan.g("TableBilling","-InsEst"),70,HorizontalAlignment.Right);
     gridBill.Columns.Add(col);
     col=new ODGridColumn(Lan.g("TableBilling","=AmtDue"),70,HorizontalAlignment.Right);
     gridBill.Columns.Add(col);
     col=new ODGridColumn(Lan.g("TableBilling","PayPlanDue"),70,HorizontalAlignment.Right);
     gridBill.Columns.Add(col);
     gridBill.Rows.Clear();
     OpenDental.UI.ODGridRow row;
     for(int i=0;i<table.Rows.Count;i++){
         row=new OpenDental.UI.ODGridRow();
         row.Cells.Add(table.Rows[i]["name"].ToString());
         row.Cells.Add(table.Rows[i]["billingType"].ToString());
         row.Cells.Add(table.Rows[i]["mode"].ToString());
         row.Cells.Add(table.Rows[i]["lastStatement"].ToString());
         row.Cells.Add(table.Rows[i]["balTotal"].ToString());
         row.Cells.Add(table.Rows[i]["insEst"].ToString());
         if(PrefC.GetBool(PrefName.BalancesDontSubtractIns)) {
             row.Cells.Add("");
         }
         else {
             row.Cells.Add(table.Rows[i]["amountDue"].ToString());
         }
         row.Cells.Add(table.Rows[i]["payPlanDue"].ToString());
         gridBill.Rows.Add(row);
     }
     gridBill.EndUpdate();
     if(isInitial){
         gridBill.SetSelected(true);
         isInitial=false;
     }
     else{
         for(int i=0;i<selectedKeys.Count;i++){
             for(int j=0;j<table.Rows.Count;j++){
                 if(table.Rows[j]["StatementNum"].ToString()==selectedKeys[i].ToString()){
                     gridBill.SetSelected(j,true);
                 }
             }
         }
     }
     gridBill.ScrollValue=scrollPos;
     labelTotal.Text=Lan.g(this,"Total=")+table.Rows.Count.ToString();
     labelSelected.Text=Lan.g(this,"Selected=")+gridBill.SelectedIndices.Length.ToString();
     //labelSelected.Text=Lan.g(this,"Selected=")+"0";
 }
		private void FillGrid(){
			Automations.RefreshCache();
			gridMain.BeginUpdate();
			gridMain.Columns.Clear();
			ODGridColumn col=new ODGridColumn("Description",200);
			gridMain.Columns.Add(col);
			col=new ODGridColumn("Trigger",150);
			gridMain.Columns.Add(col);
			col=new ODGridColumn("Action",150);
			gridMain.Columns.Add(col);
			col=new ODGridColumn("Details",200);
			gridMain.Columns.Add(col);
			gridMain.Rows.Clear();
			UI.ODGridRow row;
			string detail;
			for(int i=0;i<Automations.Listt.Count;i++){
				row=new OpenDental.UI.ODGridRow();
				row.Cells.Add(Automations.Listt[i].Description);
				if(Automations.Listt[i].Autotrigger==AutomationTrigger.CompleteProcedure) {
					row.Cells.Add(Automations.Listt[i].ProcCodes);
				}
				else {
					row.Cells.Add(Automations.Listt[i].Autotrigger.ToString());
				}
				row.Cells.Add(Automations.Listt[i].AutoAction.ToString());
				//details: 
				detail="";
				if(Automations.Listt[i].AutoAction==AutomationAction.CreateCommlog) {
					detail+=DefC.GetName(DefCat.CommLogTypes,Automations.Listt[i].CommType)
						+".  "+Automations.Listt[i].MessageContent;
				}
				else if(Automations.Listt[i].AutoAction==AutomationAction.PrintPatientLetter) {
					detail+=SheetDefs.GetDescription(Automations.Listt[i].SheetDefNum);
				}
				else if(Automations.Listt[i].AutoAction==AutomationAction.PrintReferralLetter) {
					detail+=SheetDefs.GetDescription(Automations.Listt[i].SheetDefNum);
				}
				row.Cells.Add(detail);
				gridMain.Rows.Add(row);
			}
			gridMain.EndUpdate();
		}
		private void FillGrid(){
			Cache.Refresh(InvalidType.Operatories);
			bool neededFixing=false;
			for(int i=0;i<OperatoryC.Listt.Count;i++) {
				if(OperatoryC.Listt[i].ItemOrder!=i) {
					OperatoryC.Listt[i].ItemOrder=i;
					Operatories.Update(OperatoryC.Listt[i]);
					neededFixing=true;
				}
			}
			if(neededFixing) {
				DataValid.SetInvalid(InvalidType.Operatories);
			}
			gridMain.BeginUpdate();
			gridMain.Columns.Clear();
			ODGridColumn col=new ODGridColumn(Lan.g("TableOperatories","Op Name"),150);
			gridMain.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableOperatories","Abbrev"),70);
			gridMain.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableOperatories","IsHidden"),64,HorizontalAlignment.Center);
			gridMain.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableOperatories","Clinic"),80);
			gridMain.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableOperatories","Dentist"),70);
			gridMain.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableOperatories","Hygienist"),70);
			gridMain.Columns.Add(col);
			col=new ODGridColumn(Lan.g("TableOperatories","IsHygiene"),72,HorizontalAlignment.Center);
			gridMain.Columns.Add(col);
			gridMain.Rows.Clear();
			UI.ODGridRow row;
			for(int i=0;i<OperatoryC.Listt.Count;i++){
				row=new OpenDental.UI.ODGridRow();
				row.Cells.Add(OperatoryC.Listt[i].OpName);
				row.Cells.Add(OperatoryC.Listt[i].Abbrev);
				if(OperatoryC.Listt[i].IsHidden){
					row.Cells.Add("X");
				}
				else{
					row.Cells.Add("");
				}
				row.Cells.Add(Clinics.GetDesc(OperatoryC.Listt[i].ClinicNum));
				row.Cells.Add(Providers.GetAbbr(OperatoryC.Listt[i].ProvDentist));
				row.Cells.Add(Providers.GetAbbr(OperatoryC.Listt[i].ProvHygienist));
				if(OperatoryC.Listt[i].IsHygiene){
					row.Cells.Add("X");
				}
				else{
					row.Cells.Add("");
				}
				gridMain.Rows.Add(row);
			}
			gridMain.EndUpdate();
		}