public Table SelectedPatients(string diagnosis)
        {
            Table table = new Table();

            Table.Column diagnosis_column = patient.GetColumn(patient.ColumnCount() - 1);
            for (int i = 0; i < diagnosis_column.Count(); i++)
            {
                Table.Row row = patient.GetRow(i);
                if (GetDiagnosisName(row.value[patient.ColumnCount() - 1]) == diagnosis)
                {
                    table.AddRow(row);
                }
            }
            if (table.RowCount() != 0)
            {
                patient = table;
                table   = GetPatientTable();
                patient = provider.GetPatient();
            }
            else
            {
                table = null;
            }
            return(table);
        }
Exemple #2
0
 public Table.Row AddRow(uint rowId, SWIGTYPE_p_DataStructures__ListT_DataStructures__Table__Cell_p_t initialCellValues)
 {
     global::System.IntPtr cPtr = RakNetPINVOKE.Table_AddRow__SWIG_3(swigCPtr, rowId, SWIGTYPE_p_DataStructures__ListT_DataStructures__Table__Cell_p_t.getCPtr(initialCellValues));
     Table.Row             ret  = (cPtr == global::System.IntPtr.Zero) ? null : new Table.Row(cPtr, false);
     if (RakNetPINVOKE.SWIGPendingException.Pending)
     {
         throw RakNetPINVOKE.SWIGPendingException.Retrieve();
     }
     return(ret);
 }
Exemple #3
0
 private void OnTableRowCreated(Table.Row Row)
 {
     if (!this.Configuration.Editable && (Row.Data != null) && !string.IsNullOrEmpty(this.Configuration.EditLink))
     {
         Reflection.Accessor Accessor = new Reflection.Accessor();
         Accessor.Item       = Row.Data;
         Accessor.MemberName = "ID";
         Row.OnClick         = "document.location.href='" + this.Configuration.EditLink + "/" + Convert.ToString(Accessor.Value) + "'";
     }
 }
        private string  GetDiagnosisId(string name)
        {
            string result = "";

            Table.Column column = diagnosis.GetColumn(0);
            for (int i = 0; i < column.Count(); i++)
            {
                Table.Row row = diagnosis.GetRow(i);
                if (name == row.value[0])
                {
                    result = row.value[1];
                }
            }
            return(result);
        }
Exemple #5
0
 public void PrintRow(byte[] inOutByteArray, int byteArrayLength, char columnDelineator, bool printDelineatorForBinary, Table.Row inputRow)
 {
     RakNetPINVOKE.Table_PrintRow(swigCPtr, inOutByteArray, byteArrayLength, columnDelineator, printDelineatorForBinary, Table.Row.getCPtr(inputRow));
 }
Exemple #6
0
 public Table.Row GetRowByIndex(uint rowIndex, ref int key)
 {
     global::System.IntPtr cPtr = RakNetPINVOKE.Table_GetRowByIndex(swigCPtr, rowIndex, ref key);
     Table.Row             ret  = (cPtr == global::System.IntPtr.Zero) ? null : new Table.Row(cPtr, false);
     return(ret);
 }
Exemple #7
0
 public Table.Row AddRow(uint rowId)
 {
     global::System.IntPtr cPtr = RakNetPINVOKE.Table_AddRow__SWIG_0(swigCPtr, rowId);
     Table.Row             ret  = (cPtr == global::System.IntPtr.Zero) ? null : new Table.Row(cPtr, false);
     return(ret);
 }
