Ejemplo n.º 1
0
        private void FormJournal_Load(object sender, EventArgs e)
        {
            DateTime firstofYear = new DateTime(InitialAsOfDate.Year, 1, 1);

            textDateTo.Text = InitialAsOfDate.ToShortDateString();
            if (AccountCur.AcctType == AccountType.Income || AccountCur.AcctType == AccountType.Expense)
            {
                textDateFrom.Text = firstofYear.ToShortDateString();
            }
            LayoutToolBar();
            FillGrid();
            gridMain.ScrollToEnd();
        }
Ejemplo n.º 2
0
        private void butAdd_Click(object sender, System.EventArgs e)
        {
            if (comboClass.SelectedIndex == -1 || comboCourse.SelectedIndex == -1)
            {
                MsgBox.Show(this, "Please select a Class and Course first.");
                return;
            }
            FormReqNeededEdit FormR = new FormReqNeededEdit();

            FormR.ReqCur = new ReqNeeded();
            FormR.ReqCur.SchoolClassNum  = SchoolClasses.List[comboClass.SelectedIndex].SchoolClassNum;
            FormR.ReqCur.SchoolCourseNum = SchoolCourses.List[comboCourse.SelectedIndex].SchoolCourseNum;
            FormR.IsNew = true;
            FormR.ShowDialog();
            if (FormR.DialogResult != DialogResult.OK)
            {
                return;
            }
            FillGrid();
            gridMain.ScrollToEnd();
            for (int i = 0; i < table.Rows.Count; i++)
            {
                if (table.Rows[i]["ReqNeededNum"].ToString() == FormR.ReqCur.ReqNeededNum.ToString())
                {
                    gridMain.SetSelected(i, true);
                    break;
                }
            }
        }
Ejemplo n.º 3
0
        private void FillGrid()
        {
            SecurityLog[] logList = SecurityLogs.Refresh(PatNum, PermTypes, FKey);
            grid.BeginUpdate();
            grid.Columns.Clear();
            ODGridColumn col;

            col = new ODGridColumn(Lan.g("TableAudit", "Date Time"), 120);
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableAudit", "User"), 70);
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableAudit", "Permission"), 110);
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableAudit", "Log Text"), 569);
            grid.Columns.Add(col);
            grid.Rows.Clear();
            ODGridRow row;

            for (int i = 0; i < logList.Length; i++)
            {
                row = new ODGridRow();
                row.Cells.Add(logList[i].LogDateTime.ToShortDateString() + " " + logList[i].LogDateTime.ToShortTimeString());
                row.Cells.Add(Userods.GetUser(logList[i].UserNum).UserName);
                row.Cells.Add(logList[i].PermType.ToString());
                row.Cells.Add(logList[i].LogText);
                grid.Rows.Add(row);
            }
            grid.EndUpdate();
            grid.ScrollToEnd();
        }
Ejemplo n.º 4
0
        private void butAdd_Click(object sender, System.EventArgs e)
        {
            FormProvEdit FormP = new FormProvEdit();

            FormP.ProvCur           = new Provider();
            FormP.ProvCur.ItemOrder = Providers.ListLong.Length;
            FormP.IsNew             = true;
            FormP.ShowDialog();
            if (FormP.DialogResult != DialogResult.OK)
            {
                return;
            }
            changed = true;
            //Providers.Selected=Providers.ListLong.Length;//this is one more than allowed, but it's ok;
            FillGrid();
            gridMain.ScrollToEnd();
            for (int i = 0; i < Providers.ListLong.Length; i++)
            {
                if (Providers.ListLong[i].ProvNum == FormP.ProvCur.ProvNum)
                {
                    gridMain.SetSelected(1, true);
                    break;
                }
            }
        }
