コード例 #1
0
 private void FillAppointments()
 {
     this.Cursor = Cursors.WaitCursor;
     ListUn      = Appointments.RefreshUnsched(true);
     tbApts.ResetRows(ListUn.Length);
     tbApts.SetGridColor(Color.DarkGray);
     for (int i = 0; i < ListUn.Length; i++)
     {
         tbApts.Cell[0, i] = (string)Patients.HList[ListUn[i].PatNum];
         if (ListUn[i].AptDateTime.Year < 1880)
         {
             tbApts.Cell[1, i] = "";
         }
         else
         {
             tbApts.Cell[1, i] = ListUn[i].AptDateTime.ToShortDateString();
         }
         tbApts.Cell[2, i] = DefB.GetName(DefCat.RecallUnschedStatus, ListUn[i].UnschedStatus);
         tbApts.Cell[3, i] = Providers.GetAbbr(ListUn[i].ProvNum);
         tbApts.Cell[4, i] = ListUn[i].ProcDescript;
         tbApts.Cell[5, i] = ListUn[i].Note;
     }
     tbApts.LayoutTables();
     Cursor = Cursors.Default;
 }
コード例 #2
0
        private void FillGrid()
        {
            this.Cursor = Cursors.WaitCursor;
            ListUn      = Appointments.RefreshUnsched(false);
            int scrollVal = grid.ScrollValue;

            grid.BeginUpdate();
            grid.Columns.Clear();
            ODGridColumn col = new ODGridColumn(Lan.g("TableUnsched", "Patient"), 140);

            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableUnsched", "Date"), 65);
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableUnsched", "Status"), 110);
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableUnsched", "Prov"), 50);
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableUnsched", "Procedures"), 150);
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableUnsched", "Notes"), 200);
            grid.Columns.Add(col);
            grid.Rows.Clear();
            ODGridRow row;

            for (int i = 0; i < ListUn.Length; i++)
            {
                row = new ODGridRow();
                row.Cells.Add((string)Patients.HList[ListUn[i].PatNum]);
                if (ListUn[i].AptDateTime.Year < 1880)
                {
                    row.Cells.Add("");
                }
                else
                {
                    row.Cells.Add(ListUn[i].AptDateTime.ToShortDateString());
                }
                row.Cells.Add(DefB.GetName(DefCat.RecallUnschedStatus, ListUn[i].UnschedStatus));
                row.Cells.Add(Providers.GetAbbr(ListUn[i].ProvNum));
                row.Cells.Add(ListUn[i].ProcDescript);
                row.Cells.Add(ListUn[i].Note);
                grid.Rows.Add(row);
            }
            grid.EndUpdate();
            grid.ScrollValue = scrollVal;
            Cursor           = Cursors.Default;
        }
コード例 #3
0
        private void FillGrid()
        {
            this.Cursor = Cursors.WaitCursor;
            string order = "";

            switch (comboOrder.SelectedIndex)
            {
            case 0:
                order = "status";
                break;

            case 1:
                order = "alph";
                break;

            case 2:
                order = "date";
                break;
            }
            long provNum = 0;

            if (comboProv.SelectedIndex != 0)
            {
                provNum = ProviderC.ListShort[comboProv.SelectedIndex - 1].ProvNum;
            }
            long siteNum = 0;

            if (!PrefC.GetBool(PrefName.EasyHidePublicHealth) && comboSite.SelectedIndex != 0)
            {
                siteNum = SiteC.List[comboSite.SelectedIndex - 1].SiteNum;
            }
            long clinicNum = 0;

            if (comboClinic.SelectedIndex > 0)
            {
                clinicNum = Clinics.List[comboClinic.SelectedIndex - 1].ClinicNum;
            }
            bool showBrokenAppts;

            showBrokenAppts = checkBrokenAppts.Checked;
            ListUn          = Appointments.RefreshUnsched(order, provNum, siteNum, showBrokenAppts, clinicNum);
            int scrollVal = grid.ScrollValue;

            grid.BeginUpdate();
            grid.Columns.Clear();
            ODGridColumn col = new ODGridColumn(Lan.g("TableUnsched", "Patient"), 140);

            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableUnsched", "Date"), 65);
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableUnsched", "Status"), 110);
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableUnsched", "Prov"), 50);
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableUnsched", "Procedures"), 150);
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableUnsched", "Notes"), 200);
            grid.Columns.Add(col);
            grid.Rows.Clear();
            ODGridRow row;

            for (int i = 0; i < ListUn.Length; i++)
            {
                row = new ODGridRow();
                row.Cells.Add(patientNames[ListUn[i].PatNum]);
                if (ListUn[i].AptDateTime.Year < 1880)
                {
                    row.Cells.Add("");
                }
                else
                {
                    row.Cells.Add(ListUn[i].AptDateTime.ToShortDateString());
                }
                row.Cells.Add(DefC.GetName(DefCat.RecallUnschedStatus, ListUn[i].UnschedStatus));
                row.Cells.Add(Providers.GetAbbr(ListUn[i].ProvNum));
                row.Cells.Add(ListUn[i].ProcDescript);
                row.Cells.Add(ListUn[i].Note);
                grid.Rows.Add(row);
            }
            grid.EndUpdate();
            grid.ScrollValue = scrollVal;
            Cursor           = Cursors.Default;
        }