Exemple #8
0
        private IEnumerable <ViewPart> GetPageElementPermCountryRolesViewParts(PageElement pageElement)
        {
            yield return(new Header()
            {
                HeaderType = Header.HeaderTypes.H4,
                Text = "Who can make edits to this Element?"
            });

            Table table = new Table();

            Table.Row    headerRow  = table.Header.CreateRow();
            Table.Column nameHeader = headerRow.CreateColumn();
            nameHeader.Class.Add("col-sm-11");
            nameHeader.Parts.Add(new Literal()
            {
                LiteralString = "Country Role"
            });

            Table.Column buttonHeader = headerRow.CreateColumn();
            buttonHeader.Class.Add("col-sm-1");
            buttonHeader.Parts.Add(new Literal()
            {
                LiteralString = "Delete"
            });

            for (int i = 0; i < pageElement.CountryRolePageElements.Count; i++)
            {
                CountryRolePageElement perm = pageElement.CountryRolePageElements.ElementAt(i);
                string idPrefix             = string.Format("perm-{0}-", perm.CountryRolePageElementID.Value);

                Table.Row    row     = table.Body.CreateRow();
                Table.Column nameCol = row.CreateColumn();
                nameCol.Class.Add("col-sm-11");
                nameCol.Parts.Add(new Literal()
                {
                    LiteralString = perm.CountryRole.Name
                });
                nameCol.Parts.Add(new Checkbox()
                {
                    Id      = idPrefix + "canview",
                    Text    = "Can View?",
                    Checked = perm.CanView
                });
                nameCol.Parts.Add(new Checkbox()
                {
                    Id      = idPrefix + "canedit",
                    Text    = "Can Edit?",
                    Checked = perm.CanEdit
                });
                nameCol.Parts.Add(new Hidden()
                {
                    Id    = idPrefix + "countryrolepagelementid",
                    Value = perm.CountryRolePageElementID.Value.ToString()
                });

                Table.Column removeCol = row.CreateColumn();
                removeCol.Class.Add("col-sm-1");
                Button removeButton = new Button()
                {
                    Type  = "button",
                    Class = { "btn", "btn-danger" },
                    ViewPartsBeforeText = new List <ViewPart>()
                    {
                        new Span()
                        {
                            Class = { "fas", "fa-trash" }
                        }
                    },
                    Text    = " Delete",
                    OnClick = "managePageElementPermissionsRemoveCountryRole($(this));"
                };
                removeCol.Parts.Add(removeButton);
            }

            Table.Row templateRow = table.Body.CreateRow();
            templateRow.Class.Add("d-none");
            templateRow.Class.Add("templateRow");

            string templateIdPrefix = "template-perm-";

            Table.Column nameColumn   = templateRow.CreateColumn();
            ComboBox     nameDropDown = new ComboBox();

            foreach (CountryRole role in pageElement.Page.Country.CountryRoles)
            {
                nameDropDown.SelectItems.Add(new ComboBox.Item()
                {
                    Text  = role.Name,
                    Value = role.CountryRoleID?.ToString()
                });
            }
            nameDropDown.Class.Add("form-control");
            nameDropDown.Id = templateIdPrefix + "countryroleid";
            nameColumn.Parts.Add(nameDropDown);
            nameColumn.Parts.Add(new Label()
            {
                Class = { "text-danger" },
                Data  = { { "validate-message-for", "CountryRoleID" } }
            });
            nameColumn.Parts.Add(new Checkbox()
            {
                Id   = templateIdPrefix + "canview",
                Text = "Can View?"
            });
            nameColumn.Parts.Add(new Checkbox()
            {
                Id   = templateIdPrefix + "canedit",
                Text = "Can Edit?"
            });

            Table.Column deleteCol = templateRow.CreateColumn();
            deleteCol.Class.Add("col-sm-1");
            Button deleteTemplate = new Button()
            {
                Type  = "button",
                Class = { "btn", "btn-danger" },
                ViewPartsBeforeText = new List <ViewPart>()
                {
                    new Span()
                    {
                        Class = { "fas", "fa-trash" }
                    }
                },
                Text    = " Delete",
                OnClick = "managePageElementPermissionsRemoveCountryRole($(this));"
            };

            deleteCol.Parts.Add(deleteTemplate);

            yield return(table);

            Button add = new Button()
            {
                Type  = "button",
                Class = { "btn", "btn-primary" },
                ViewPartsBeforeText = new List <ViewPart>()
                {
                    new Span()
                    {
                        Class = { "fas", "fa-plus-circle" }
                    }
                },
                Text    = " Add",
                OnClick = "managePageElementPermissionsAddCountryRole($(this));"
            };

            yield return(add);
        }
 public Table.Row GetDataHead()
 {
     global::System.IntPtr cPtr = RakNetPINVOKE.RakNetBPlusTreeRow_GetDataHead(swigCPtr);
     Table.Row             ret  = (cPtr == global::System.IntPtr.Zero) ? null : new Table.Row(cPtr, false);
     return(ret);
 }
        public bool Insert(uint key, Table.Row data)
        {
            bool ret = RakNetPINVOKE.RakNetBPlusTreeRow_Insert(swigCPtr, key, Table.Row.getCPtr(data));

            return(ret);
        }