Ejemplo n.º 5
0
        private void butAdd_Click(object sender, System.EventArgs e)
        {
            FormProvEdit FormP = new FormProvEdit();

            FormP.ProvCur           = new Provider();
            FormP.ProvCur.ItemOrder = Providers.GetNextItemOrder();
            if (groupDentalSchools.Visible && comboClass.SelectedIndex > 0)
            {
                FormP.ProvCur.SchoolClassNum = SchoolClasses.List[comboClass.SelectedIndex - 1].SchoolClassNum;
            }
            FormP.IsNew = true;
            FormP.ShowDialog();
            if (FormP.DialogResult != DialogResult.OK)
            {
                return;
            }
            changed = true;
            FillGrid();
            gridMain.ScrollToEnd();
            for (int i = 0; i < table.Rows.Count; i++)      //Providers.ListLong.Length;i++) {
            {
                if (table.Rows[i]["ProvNum"].ToString() == FormP.ProvCur.ProvNum.ToString())
                {
                    //Providers.ListLong[i].ProvNum==FormP.ProvCur.ProvNum) {
                    gridMain.SetSelected(i, true);
                    break;
                }
            }
        }
Ejemplo n.º 6
0
        private void FillGrid()
        {
            if (IsSelectionMode)
            {
                DList = Deposits.GetUnattached();
            }
            else
            {
                DList = Deposits.Refresh();
            }
            grid.BeginUpdate();
            grid.Columns.Clear();
            ODGridColumn col = new ODGridColumn(Lan.g("TableDepositSlips", "Date"), 80);

            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableDepositSlips", "Amount"), 90);
            grid.Columns.Add(col);
            grid.Rows.Clear();
            OpenDental.UI.ODGridRow row;
            for (int i = 0; i < DList.Length; i++)
            {
                row = new OpenDental.UI.ODGridRow();
                row.Cells.Add(DList[i].DateDeposit.ToShortDateString());
                row.Cells.Add(DList[i].Amount.ToString("F"));
                grid.Rows.Add(row);
            }
            grid.EndUpdate();
            grid.ScrollToEnd();
        }
Ejemplo n.º 7
0
 private void checkHideOlder_CheckedChanged(object sender, EventArgs e)
 {
     FillGrid();
     if (checkHideOlder.Checked)
     {
         gridMain.ScrollToEnd();
     }
 }
Ejemplo n.º 8
0
        private void FillGrid()
        {
            if (!PrefC.HasClinicsEnabled)
            {
                if (IsSelectionMode)
                {
                    DList = Deposits.GetUnattached();
                }
                else
                {
                    DList = Deposits.Refresh();
                }
            }
            else
            {
                //GetForClinics uses an empty list to indicate "all", which is a loophole if user doesn't select an item.  So:
                if (comboClinics.ListSelectedClinicNums.Count == 0)
                {
                    DList = Deposits.GetForClinics(new List <long>()
                    {
                        Clinics.ClinicNum
                    }, IsSelectionMode);                                                                                   //restrict to current clinic
                }
                else
                {
                    DList = Deposits.GetForClinics(comboClinics.ListSelectedClinicNums, IsSelectionMode);
                }
            }
            grid.BeginUpdate();
            grid.ListGridColumns.Clear();
            GridColumn col = new GridColumn(Lan.g("TableDepositSlips", "Date"), 80);

            grid.ListGridColumns.Add(col);
            col = new GridColumn(Lan.g("TableDepositSlips", "Amount"), 90, HorizontalAlignment.Right);
            grid.ListGridColumns.Add(col);
            if (PrefC.HasClinicsEnabled)
            {
                col = new GridColumn(Lan.g("TableDepositSlips", "Clinic"), 150);
                grid.ListGridColumns.Add(col);
            }
            grid.ListGridRows.Clear();
            OpenDental.UI.GridRow row;
            for (int i = 0; i < DList.Length; i++)
            {
                row = new OpenDental.UI.GridRow();
                row.Cells.Add(DList[i].DateDeposit.ToShortDateString());
                row.Cells.Add(DList[i].Amount.ToString("F"));
                if (PrefC.HasClinicsEnabled)
                {
                    row.Cells.Add(" " + DList[i].ClinicAbbr);                  //padding left with space to add separation between amount and clinic abbr
                }
                grid.ListGridRows.Add(row);
            }
            grid.EndUpdate();
            grid.ScrollToEnd();
        }
