Пример #1
0
        private void ddd()
        {
            WriterControl writerControl = new WriterControl();

            writerControl.Dock = DockStyle.Fill;
            this.Controls.Add(writerControl);
        }
Пример #2
0
        public void PopulateCaseHistoryRecords(List <CaseHistory> caseHistories)
        {
            if (caseHistories == null)
            {
                return;
            }
            var baseProgressNote        = caseHistories.Where(c => c.CaseType >= (int)Common.Enums.Enums.CaseType.ProgressNote);
            List <CaseHistory> tempList = new List <CaseHistory>();

            if (baseProgressNote.Count() > 0)
            {
                WriterControl tempControl = new WriterControl();
                tempControl.XMLText = baseProgressNote.FirstOrDefault().FileContent;
                foreach (XTextSubDocumentElement document in tempControl.SubDocuments)
                {
                    string title = document.Title;
                    if (string.IsNullOrEmpty(title))
                    {
                        title = System.IO.Path.GetFileNameWithoutExtension(document.FileName);
                    }
                    var newCase = (CaseHistory)baseProgressNote.FirstOrDefault().Clone();
                    newCase.FileContent = baseProgressNote.FirstOrDefault().FileContent;
                    newCase.Tag         = document;
                    newCase.FileName    = document.FileName;
                    newCase.FileTitle   = title;
                    tempList.Add(newCase);
                }
            }
            var dataSource = caseHistories.Where(c => c.CaseType == (int)Common.Enums.Enums.CaseType.Common).ToList();

            dataSource.AddRange(tempList);
            if (!string.IsNullOrEmpty(tb_caseName.Text.Trim()))
            {
                dataSource = dataSource.Where(x => x.FileTitle.Contains(tb_caseName.Text.Trim())).ToList();
            }
            dgv_FinishedCaseHistory.DataSource = dataSource;
        }