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.ListGridRows[index].Tag); } gridMain.BeginUpdate(); gridMain.ListGridRows.Clear(); //Clears the selections also. gridMain.ListGridColumns.Clear(); GridColumn col = new GridColumn(); gridMain.ListGridColumns.Add(col); GridRow row; for (int i = 0; i < _listItems.Count; i++) { row = new GridRow(); row.Tag = _listItems[i]; row.Cells.Add(_listItems[i].ToString()); gridMain.ListGridRows.Add(row); } gridMain.EndUpdate(); for (int i = 0; i < gridMain.ListGridRows.Count; i++) { if (listSelectedTags.Contains(gridMain.ListGridRows[i].Tag)) { gridMain.SetSelected(i, true); } } //Arbitrary padding: 1 (for upper grid border) +1 (for lower grid border) +1 (for toolbar magic space at top) = 3 gridMain.Height = Math.Min((gridMain.ListGridRows.Sum(x => x.State.HeightMain) + 3), _maxDropDownHeight); }
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() { 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(); ODGridRow row; for (int i = 0; i < _listPayPeriods.Count; i++) { row = new ODGridRow(); row.Cells.Add(_listPayPeriods[i].DateStart.ToShortDateString()); row.Cells.Add(_listPayPeriods[i].DateStop.ToShortDateString()); if (_listPayPeriods[i].DatePaycheck.Year < 1880) { row.Cells.Add(""); } else { row.Cells.Add(_listPayPeriods[i].DatePaycheck.ToShortDateString()); } gridMain.Rows.Add(row); } gridMain.EndUpdate(); }
private void FillGrid() { ListLabs = Laboratories.Refresh(); gridMain.BeginUpdate(); gridMain.Columns.Clear(); ODGridColumn col = new ODGridColumn(Lan.g("TableLabs", "Description"), 100); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableLabs", "Phone"), 100); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableLabs", "Notes"), 200); gridMain.Columns.Add(col); gridMain.Rows.Clear(); ODGridRow row; for (int i = 0; i < ListLabs.Count; i++) { row = new ODGridRow(); row.Cells.Add(ListLabs[i].Description); row.Cells.Add(ListLabs[i].Phone); row.Cells.Add(ListLabs[i].Notes); gridMain.Rows.Add(row); } gridMain.EndUpdate(); }
private void FillGrid() { RxDefList = RxDefs.Refresh(); gridMain.BeginUpdate(); gridMain.Columns.Clear(); ODGridColumn col = new ODGridColumn(Lan.g("TableRxSetup", "Drug"), 140); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableRxSetup", "Sig"), 320); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableRxSetup", "Disp"), 70); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableRxSetup", "Refills"), 70); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableRxSetup", "Notes"), 300); gridMain.Columns.Add(col); gridMain.Rows.Clear(); ODGridRow row; for (int i = 0; i < RxDefList.Length; i++) { row = new ODGridRow(); row.Cells.Add(RxDefList[i].Drug); row.Cells.Add(RxDefList[i].Sig); row.Cells.Add(RxDefList[i].Disp); row.Cells.Add(RxDefList[i].Refills); row.Cells.Add(RxDefList[i].Notes); gridMain.Rows.Add(row); } gridMain.EndUpdate(); }
private void FillGrid() { ListLabs = Laboratories.Refresh(); gridMain.BeginUpdate(); gridMain.ListGridColumns.Clear(); GridColumn col = new GridColumn(Lan.g("TableLabs", "Description"), 100); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableLabs", "Phone"), 100); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableLabs", "Hidden"), 50, HorizontalAlignment.Center); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableLabs", "Notes"), 200); gridMain.ListGridColumns.Add(col); gridMain.ListGridRows.Clear(); GridRow row; for (int i = 0; i < ListLabs.Count; i++) { row = new GridRow(); row.Cells.Add(ListLabs[i].Description); row.Cells.Add(ListLabs[i].Phone); row.Cells.Add(ListLabs[i].IsHidden?"X":""); row.Cells.Add(ListLabs[i].Notes); gridMain.ListGridRows.Add(row); } gridMain.EndUpdate(); }
private void FillGrid(ODGrid grid, List <Cdcrec> listCdcRecs) { grid.BeginUpdate(); grid.Columns.Clear(); ODGridColumn col; col = new ODGridColumn(Lan.g(this, "CDCREC Code"), 100); grid.Columns.Add(col); col = new ODGridColumn(Lan.g(this, "Description"), 150); grid.Columns.Add(col); grid.Rows.Clear(); ODGridRow row; foreach (Cdcrec cdcrec in listCdcRecs) { row = new ODGridRow(); if (cdcrec.CdcrecCode.StartsWith("ASKU") || cdcrec.CdcrecCode == PatientRace.MULTI_RACE_CODE) { row.Cells.Add(""); } else { row.Cells.Add(cdcrec.CdcrecCode); } row.Cells.Add(cdcrec.Description); row.Tag = cdcrec; grid.Rows.Add(row); } grid.EndUpdate(); }
///<summary>All alterations to TableAttached should have been made</summary> private void FillAttached() { gridAttached.BeginUpdate(); gridAttached.Columns.Clear(); ODGridColumn col = new ODGridColumn("Student", 130); gridAttached.Columns.Add(col); col = new ODGridColumn("Descript", 150); gridAttached.Columns.Add(col); col = new ODGridColumn("Completed", 40); gridAttached.Columns.Add(col); gridAttached.Rows.Clear(); ODGridRow row; for (int i = 0; i < reqsAttached.Count; i++) { row = new ODGridRow(); row.Cells.Add(Providers.GetAbbr(reqsAttached[i].ProvNum)); row.Cells.Add(reqsAttached[i].Descript); if (reqsAttached[i].DateCompleted.Year < 1880) { row.Cells.Add(""); } else { row.Cells.Add("X"); } row.Tag = reqsAttached[i]; gridAttached.Rows.Add(row); } gridAttached.EndUpdate(); }
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(); }
private void FillGrid(ODGrid grid, bool isSelectionMaintained, params SheetDef[] arrDashboardSheetDefs) { List <SheetDef> listSelectedDashboards = grid.SelectedTags <SheetDef>(); grid.BeginUpdate(); grid.ListGridColumns.Clear(); grid.ListGridColumns.Add(new GridColumn("Name", 0, HorizontalAlignment.Left)); if (grid == gridCustom) { grid.ListGridColumns.Add(new GridColumn("Allowed", 50, HorizontalAlignment.Center)); _colAllowed = gridCustom.ListGridColumns.Count - 1; //Dynamically determines the 'Allowed' column index in case we add others later. } grid.ListGridRows.Clear(); foreach (SheetDef sheetDefWidget in arrDashboardSheetDefs) { GridRow row = new GridRow(); row.Cells.Add(sheetDefWidget.Description); if (grid == gridCustom) { bool isAllowed = IsUserGroupAllowed(sheetDefWidget, comboUserGroup.GetSelected <UserGroup>()); row.Cells.Add(isAllowed ? "X":""); } row.Tag = sheetDefWidget; grid.ListGridRows.Add(row); } grid.EndUpdate(); if (isSelectionMaintained) { foreach (SheetDef sheetDef in listSelectedDashboards) { SelectDashboardDef(sheetDef); } } }
private void FillNotes() { NoteList = ProcCodeNotes.GetList(ProcCode.CodeNum); gridNotes.BeginUpdate(); gridNotes.Columns.Clear(); ODGridColumn col = new ODGridColumn(Lan.g("TableProcedureNotes", "Prov"), 80); gridNotes.Columns.Add(col); col = new ODGridColumn(Lan.g("TableProcedureNotes", "Time"), 150); gridNotes.Columns.Add(col); col = new ODGridColumn(Lan.g("TableProcedureNotes", "Note"), 400); gridNotes.Columns.Add(col); gridNotes.Rows.Clear(); ODGridRow row; for (int i = 0; i < NoteList.Count; i++) { row = new ODGridRow(); row.Cells.Add(Providers.GetAbbr(NoteList[i].ProvNum)); row.Cells.Add(NoteList[i].ProcTime); row.Cells.Add(NoteList[i].Note); gridNotes.Rows.Add(row); } gridNotes.EndUpdate(); }
private void butListPatients_Click(object sender,EventArgs e) { ODForm form=new ODForm() { Size=new Size(500,400), Text="Other Patients List", FormBorderStyle=FormBorderStyle.FixedSingle }; ODGrid grid=new ODGrid() { Size=new Size(475,300), Location=new Point(5,5), Title="Patients", TranslationName="" }; UI.Button butClose=new UI.Button() { Size=new Size(75,23), Text="Close", Location=new Point(form.ClientSize.Width-80,form.ClientSize.Height-28),//Subtract the button's size plus 5 pixel buffer. }; butClose.Click+=(s,ex) => form.Close();//When butClose is pressed, simply close the form. If more functionality is needed, make a method below. form.Controls.Add(grid); form.Controls.Add(butClose); grid.BeginUpdate(); grid.Columns.Clear(); grid.Columns.Add(new ODGridColumn(Lan.g(this,"Name"),0)); grid.Rows.Clear(); foreach(string patName in _listPatNames) { grid.Rows.Add(new ODGridRow(patName)); } grid.EndUpdate(); form.ShowDialog(); }
private void FillGrid() { gridMain.BeginUpdate(); gridMain.ListGridColumns.Clear(); GridColumn col = new GridColumn(Lan.g("TableInvoiceItems", "Date"), 70); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableInvoiceItems", "PatName"), 100); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableInvoiceItems", "Prov"), 55); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableInvoiceItems", "Code"), 55); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableInvoiceItems", "Tooth"), 50); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableInvoiceItems", "Description"), 150); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableInvoiceItems", "Fee"), 60, HorizontalAlignment.Right); gridMain.ListGridColumns.Add(col); gridMain.ListGridRows.Clear(); GridRow row; List <ProcedureCode> listProcCodes = ProcedureCodes.GetAllCodes(); foreach (DataRow tableRow in _tableSuperFamAcct.Rows) { row = new GridRow(); row.Cells.Add(PIn.DateT(tableRow["Date"].ToString()).ToShortDateString()); row.Cells.Add(tableRow["PatName"].ToString()); row.Cells.Add(Providers.GetAbbr(PIn.Long(tableRow["Prov"].ToString()))); if (!string.IsNullOrWhiteSpace(tableRow["AdjType"].ToString())) //It's an adjustment { row.Cells.Add(Lan.g(this, "Adjust")); //Adjustment row.Cells.Add(Tooth.ToInternat(tableRow["Tooth"].ToString())); row.Cells.Add(Defs.GetName(DefCat.AdjTypes, PIn.Long(tableRow["AdjType"].ToString()))); //Adjustment type } else if (!string.IsNullOrWhiteSpace(tableRow["ChargeType"].ToString())) //It's a payplan charge { if (PrefC.GetInt(PrefName.PayPlansVersion) != (int)PayPlanVersions.AgeCreditsAndDebits) { continue; //They can only attach debits to invoices and they can only do so if they're on version 2. } row.Cells.Add(Lan.g(this, "Pay Plan")); row.Cells.Add(Tooth.ToInternat(tableRow["Tooth"].ToString())); row.Cells.Add(PIn.Enum <PayPlanChargeType>(PIn.Int(tableRow["ChargeType"].ToString())).GetDescription()); //Pay Plan charge type } else //It's a procedure { ProcedureCode procCode = ProcedureCodes.GetProcCode(PIn.Long(tableRow["Code"].ToString()), listProcCodes); row.Cells.Add(procCode.ProcCode); row.Cells.Add(Tooth.ToInternat(tableRow["Tooth"].ToString())); row.Cells.Add(procCode.Descript); } row.Cells.Add(PIn.Double(tableRow["Amount"].ToString()).ToString("F")); row.Tag = tableRow; gridMain.ListGridRows.Add(row); } gridMain.EndUpdate(); }
private void FillGrid() { //get the list of disease defs currently showing based on the search terms. _listDiseaseDefsShowing = FilterList(_listDiseaseDefs); //disable the up/down buttons if not all the problems are showing. if (_listDiseaseDefsShowing.Count != _listDiseaseDefs.Count) { butUp.Enabled = false; butDown.Enabled = false; butAlphabetize.Enabled = false; } else { butUp.Enabled = true; butDown.Enabled = true; butAlphabetize.Enabled = true; } gridMain.BeginUpdate(); gridMain.ListGridColumns.Clear(); GridColumn col; col = new GridColumn(Lan.g(this, "ICD-9"), 50); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g(this, "ICD-10"), 50); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g(this, "SNOMED CT"), 100); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g(this, "Description"), 250); gridMain.ListGridColumns.Add(col); if (!IsSelectionMode) { col = new GridColumn(Lan.g(this, "Hidden"), 50, HorizontalAlignment.Center); gridMain.ListGridColumns.Add(col); } gridMain.ListGridRows.Clear(); GridRow row; foreach (DiseaseDef defCur in _listDiseaseDefsShowing) { row = new GridRow(); row.Cells.Add(defCur.ICD9Code); row.Cells.Add(defCur.Icd10Code); row.Cells.Add(defCur.SnomedCode); row.Cells.Add(defCur.DiseaseName); if (!IsSelectionMode) { row.Cells.Add(defCur.IsHidden ? "X" : ""); } row.Tag = defCur; if (_listDiseaseDefNumsColored.Contains(defCur.DiseaseDefNum)) { row.ColorBackG = Color.LightCyan; } gridMain.ListGridRows.Add(row); } gridMain.EndUpdate(); }
private void FillGrid() { SubList = InsSubs.RefreshForFam(FamCur); if (!InsSubs.ValidatePlanNumForList(SubList.Select(x => x.InsSubNum).ToList())) { SubList = InsSubs.RefreshForFam(FamCur); } PlanList = InsPlans.RefreshForSubList(SubList); gridMain.BeginUpdate(); gridMain.ListGridColumns.Clear(); GridColumn col; //=new ODGridColumn(Lan.g("TableInsPlans","#"),20); //gridMain.Columns.Add(col); col = new GridColumn(Lan.g("TableInsPlans", "Subscriber"), 140); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableInsPlans", "Ins Carrier"), 100); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableInsPlans", "Date Effect."), 90); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableInsPlans", "Date Term."), 90); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableInsPlans", "Used By"), 90); gridMain.ListGridColumns.Add(col); gridMain.ListGridRows.Clear(); GridRow row; //PatPlan[] patPlanArray; InsPlan plan; for (int i = 0; i < SubList.Count; i++) { plan = InsPlans.GetPlan(SubList[i].PlanNum, PlanList); row = new GridRow(); row.Cells.Add(FamCur.GetNameInFamLF(SubList[i].Subscriber)); row.Cells.Add(Carriers.GetName(plan.CarrierNum)); if (SubList[i].DateEffective.Year < 1880) { row.Cells.Add(""); } else { row.Cells.Add(SubList[i].DateEffective.ToString("d")); } if (SubList[i].DateTerm.Year < 1880) { row.Cells.Add(""); } else { row.Cells.Add(SubList[i].DateTerm.ToString("d")); } int countPatPlans = PatPlans.GetCountBySubNum(SubList[i].InsSubNum); row.Cells.Add(countPatPlans.ToString()); gridMain.ListGridRows.Add(row); } gridMain.EndUpdate(); }
private void FillGrid() { ODProgress.ShowAction( () => { RefreshReport(); gridMain.BeginUpdate(); if (gridMain.ListGridColumns.Count == 0) { gridMain.ListGridColumns.Add(new GridColumn(Lan.g(this, "Patient"), _colWidthPatName, GridSortingStrategy.StringCompare)); gridMain.ListGridColumns.Add(new GridColumn(Lan.g(this, "Date"), _colWidthProcDate, HorizontalAlignment.Center, GridSortingStrategy.DateParse)); gridMain.ListGridColumns.Add(new GridColumn(Lan.g(this, "Code"), _colWidthProcCode, GridSortingStrategy.StringCompare)); gridMain.ListGridColumns.Add(new GridColumn(Lan.g(this, "Tth"), _colWidthProcTth, GridSortingStrategy.StringCompare)); gridMain.ListGridColumns.Add(new GridColumn(Lan.g(this, "Prov"), _colWidthProv, GridSortingStrategy.StringCompare)); gridMain.ListGridColumns.Add(new GridColumn(Lan.g(this, "Fee"), _colWidthFee, HorizontalAlignment.Right, GridSortingStrategy.AmountParse)); gridMain.ListGridColumns.Add(new GridColumn(Lan.g(this, "Ins Paid"), _colWidthInsPay, HorizontalAlignment.Right, GridSortingStrategy.AmountParse)); gridMain.ListGridColumns.Add(new GridColumn(Lan.g(this, "Write-off"), _colWidthWO, HorizontalAlignment.Right, GridSortingStrategy.AmountParse)); gridMain.ListGridColumns.Add(new GridColumn(Lan.g(this, "Pt Paid"), _colWidthPtPaid, HorizontalAlignment.Right, GridSortingStrategy.AmountParse)); gridMain.ListGridColumns.Add(new GridColumn(Lan.g(this, "Adjust"), _colWidthAdj, HorizontalAlignment.Right, GridSortingStrategy.AmountParse)); gridMain.ListGridColumns.Add(new GridColumn(Lan.g(this, "Overpayment"), _colWidthOverpay, HorizontalAlignment.Right, GridSortingStrategy.AmountParse)); } gridMain.ListGridRows.Clear(); GridRow row; for (int i = 0; i < _myReport.ReportObjects.Count; i++) { if (_myReport.ReportObjects[i].ObjectType != ReportObjectType.QueryObject) { continue; } QueryObject queryObj = (QueryObject)_myReport.ReportObjects[i]; for (int j = 0; j < queryObj.ReportTable.Rows.Count; j++) { DataRow rowCur = queryObj.ReportTable.Rows[j]; row = new GridRow(); row.Cells.Add(rowCur["patientName"].ToString()); row.Cells.Add(PIn.Date(rowCur["ProcDate"].ToString()).ToShortDateString()); row.Cells.Add(PIn.String(rowCur["ProcCode"].ToString())); row.Cells.Add(PIn.String(rowCur["ToothNum"].ToString())); row.Cells.Add(PIn.String(rowCur["Abbr"].ToString())); row.Cells.Add(PIn.Double(rowCur["fee"].ToString()).ToString("c")); row.Cells.Add(PIn.Double(rowCur["insPaid"].ToString()).ToString("c")); row.Cells.Add(PIn.Double(rowCur["wo"].ToString()).ToString("c")); row.Cells.Add(PIn.Double(rowCur["ptPaid"].ToString()).ToString("c")); row.Cells.Add(PIn.Double(rowCur["adjAmt"].ToString()).ToString("c")); row.Cells.Add(PIn.Double(rowCur["overpay"].ToString()).ToString("c")); row.Tag = rowCur; gridMain.ListGridRows.Add(row); } } gridMain.EndUpdate(); }, startingMessage: "Refreshing Grid...", actionException: e => this.Invoke(() => { FriendlyException.Show(Lan.g(this, "Error filling the Procedures Overpaid grid."), e); }) ); }
private void FillGrid() { if (textDateFrom.errorProvider1.GetError(textDateFrom) != "" || textDateFrom.errorProvider1.GetError(textDateFrom) != "") { //MsgBox.Show(this,"Please fix errors first."); return; } DateTime dateMax = new DateTime(2100, 1, 1); if (textDateTo.Text != "") { dateMax = PIn.Date(textDateTo.Text); } table = LabCases.Refresh(PIn.Date(textDateFrom.Text), dateMax, checkShowAll.Checked, checkShowUnattached.Checked); gridMain.BeginUpdate(); gridMain.Columns.Clear(); ODGridColumn col; col = new ODGridColumn(Lan.g("TableLabCases", "Appt Date Time"), 120); col.SortingStrategy = GridSortingStrategy.DateParse; gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableLabCases", "Procedures"), 200); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableLabCases", "Patient"), 120); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableLabCases", "Status"), 100); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableLabCases", "Lab"), 75); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableLabCases", "Lab Phone"), 100); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableLabCases", "Instructions"), 100); gridMain.Columns.Add(col); gridMain.Rows.Clear(); ODGridRow row; for (int i = 0; i < table.Rows.Count; i++) { row = new ODGridRow(); row.Cells.Add(table.Rows[i]["aptDateTime"].ToString()); row.Cells.Add(table.Rows[i]["ProcDescript"].ToString()); row.Cells.Add(table.Rows[i]["patient"].ToString()); row.Cells.Add(table.Rows[i]["status"].ToString()); row.Cells.Add(table.Rows[i]["lab"].ToString()); row.Cells.Add(table.Rows[i]["phone"].ToString()); row.Cells.Add(table.Rows[i]["Instructions"].ToString()); row.Tag = table.Rows[i]; gridMain.Rows.Add(row); } gridMain.AllowSortingByColumn = true; gridMain.EndUpdate(); }
private void SortGridByProc(ODGrid grid) { List <GridRow> listRows = grid.ListGridRows.ToList(); listRows = listRows.OrderBy(x => ((ProcedureCode)x.Tag).ProcCode).ToList(); grid.BeginUpdate(); grid.ListGridRows.Clear(); foreach (GridRow row in listRows) { grid.ListGridRows.Add(row); } grid.EndUpdate(); }
private void FillGrid() { DiseaseDefs.RefreshCache(); //listMain.SelectionMode=SelectionMode.MultiExtended; gridMain.BeginUpdate(); gridMain.Columns.Clear(); ODGridColumn col; col = new ODGridColumn(Lan.g(this, "ICD-9"), 50); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g(this, "ICD-10"), 50); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g(this, "SNOMED CT"), 100); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g(this, "Description"), 250); gridMain.Columns.Add(col); if (!IsSelectionMode) { col = new ODGridColumn(Lan.g(this, "Hidden"), 50); gridMain.Columns.Add(col); } gridMain.Rows.Clear(); ODGridRow row; if (IsSelectionMode) { for (int i = 0; i < DiseaseDefs.List.Length; i++) { row = new ODGridRow(); row.Cells.Add(DiseaseDefs.List[i].ICD9Code); row.Cells.Add(DiseaseDefs.List[i].Icd10Code); row.Cells.Add(DiseaseDefs.List[i].SnomedCode); row.Cells.Add(DiseaseDefs.List[i].DiseaseName); gridMain.Rows.Add(row); } } else //Not selection mode - show hidden { for (int i = 0; i < DiseaseDefs.ListLong.Length; i++) { row = new ODGridRow(); row.Cells.Add(DiseaseDefs.ListLong[i].ICD9Code); row.Cells.Add(DiseaseDefs.List[i].Icd10Code); row.Cells.Add(DiseaseDefs.ListLong[i].SnomedCode); row.Cells.Add(DiseaseDefs.ListLong[i].DiseaseName); row.Cells.Add(DiseaseDefs.ListLong[i].IsHidden?"X":""); gridMain.Rows.Add(row); } } gridMain.EndUpdate(); }
private void FillGrid(ODGrid grid, List <Schedule> listSched) { grid.BeginUpdate(); grid.ListGridColumns.Clear(); grid.ListGridColumns.Add(new GridColumn("StartTime", 105)); grid.ListGridColumns.Add(new GridColumn("EndTime", 105)); grid.ListGridRows.Clear(); listSched.ForEach(x => { GridRow row = new GridRow(); row.Cells.Add(x.StartTime.ToShortTimeString()); row.Cells.Add(x.StopTime.ToShortTimeString()); grid.ListGridRows.Add(row); }); grid.EndUpdate(); }
private void FillRules() { TimeCardRules.RefreshCache(); //Start with a convenient sorting of all employees on top, followed by a last name sort. List <TimeCardRule> listSorted = TimeCardRules.GetDeepCopy().OrderBy(x => x.IsOvertimeExempt) .ThenBy(x => x.EmployeeNum != 0) .ThenBy(x => (Employees.GetEmp(x.EmployeeNum) ?? new Employee()).LName) .ToList(); gridRules.BeginUpdate(); gridRules.ListGridColumns.Clear(); GridColumn col = new GridColumn("Employee", 150, GridSortingStrategy.StringCompare); gridRules.ListGridColumns.Add(col); col = new GridColumn("OT before x Time", 105, GridSortingStrategy.TimeParse); gridRules.ListGridColumns.Add(col); col = new GridColumn("OT after x Time", 100, GridSortingStrategy.TimeParse); gridRules.ListGridColumns.Add(col); col = new GridColumn("OT after x Hours", 110, GridSortingStrategy.TimeParse); gridRules.ListGridColumns.Add(col); col = new GridColumn("Min Clock In Time", 105, GridSortingStrategy.TimeParse); gridRules.ListGridColumns.Add(col); col = new GridColumn("Is OT Exempt", 100, HorizontalAlignment.Center, GridSortingStrategy.StringCompare); gridRules.ListGridColumns.Add(col); gridRules.ListGridRows.Clear(); UI.GridRow row; for (int i = 0; i < listSorted.Count; i++) { row = new GridRow(); if (listSorted[i].EmployeeNum == 0) { row.Cells.Add(Lan.g(this, "All Employees")); } else { Employee emp = Employees.GetEmp(listSorted[i].EmployeeNum); row.Cells.Add(emp.FName + " " + emp.LName); } row.Cells.Add(listSorted[i].BeforeTimeOfDay.ToStringHmm()); row.Cells.Add(listSorted[i].AfterTimeOfDay.ToStringHmm()); row.Cells.Add(listSorted[i].OverHoursPerDay.ToStringHmm()); row.Cells.Add(listSorted[i].MinClockInTime.ToStringHmm()); row.Cells.Add(listSorted[i].IsOvertimeExempt ? "X" : ""); row.Tag = listSorted[i]; gridRules.ListGridRows.Add(row); } gridRules.EndUpdate(); }
private void FillGrid(bool isShowAll) { gridMain.BeginUpdate(); gridMain.ListGridColumns.Clear(); GridColumn col = new GridColumn(Lan.g("TableUnallocatedPaysplits", "Date"), 70); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableUnallocatedPaysplits", "Patient Name"), 120); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableUnallocatedPaysplits", "Prov"), 120); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableUnallocatedPaysplits", "UnearnedType"), 150); gridMain.ListGridColumns.Add(col); if (isShowAll) { //Original because we don't know how much has been allocated col = new GridColumn(Lan.g("TableUnallocatedPaysplits", "Amt Original"), 60, HorizontalAlignment.Right); } else { col = new GridColumn(Lan.g("TableUnallocatedPaysplits", "Amt End"), 60, HorizontalAlignment.Right); } gridMain.ListGridColumns.Add(col); gridMain.ListGridRows.Clear(); GridRow row; foreach (PaySplit paySplit in _listPaySplits) { row = new GridRow(); row.Cells.Add(paySplit.DatePay.ToShortDateString()); row.Cells.Add(Patients.GetNameLF(paySplit.PatNum)); row.Cells.Add(Providers.GetAbbr(paySplit.ProvNum)); row.Cells.Add(Defs.GetName(DefCat.PaySplitUnearnedType, paySplit.UnearnedType)); if (isShowAll || !_dictLeftOverAmounts.ContainsKey(paySplit.SplitNum)) { row.Cells.Add(paySplit.SplitAmt.ToString("F")); //show the original amount } else { row.Cells.Add(_dictLeftOverAmounts[paySplit.SplitNum].ToString("F")); //show amount remaining } row.Tag = paySplit; gridMain.ListGridRows.Add(row); } gridMain.EndUpdate(); }
private void FillGrid() { PlanList = InsPlans.Refresh(FamCur); gridMain.BeginUpdate(); gridMain.Columns.Clear(); ODGridColumn col = new ODGridColumn(Lan.g("TableInsPlans", "#"), 20); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableInsPlans", "Subscriber"), 140); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableInsPlans", "Ins Carrier"), 100); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableInsPlans", "Date Effect."), 90); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableInsPlans", "Date Term."), 90); gridMain.Columns.Add(col); gridMain.Rows.Clear(); ODGridRow row; for (int i = 0; i < PlanList.Length; i++) { row = new ODGridRow(); row.Cells.Add((i + 1).ToString()); row.Cells.Add(FamCur.GetNameInFamLF(PlanList[i].Subscriber)); row.Cells.Add(Carriers.GetName(PlanList[i].CarrierNum)); if (PlanList[i].DateEffective.Year < 1880) { row.Cells.Add(""); } else { row.Cells.Add(PlanList[i].DateEffective.ToString("d")); } if (PlanList[i].DateTerm.Year < 1880) { row.Cells.Add(""); } else { row.Cells.Add(PlanList[i].DateTerm.ToString("d")); } gridMain.Rows.Add(row); } gridMain.EndUpdate(); }
private void FillGrid2() { //Our strategy in this window and all sub windows is to get all data directly from the database. //If it's too slow in this window due to the 20-30 database calls per row in grid2, then we might later optimize to pull from the cache. ListCustom = HL7Defs.GetDeepCustomList(); grid2.BeginUpdate(); grid2.Columns.Clear(); ODGridColumn col = new ODGridColumn(Lan.g(this, "Description"), 100); grid2.Columns.Add(col); col = new ODGridColumn(Lan.g(this, "Mode"), 40); grid2.Columns.Add(col); col = new ODGridColumn(Lan.g(this, "In Folder / Socket"), 130); grid2.Columns.Add(col); col = new ODGridColumn(Lan.g(this, "Out Folder / Socket"), 130); grid2.Columns.Add(col); col = new ODGridColumn(Lan.g(this, "Enabled"), 35); grid2.Columns.Add(col); grid2.Rows.Clear(); for (int i = 0; i < ListCustom.Count; i++) { ODGridRow row = new ODGridRow(); row.Cells.Add(ListCustom[i].Description); row.Cells.Add(Lan.g("enumModeTxHL7", ListCustom[i].ModeTx.ToString())); if (ListCustom[i].ModeTx == ModeTxHL7.File) { row.Cells.Add(ListCustom[i].IncomingFolder); row.Cells.Add(ListCustom[i].OutgoingFolder); } else if (ListCustom[i].ModeTx == ModeTxHL7.TcpIp) { row.Cells.Add(ListCustom[i].HL7Server + ":" + ListCustom[i].IncomingPort); row.Cells.Add(ListCustom[i].OutgoingIpPort); } else //Sftp { row.Cells.Add(ListCustom[i].SftpInSocket); row.Cells.Add("N/A"); } row.Cells.Add(ListCustom[i].IsEnabled?"X":""); grid2.Rows.Add(row); } grid2.EndUpdate(); }
///<summary>Updates the result column for the specified row in the grid with the text passed in.</summary> private void UpdateResultTextForRow(int index, string text, ODGrid gridCur) { int breakdownIndex = gridCur.ListGridColumns.GetIndex(BREAKDOWN_COLUMN_NAME); int resultsIndex = gridCur.ListGridColumns.GetIndex(RESULTS_COLUMN_NAME); gridCur.BeginUpdate(); //Checks to see if it has a breakdown, and if it needs any maintenance to decide whether or not to apply the "X" if (!DatabaseMaintenances.MethodHasBreakDown((MethodInfo)gridCur.ListGridRows[index].Tag) || text == "Done. No maintenance needed.") { gridCur.ListGridRows[index].Cells[breakdownIndex].Text = ""; } else { gridCur.ListGridRows[index].Cells[breakdownIndex].Text = "X"; } gridCur.ListGridRows[index].Cells[resultsIndex].Text = text; gridCur.EndUpdate(); Application.DoEvents(); }
private void FillGrid1() { //Our strategy in this window and all sub windows is to get all data directly from the database (or internal). ListInternal = HL7Defs.GetDeepInternalList(); grid1.BeginUpdate(); grid1.Columns.Clear(); ODGridColumn col = new ODGridColumn(Lan.g(this, "Description"), 100); grid1.Columns.Add(col); col = new ODGridColumn(Lan.g(this, "Mode"), 40); grid1.Columns.Add(col); col = new ODGridColumn(Lan.g(this, "In Folder / Socket"), 130); grid1.Columns.Add(col); col = new ODGridColumn(Lan.g(this, "Out Folder / Socket"), 130); grid1.Columns.Add(col); col = new ODGridColumn(Lan.g(this, "Enabled"), 35); grid1.Columns.Add(col); grid1.Rows.Clear(); for (int i = 0; i < ListInternal.Count; i++) { ODGridRow row = new ODGridRow(); row.Cells.Add(ListInternal[i].Description); row.Cells.Add(Lan.g("enumModeTxHL7", ListInternal[i].ModeTx.ToString())); if (ListInternal[i].ModeTx == ModeTxHL7.File) { row.Cells.Add(ListInternal[i].IncomingFolder); row.Cells.Add(ListInternal[i].OutgoingFolder); } else if (ListInternal[i].ModeTx == ModeTxHL7.TcpIp) { row.Cells.Add(ListInternal[i].HL7Server + ":" + ListInternal[i].IncomingPort); row.Cells.Add(ListInternal[i].OutgoingIpPort); } else //Sftp { row.Cells.Add(ListInternal[i].SftpInSocket); row.Cells.Add("N/A"); } row.Cells.Add(ListInternal[i].IsEnabled?"X":""); grid1.Rows.Add(row); } grid1.EndUpdate(); }
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 FillGrid() { RxDefList = RxDefs.Refresh(); gridMain.BeginUpdate(); gridMain.ListGridColumns.Clear(); GridColumn col = new GridColumn(Lan.g("TableRxSetup", "Drug"), 140); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableRxSetup", "Controlled"), 70, HorizontalAlignment.Center); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableRxSetup", "Sig"), 320); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableRxSetup", "Disp"), 70); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableRxSetup", "Refills"), 70); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableRxSetup", "Notes"), 300); gridMain.ListGridColumns.Add(col); gridMain.ListGridRows.Clear(); GridRow row; for (int i = 0; i < RxDefList.Length; i++) { row = new GridRow(); row.Cells.Add(RxDefList[i].Drug); if (RxDefList[i].IsControlled) { row.Cells.Add("X"); } else { row.Cells.Add(""); } row.Cells.Add(RxDefList[i].Sig); row.Cells.Add(RxDefList[i].Disp); row.Cells.Add(RxDefList[i].Refills); row.Cells.Add(RxDefList[i].Notes); gridMain.ListGridRows.Add(row); } gridMain.EndUpdate(); }
private void FillGrid1() { grid1.BeginUpdate(); grid1.ListGridColumns.Clear(); grid1.ListGridColumns.Add(new GridColumn(Lan.g("TableSheetDef", "Description"), -1)); grid1.ListGridColumns.Add(new GridColumn(Lan.g("TableSheetDef", "Type"), 100)); grid1.ListGridRows.Clear(); foreach (SheetDef internalDef in internalList) { if (listFilter.SelectedItems.Count > 0 && !listFilter.GetListSelected <SheetTypeEnum>().Contains(internalDef.SheetType)) { continue; } GridRow row = new GridRow(); row.Cells.Add(internalDef.Description); row.Cells.Add(internalDef.SheetType.ToString()); row.Tag = internalDef; grid1.ListGridRows.Add(row); } grid1.EndUpdate(); }
private void FillGridMissing() { int sortColIndex = gridMissing.SortedByColumnIdx; bool isSortAscending = gridMissing.SortedIsAscending; gridMissing.BeginUpdate(); gridMissing.Columns.Clear(); ODGridColumn col = new ODGridColumn(Lan.g(this, "RxNorm"), 70, GridSortingStrategy.StringCompare); gridMissing.Columns.Add(col); col = new ODGridColumn(Lan.g(this, "Drug Description"), 0, GridSortingStrategy.StringCompare); gridMissing.Columns.Add(col); gridMissing.Rows.Clear(); List <MedicationPat> listMedPats = MedicationPats.GetAllMissingMedications(); Dictionary <string, List <MedicationPat> > dictMissingUnique = new Dictionary <string, List <MedicationPat> >(); foreach (MedicationPat medPat in listMedPats) { string key = medPat.RxCui.ToString() + " - " + medPat.MedDescript.ToLower().Trim(); if (!dictMissingUnique.ContainsKey(key)) { dictMissingUnique[key] = new List <MedicationPat>(); ODGridRow row = new ODGridRow(); row.Tag = dictMissingUnique[key]; if (medPat.RxCui == 0) { row.Cells.Add(""); } else { row.Cells.Add(medPat.RxCui.ToString()); } row.Cells.Add(medPat.MedDescript); gridMissing.Rows.Add(row); } dictMissingUnique[key].Add(medPat); } gridMissing.EndUpdate(); gridMissing.SortForced(sortColIndex, isSortAscending); }