Ejemplo n.º 9
0
        private void FillGrid()
        {
            if (!PrefC.HasClinicsEnabled)
            {
                if (IsSelectionMode)
                {
                    DList = Deposits.GetUnattached();
                }
                else
                {
                    DList = Deposits.Refresh();
                }
            }
            else
            {
                List <long> listSelectedClinicNums = new List <long>();
                if (!Security.CurUser.ClinicIsRestricted && comboClinic.SelectedIndices.Contains(0))                 //All is an option in comboClinic and is selected.
                //Blank by design for Deposits.GetForClinics(...).
                {
                }
                else
                {
                    int listStep = (Security.CurUser.ClinicIsRestricted?0:1);                  //If the All option is available, then all indices are offset by 1.
                    comboClinic.ListSelectedIndices.ForEach(x => listSelectedClinicNums.Add(_listClinics[x - listStep].ClinicNum));
                }
                DList = Deposits.GetForClinics(listSelectedClinicNums, IsSelectionMode);
            }
            grid.BeginUpdate();
            grid.Columns.Clear();
            ODGridColumn col = new ODGridColumn(Lan.g("TableDepositSlips", "Date"), 80);

            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableDepositSlips", "Amount"), 90, HorizontalAlignment.Right);
            grid.Columns.Add(col);
            if (PrefC.HasClinicsEnabled)
            {
                col = new ODGridColumn(Lan.g("TableDepositSlips", "Clinic"), 150);
                grid.Columns.Add(col);
            }
            grid.Rows.Clear();
            OpenDental.UI.ODGridRow row;
            for (int i = 0; i < DList.Length; i++)
            {
                row = new OpenDental.UI.ODGridRow();
                row.Cells.Add(DList[i].DateDeposit.ToShortDateString());
                row.Cells.Add(DList[i].Amount.ToString("F"));
                if (PrefC.HasClinicsEnabled)
                {
                    row.Cells.Add(" " + DList[i].ClinicAbbr);                  //padding left with space to add separation between amount and clinic abbr
                }
                grid.Rows.Add(row);
            }
            grid.EndUpdate();
            grid.ScrollToEnd();
        }
Ejemplo n.º 10
0
        private void FillGrid()
        {
            try {
                LogList = SecurityLogs.Refresh(PatNum, PermTypes, FKey);
            }
            catch (Exception ex) {
                FriendlyException.Show(Lan.g(this, "There was a problem refreshing the Audit Trail with the current filters."), ex);
                LogList = new SecurityLog[0];
            }
            grid.BeginUpdate();
            grid.ListGridColumns.Clear();
            GridColumn col;

            col = new GridColumn(Lan.g("TableAudit", "Date Time"), 120);
            grid.ListGridColumns.Add(col);
            col = new GridColumn(Lan.g("TableAudit", "User"), 70);
            grid.ListGridColumns.Add(col);
            col = new GridColumn(Lan.g("TableAudit", "Permission"), 170);
            grid.ListGridColumns.Add(col);
            col = new GridColumn(Lan.g("TableAudit", "Log Text"), 510);
            grid.ListGridColumns.Add(col);
            grid.ListGridRows.Clear();
            GridRow row;
            Userod  user;

            foreach (SecurityLog logCur in LogList)
            {
                row = new GridRow();
                row.Cells.Add(logCur.LogDateTime.ToShortDateString() + " " + logCur.LogDateTime.ToShortTimeString());
                user = Userods.GetUser(logCur.UserNum);
                if (user == null)               //Will be null for audit trails made by outside entities that do not require users to be logged in.  E.g. Web Sched.
                {
                    row.Cells.Add("unknown");
                }
                else
                {
                    row.Cells.Add(user.UserName);
                }
                row.Cells.Add(logCur.PermType.ToString());
                row.Cells.Add(logCur.LogText);
                grid.ListGridRows.Add(row);
            }
            grid.EndUpdate();
            grid.ScrollToEnd();
        }
