public void RefreshAuditLog()
        {
            try
            {
                List <AuditLogEntry> entries = new List <AuditLogEntry>();

                List <KeyValuePair <long, string> > _contracts = AuditLog.GetContractsInRange(StartDate, EndDate);
                //AuditLogEntries = new ObservableCollection<AuditLogEntry>(_contracts);

                //            IEnumerable<AuditLogEntry> obsCollection = (IEnumerable<AuditLogEntry>)AuditLogEntries;
                //            var list = new List<AuditLogEntry>(obsCollection);

                AuditLogViewer.LocalReport.DataSources.Clear();
                AuditLogViewer.BorderStyle                        = System.Windows.Forms.BorderStyle.None;
                AuditLogViewer.LocalReport.ReportPath             = ApplicationInfo.ApplicationPath + "\\AuditLogRpt.rdlc";
                AuditLogViewer.ProcessingMode                     = ProcessingMode.Local;
                AuditLogViewer.LocalReport.ReportEmbeddedResource = "Spheris.BillingAdmin.AuditLogRpt.rdlc";
                if (this.EnableContractList)
                {
                    entries = AuditLog.GetEntries(StartDate, EndDate, SelectedContract.Key);
                }
                else if (EnableChangedByList && String.IsNullOrEmpty(ChangedBy) == false)
                {
                    entries = AuditLog.GetEntries(StartDate, EndDate, ChangedBy);
                }
                else
                {
                    entries = AuditLog.GetEntries(StartDate, EndDate);
                }
                AuditLogViewer.LocalReport.DataSources.Add(new ReportDataSource("Spheris_Billing_AuditLogEntry", entries));
                //AuditLogViewer.da
                //ApplicationInfo.ApplicationPath
                AuditLogViewer.Name = "Spheris_Billing_AuditLogEntry";
                ReportParameter[] parameters = new ReportParameter[2];
                parameters[0] = new ReportParameter("BeginDate", StartDate.ToShortDateString());
                parameters[1] = new ReportParameter("EndDate", EndDate.ToShortDateString());
                AuditLogViewer.LocalReport.SetParameters(parameters);
                AuditLogViewer.RefreshReport();
            }
            catch (Exception x)
            {
                View.ShowMsg(x.ToString());
            }
            //View.SetAuditLog( list );
        }
        private void RefreshContractsList()
        {
            string selectedItem = "";

            if (Contracts.SelectedValue != null)
            {
                selectedItem = Contracts.SelectedValue.ToString();
            }
            //Contracts.Items.Clear();
            //Contracts.BeginUpdate();
            //foreach (KeyValuePair<long, string> contract in AuditLog.GetContractsInRange(StartDate.Value, EndDate.Value))
            //{
            //    Contracts.Items.Add(contract);
            //}
            Contracts.DataSource    = AuditLog.GetContractsInRange(StartDate.Value, EndDate.Value);
            Contracts.ValueMember   = "Key";
            Contracts.DisplayMember = "Value";
            Contracts.EndUpdate();
        }