private void FillGrid() { Operatories.Refresh(); gridMain.BeginUpdate(); 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(); }
private void FillTable() { gridBill.BeginUpdate(); 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(); }