Ejemplo n.º 11
0
        private void FillGrid()
        {
            //Fill the log if it wasn't filled outside of this window.
            if (LogList == null)
            {
                LogList = SecurityLogs.Refresh(PatNum, PermTypes, FKey, checkIncludeArchived.Checked);
            }
            grid.BeginUpdate();
            grid.Columns.Clear();
            ODGridColumn col;

            col = new ODGridColumn(Lan.g("TableAudit", "Date Time"), 120);
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableAudit", "User"), 70);
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableAudit", "Permission"), 170);
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableAudit", "Log Text"), 510);
            grid.Columns.Add(col);
            grid.Rows.Clear();
            ODGridRow row;
            Userod    user;

            for (int i = 0; i < LogList.Length; i++)
            {
                row = new ODGridRow();
                row.Cells.Add(LogList[i].LogDateTime.ToShortDateString() + " " + LogList[i].LogDateTime.ToShortTimeString());
                user = Userods.GetUser(LogList[i].UserNum);
                if (user == null)               //Will be null for audit trails made by outside entities that do not require users to be logged in.  E.g. Web Sched.
                {
                    row.Cells.Add("unknown");
                }
                else
                {
                    row.Cells.Add(user.UserName);
                }
                row.Cells.Add(LogList[i].PermType.ToString());
                row.Cells.Add(LogList[i].LogText);
                grid.Rows.Add(row);
            }
            grid.EndUpdate();
            grid.ScrollToEnd();
        }
Ejemplo n.º 12
0
        private void FillGrid()
        {
            SecurityLog[] logList = SecurityLogs.Refresh(PatNum, PermTypes);
            grid.BeginUpdate();
            grid.Rows.Clear();
            ODGridRow row;

            for (int i = 0; i < logList.Length; i++)
            {
                row = new ODGridRow();
                row.Cells.Add(logList[i].LogDateTime.ToShortDateString() + " " + logList[i].LogDateTime.ToShortTimeString());
                row.Cells.Add(UserodB.GetUser(logList[i].UserNum).UserName);
                row.Cells.Add(logList[i].PermType.ToString());
                row.Cells.Add(logList[i].LogText);
                grid.Rows.Add(row);
            }
            grid.EndUpdate();
            grid.ScrollToEnd();
        }
Ejemplo n.º 13
0
        private void FillGrid()
        {
            RList = Reconciles.GetList(AccountNum);
            grid.BeginUpdate();
            grid.Columns.Clear();
            ODGridColumn col = new ODGridColumn(Lan.g("TableReconciles", "Date"), 80);

            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableReconciles", "Ending Bal"), 100, HorizontalAlignment.Right);
            grid.Columns.Add(col);
            grid.Rows.Clear();
            OpenDental.UI.ODGridRow row;
            for (int i = 0; i < RList.Length; i++)
            {
                row = new OpenDental.UI.ODGridRow();
                row.Cells.Add(RList[i].DateReconcile.ToShortDateString());
                row.Cells.Add(RList[i].EndingBal.ToString("F"));
                grid.Rows.Add(row);
            }
            grid.EndUpdate();
            grid.ScrollToEnd();
        }
Ejemplo n.º 14
0
        private void butAdd_Click(object sender, System.EventArgs e)
        {
            FormProvEdit FormP = new FormProvEdit();

            FormP.ProvCur = new Provider();
            if (gridMain.SelectedIndices.Length > 0)                                                                                            //place new provider after the first selected index. No changes are made to DB until after provider is actually inserted.
            {
                FormP.ProvCur.ItemOrder = Providers.GetProv(PIn.Long(table.Rows[gridMain.SelectedIndices[0]]["ProvNum"].ToString())).ItemOrder; //now two with this itemorder
            }
            else
            {
                FormP.ProvCur.ItemOrder = Providers.GetNextItemOrder();              //this is clumsy and needs rewrite.
            }
            if (groupDentalSchools.Visible && comboClass.SelectedIndex > 0)
            {
                FormP.ProvCur.SchoolClassNum = SchoolClasses.List[comboClass.SelectedIndex - 1].SchoolClassNum;
            }
            FormP.IsNew = true;
            FormP.ShowDialog();
            if (FormP.DialogResult != DialogResult.OK)
            {
                return;
            }
            //new provider has already been inserted into DB from FormP.
            Providers.MoveDownBelow(FormP.ProvCur);            //safe to run even if none selected.
            changed = true;
            FillGrid();
            gridMain.ScrollToEnd();
            for (int i = 0; i < table.Rows.Count; i++)      //ProviderC.ListLong.Count;i++) {
            {
                if (table.Rows[i]["ProvNum"].ToString() == FormP.ProvCur.ProvNum.ToString())
                {
                    //ProviderC.ListLong[i].ProvNum==FormP.ProvCur.ProvNum) {
                    gridMain.SetSelected(i, true);
                    break;
                }
            }
        }