コード例 #4
0
ファイル: FormUnsched.cs プロジェクト: ChemBrain/OpenDental
        private void FillGrid()
        {
            ODProgress.ShowAction(            //Show progress window while filling the grid.
                () => {
                string order = "";
                switch (comboOrder.SelectedIndex)
                {
                case 0:
                    order = "status";
                    break;

                case 1:
                    order = "alph";
                    break;

                case 2:
                    order = "date";
                    break;
                }
                long provNum = 0;
                if (comboProv.SelectedIndex != 0)
                {
                    provNum = _listProviders[comboProv.SelectedIndex - 1].ProvNum;
                }
                long siteNum = 0;
                if (!PrefC.GetBool(PrefName.EasyHidePublicHealth) && comboSite.SelectedIndex != 0)
                {
                    siteNum = _listSites[comboSite.SelectedIndex - 1].SiteNum;
                }
                bool showBrokenAppts;
                showBrokenAppts = checkBrokenAppts.Checked;
                long clinicNum  = PrefC.HasClinicsEnabled ? comboClinic.SelectedClinicNum : -1;
                _listUnschedApt = Appointments.RefreshUnsched(order, provNum, siteNum, showBrokenAppts, clinicNum,
                                                              codeRangeFilter.StartRange, codeRangeFilter.EndRange, dateRangePicker.GetDateTimeFrom(), dateRangePicker.GetDateTimeTo());
                UnscheduleListEvent.Fire(ODEventType.UnscheduledList, Lans.g(this, "Filling the Unscheduled List grid..."));
                int scrollVal = grid.ScrollValue;
                grid.BeginUpdate();
                grid.ListGridColumns.Clear();
                GridColumn col = new GridColumn(Lan.g("TableUnsched", "Patient"), 140);
                grid.ListGridColumns.Add(col);
                col = new GridColumn(Lan.g("TableUnsched", "Date"), 65);
                grid.ListGridColumns.Add(col);
                col = new GridColumn(Lan.g("TableUnsched", "AptStatus"), 90);
                grid.ListGridColumns.Add(col);
                col = new GridColumn(Lan.g("TableUnsched", "UnschedStatus"), 110);
                grid.ListGridColumns.Add(col);
                col = new GridColumn(Lan.g("TableUnsched", "Prov"), 50);
                grid.ListGridColumns.Add(col);
                col = new GridColumn(Lan.g("TableUnsched", "Procedures"), 150);
                grid.ListGridColumns.Add(col);
                col = new GridColumn(Lan.g("TableUnsched", "Notes"), 200);
                grid.ListGridColumns.Add(col);
                grid.ListGridRows.Clear();
                GridRow row;
                Dictionary <long, string> dictPatNames = Patients.GetPatientNames(_listUnschedApt.Select(x => x.PatNum).ToList());
                foreach (Appointment apt in _listUnschedApt)
                {
                    row            = new GridRow();
                    string patName = Lan.g(this, "UNKNOWN");
                    dictPatNames.TryGetValue(apt.PatNum, out patName);
                    row.Cells.Add(patName);
                    if (apt.AptDateTime.Year < 1880)
                    {
                        row.Cells.Add("");
                    }
                    else
                    {
                        row.Cells.Add(apt.AptDateTime.ToShortDateString());
                    }
                    if (apt.AptStatus == ApptStatus.Broken)
                    {
                        row.Cells.Add(Lan.g(this, "Broken"));
                    }
                    else
                    {
                        row.Cells.Add(Lan.g(this, "Unscheduled"));
                    }
                    row.Cells.Add(Defs.GetName(DefCat.RecallUnschedStatus, apt.UnschedStatus));
                    row.Cells.Add(Providers.GetAbbr(apt.ProvNum));
                    row.Cells.Add(apt.ProcDescript);
                    row.Cells.Add(apt.Note);
                    grid.ListGridRows.Add(row);
                }
                grid.EndUpdate();
                grid.ScrollValue = scrollVal;
            },
                startingMessage: Lans.g(this, "Retrieving data for the Unscheduled List grid..."),
                eventType: typeof(UnscheduleListEvent),
                odEventType: ODEventType.UnscheduledList
                );
        }
