Ejemplo n.º 1
0
        private void FillPatAndGrid()
        {
            Patient pat = Patients.GetLim(patNum);

            textPatName2.Text = pat.GetNameFLnoPref();
            gridMain.BeginUpdate();
            gridMain.ListGridColumns.Clear();
            GridColumn col = new GridColumn("Date", 85);

            gridMain.ListGridColumns.Add(col);
            col = new GridColumn("Order", 190);
            gridMain.ListGridColumns.Add(col);
            col = new GridColumn("Results Attached", 150, HorizontalAlignment.Center);
            gridMain.ListGridColumns.Add(col);
            listLabOrders = MedicalOrders.GetAllLabs(patNum);          //this works for 0
            gridMain.ListGridRows.Clear();
            GridRow row;

            for (int i = 0; i < listLabOrders.Count; i++)
            {
                row = new GridRow();
                row.Cells.Add(listLabOrders[i].DateTimeOrder.ToShortDateString());
                row.Cells.Add(listLabOrders[i].Description);
                bool hasResultsAttached = MedicalOrders.LabHasResultsAttached(listLabOrders[i].MedicalOrderNum);
                if (hasResultsAttached)
                {
                    row.Cells.Add("X");
                }
                else
                {
                    row.Cells.Add("");
                }
                gridMain.ListGridRows.Add(row);
            }
            gridMain.EndUpdate();
        }