Ejemplo n.º 15
0
        private void FillGrid()
        {
            int userNum = 0;

            if (comboUser.SelectedIndex > 0)
            {
                userNum = Userods.Listt[comboUser.SelectedIndex - 1].UserNum;
            }
            SecurityLog[] logList = SecurityLogs.Refresh(PIn.PDate(textDateFrom.Text), PIn.PDate(textDateTo.Text),
                                                         (Permissions)comboPermission.SelectedIndex, PatNum, userNum);
            grid.BeginUpdate();
            grid.Columns.Clear();
            ODGridColumn col = new ODGridColumn(Lan.g("TableAudit", "Date Time"), 120);

            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableAudit", "User"), 70);
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableAudit", "Permission"), 110);
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableAudit", "Log Text"), 570);
            grid.Columns.Add(col);
            grid.Rows.Clear();
            ODGridRow row;

            for (int i = 0; i < logList.Length; i++)
            {
                row = new ODGridRow();
                row.Cells.Add(logList[i].LogDateTime.ToShortDateString() + " " + logList[i].LogDateTime.ToShortTimeString());
                row.Cells.Add(UserodB.GetUser(logList[i].UserNum).UserName);
                row.Cells.Add(logList[i].PermType.ToString());
                row.Cells.Add(logList[i].LogText);
                grid.Rows.Add(row);
            }
            grid.EndUpdate();
            grid.ScrollToEnd();
        }
Ejemplo n.º 16
0
        private void FillGrid()
        {
            long userNum = 0;

            if (comboUser.SelectedIndex > 0)
            {
                userNum = UserodC.Listt[comboUser.SelectedIndex - 1].UserNum;
            }
            SecurityLog[] logList = null;
            if (comboPermission.SelectedIndex == 0)
            {
                logList = SecurityLogs.Refresh(PIn.Date(textDateFrom.Text), PIn.Date(textDateTo.Text),
                                               Permissions.None, PatNum, userNum);
            }
            else
            {
                logList = SecurityLogs.Refresh(PIn.Date(textDateFrom.Text), PIn.Date(textDateTo.Text),
                                               (Permissions)Enum.Parse(typeof(Permissions), comboPermission.SelectedItem.ToString()), PatNum, userNum);
            }
            grid.BeginUpdate();
            grid.Columns.Clear();
            ODGridColumn col = new ODGridColumn(Lan.g("TableAudit", "Date"), 70);

            col.SortingStrategy = GridSortingStrategy.DateParse;
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableAudit", "Time"), 60);
            col.SortingStrategy = GridSortingStrategy.DateParse;
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableAudit", "Patient"), 100);
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableAudit", "User"), 70);
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableAudit", "Permission"), 110);
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableAudit", "Computer"), 70);
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableAudit", "Log Text"), 560);
            grid.Columns.Add(col);
            grid.Rows.Clear();
            ODGridRow row;
            Userod    user;

            for (int i = 0; i < logList.Length; i++)
            {
                row = new ODGridRow();
                row.Cells.Add(logList[i].LogDateTime.ToShortDateString());
                row.Cells.Add(logList[i].LogDateTime.ToShortTimeString());
                row.Cells.Add(logList[i].PatientName);
                user = Userods.GetUser(logList[i].UserNum);
                //user might be null due to old bugs.
                if (user == null)
                {
                    row.Cells.Add("unknown");
                }
                else
                {
                    row.Cells.Add(Userods.GetUser(logList[i].UserNum).UserName);
                }
                if (logList[i].PermType == Permissions.ChartModule)
                {
                    row.Cells.Add("ChartModuleViewed");
                }
                else if (logList[i].PermType == Permissions.FamilyModule)
                {
                    row.Cells.Add("FamilyModuleViewed");
                }
                else if (logList[i].PermType == Permissions.AccountModule)
                {
                    row.Cells.Add("AccountModuleViewed");
                }
                else if (logList[i].PermType == Permissions.ImagesModule)
                {
                    row.Cells.Add("ImagesModuleViewed");
                }
                else if (logList[i].PermType == Permissions.TPModule)
                {
                    row.Cells.Add("TreatmentPlanModuleViewed");
                }
                else
                {
                    row.Cells.Add(logList[i].PermType.ToString());
                }
                row.Cells.Add(logList[i].CompName);
                row.Cells.Add(logList[i].LogText);
                //Get the hash for the audit log entry from the database and rehash to compare
                string newHash = SecurityLogHashes.GetHashString(logList[i]);
                if (logList[i].LogHash != newHash)
                {
                    row.ColorText = Color.Red;                   //Bad hash or no hash entry at all.  This prevents users from deleting the entire hash table to make the audit trail look valid and encrypted.
                    //historical entries will show as red.
                }
                grid.Rows.Add(row);
            }
            grid.EndUpdate();
            grid.ScrollToEnd();
        }