コード例 #5
0
ファイル: FormUnsched.cs プロジェクト: royedwards/DRDNet
        private void FillGrid()
        {
            this.Cursor = Cursors.WaitCursor;
            string order = "";

            switch (comboOrder.SelectedIndex)
            {
            case 0:
                order = "status";
                break;

            case 1:
                order = "alph";
                break;

            case 2:
                order = "date";
                break;
            }
            long provNum = 0;

            if (comboProv.SelectedIndex != 0)
            {
                provNum = _listProviders[comboProv.SelectedIndex - 1].ProvNum;
            }
            long siteNum = 0;

            if (!PrefC.GetBool(PrefName.EasyHidePublicHealth) && comboSite.SelectedIndex != 0)
            {
                siteNum = _listSites[comboSite.SelectedIndex - 1].SiteNum;
            }
            long clinicNum = 0;

            //if clinics are not enabled, comboClinic.SelectedIndex will be -1, so clinicNum will be 0 and list will not be filtered by clinic
            if (Security.CurUser.ClinicIsRestricted && comboClinic.SelectedIndex > -1)
            {
                clinicNum = _listUserClinics[comboClinic.SelectedIndex].ClinicNum;
            }
            else if (comboClinic.SelectedIndex > 0)                                    //if user is not restricted, clinicNum will be 0 and the query will get all clinic data
            {
                clinicNum = _listUserClinics[comboClinic.SelectedIndex - 1].ClinicNum; //if user is not restricted, comboClinic will contain "All" so minus 1
            }
            bool showBrokenAppts;

            showBrokenAppts = checkBrokenAppts.Checked;
            string codeStart = "";
            string codeEnd   = "";

            if (textCodeRange.Text.Trim() != "")
            {
                if (textCodeRange.Text.Contains("-"))
                {
                    string[] codeSplit = textCodeRange.Text.Split('-');
                    codeStart = codeSplit[0].Trim().Replace('d', 'D');
                    codeEnd   = codeSplit[1].Trim().Replace('d', 'D');
                }
                else
                {
                    codeStart = textCodeRange.Text.Trim().Replace('d', 'D');
                    codeEnd   = textCodeRange.Text.Trim().Replace('d', 'D');
                }
            }
            _listUnschedApt = Appointments.RefreshUnsched(order, provNum, siteNum, showBrokenAppts, clinicNum, codeStart, codeEnd, dateRangePicker.GetDateTimeFrom(), dateRangePicker.GetDateTimeTo());
            int scrollVal = grid.ScrollValue;

            grid.BeginUpdate();
            grid.Columns.Clear();
            ODGridColumn col = new ODGridColumn(Lan.g("TableUnsched", "Patient"), 140);

            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableUnsched", "Date"), 65);
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableUnsched", "AptStatus"), 90);
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableUnsched", "UnschedStatus"), 110);
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableUnsched", "Prov"), 50);
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableUnsched", "Procedures"), 150);
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableUnsched", "Notes"), 200);
            grid.Columns.Add(col);
            grid.Rows.Clear();
            ODGridRow row;
            Dictionary <long, string> dictPatNames = Patients.GetPatientNames(_listUnschedApt.Select(x => x.PatNum).ToList());

            foreach (Appointment apt in _listUnschedApt)
            {
                row = new ODGridRow();
                string patName = Lan.g(this, "UNKNOWN");
                dictPatNames.TryGetValue(apt.PatNum, out patName);
                row.Cells.Add(patName);
                if (apt.AptDateTime.Year < 1880)
                {
                    row.Cells.Add("");
                }
                else
                {
                    row.Cells.Add(apt.AptDateTime.ToShortDateString());
                }
                if (apt.AptStatus == ApptStatus.Broken)
                {
                    row.Cells.Add(Lan.g(this, "Broken"));
                }
                else
                {
                    row.Cells.Add(Lan.g(this, "Unscheduled"));
                }
                row.Cells.Add(Defs.GetName(DefCat.RecallUnschedStatus, apt.UnschedStatus));
                row.Cells.Add(Providers.GetAbbr(apt.ProvNum));
                row.Cells.Add(apt.ProcDescript);
                row.Cells.Add(apt.Note);
                grid.Rows.Add(row);
            }
            grid.EndUpdate();
            grid.ScrollValue = scrollVal;
            Cursor           = Cursors.Default;
        }