コード例 #1
0
        private void FillGridWebSchedOperatories()
        {
            _listWebSchedRecallOps = Operatories.GetOpsForWebSched();
            int opNameWidth = 170;
            int clinicWidth = 80;

            if (!PrefC.HasClinicsEnabled)
            {
                opNameWidth += clinicWidth;
            }
            gridWebSchedOperatories.BeginUpdate();
            gridWebSchedOperatories.Columns.Clear();
            gridWebSchedOperatories.Columns.Add(new ODGridColumn(Lan.g("TableOperatories", "Op Name"), opNameWidth));
            gridWebSchedOperatories.Columns.Add(new ODGridColumn(Lan.g("TableOperatories", "Abbrev"), 70));
            if (PrefC.HasClinicsEnabled)
            {
                gridWebSchedOperatories.Columns.Add(new ODGridColumn(Lan.g("TableOperatories", "Clinic"), clinicWidth));
            }
            gridWebSchedOperatories.Columns.Add(new ODGridColumn(Lan.g("TableOperatories", "Provider"), 90));
            gridWebSchedOperatories.Columns.Add(new ODGridColumn(Lan.g("TableOperatories", "Hygienist"), 90));
            gridWebSchedOperatories.Rows.Clear();
            ODGridRow row;

            for (int i = 0; i < _listWebSchedRecallOps.Count; i++)
            {
                row = new ODGridRow();
                row.Cells.Add(_listWebSchedRecallOps[i].OpName);
                row.Cells.Add(_listWebSchedRecallOps[i].Abbrev);
                if (PrefC.HasClinicsEnabled)
                {
                    row.Cells.Add(Clinics.GetAbbr(_listWebSchedRecallOps[i].ClinicNum));
                }
                row.Cells.Add(Providers.GetAbbr(_listWebSchedRecallOps[i].ProvDentist));
                row.Cells.Add(Providers.GetAbbr(_listWebSchedRecallOps[i].ProvHygienist));
                gridWebSchedOperatories.Rows.Add(row);
            }
            gridWebSchedOperatories.EndUpdate();
        }