Ejemplo n.º 17
0
        private void FillGrid()
        {
            long userNum = 0;

            if (comboUser.SelectedIndex > 0)
            {
                userNum = UserodC.Listt[comboUser.SelectedIndex - 1].UserNum;
            }
            SecurityLog[] logList = null;
            if (comboPermission.SelectedIndex == 0)
            {
                logList = SecurityLogs.Refresh(PIn.Date(textDateFrom.Text), PIn.Date(textDateTo.Text),
                                               Permissions.None, PatNum, userNum);
            }
            else
            {
                logList = SecurityLogs.Refresh(PIn.Date(textDateFrom.Text), PIn.Date(textDateTo.Text),
                                               (Permissions)Enum.Parse(typeof(Permissions), comboPermission.SelectedItem.ToString()), PatNum, userNum);
            }
            grid.BeginUpdate();
            grid.Columns.Clear();
            ODGridColumn col = new ODGridColumn(Lan.g("TableAudit", "Date"), 70);

            col.SortingStrategy = GridSortingStrategy.DateParse;
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableAudit", "Time"), 60);
            col.SortingStrategy = GridSortingStrategy.DateParse;
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableAudit", "Patient"), 100);
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableAudit", "User"), 70);
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableAudit", "Permission"), 110);
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableAudit", "Computer"), 70);
            grid.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableAudit", "Log Text"), 560);
            grid.Columns.Add(col);
            grid.Rows.Clear();
            ODGridRow row;
            Userod    user;

            for (int i = 0; i < logList.Length; i++)
            {
                row = new ODGridRow();
                row.Cells.Add(logList[i].LogDateTime.ToShortDateString());
                row.Cells.Add(logList[i].LogDateTime.ToShortTimeString());
                row.Cells.Add(logList[i].PatientName);
                user = Userods.GetUser(logList[i].UserNum);
                //user might be null due to old bugs.
                if (user == null)
                {
                    row.Cells.Add("unknown");
                }
                else
                {
                    row.Cells.Add(Userods.GetUser(logList[i].UserNum).UserName);
                }
                if (logList[i].PermType == Permissions.ChartModule)
                {
                    row.Cells.Add("ChartModuleViewed");
                }
                else
                {
                    row.Cells.Add(logList[i].PermType.ToString());
                }
                row.Cells.Add(logList[i].CompName);
                row.Cells.Add(logList[i].LogText);
                grid.Rows.Add(row);
            }
            grid.EndUpdate();
            grid.ScrollToEnd();
        }