Ejemplo n.º 1
0
        //將檔案寫進workbook - CommunRecord
        public ISheet IntoWorkbook(ISheet sheet, Attachment attach)
        {
            Type t   = typeof(CommunRecord.CommunRecordMetadata);
            IRow row = sheet.CreateRow(0);

            row.CreateCell(0).SetCellValue(GetDisplayName(t.GetProperty("CType")));
            row.CreateCell(1).SetCellValue(GetDisplayName(t.GetProperty("CPhoneNum")));
            row.CreateCell(2).SetCellValue(GetDisplayName(t.GetProperty("CCorrePhoneNum")));
            row.CreateCell(3).SetCellValue(GetDisplayName(t.GetProperty("CStartTime")));
            row.CreateCell(4).SetCellValue("通話時間 (秒)");
            row.CreateCell(5).SetCellValue(GetDisplayName(t.GetProperty("CIMEI")));
            row.CreateCell(6).SetCellValue(GetDisplayName(t.GetProperty("CThroughPhoneNum")));
            row.CreateCell(7).SetCellValue("基地台編號/地址");

            var list = commCrud.Search(c => c.AttachmentId == attach.AttachmentId).ToList();
            int i    = 1;

            foreach (var item in list)
            {
                row = sheet.CreateRow(i++);
                row.CreateCell(0).SetCellValue(item.CType);
                row.CreateCell(1).SetCellValue(item.CPhoneNum);
                row.CreateCell(2).SetCellValue(item.CCorrePhoneNum);
                row.CreateCell(3).SetCellValue(item.CStartTime.Value.ToString("MM/dd/yyyy T HH:mm:ss"));
                row.CreateCell(4).SetCellValue(((TimeSpan)(item.CEndTime - item.CStartTime)).TotalSeconds);
                row.CreateCell(5).SetCellValue(item.CIMEI);
                row.CreateCell(6).SetCellValue(item.CThroughPhoneNum);
                row.CreateCell(7).SetCellValue(item.CStationNum == null ? null : item.CStationNum + "/" + item.CStationAddress);
            }

            return(sheet);
        }
Ejemplo n.º 2
0
        //將檔案寫進workbook - CommunRecord
        public ISheet IntoWorkbook(ISheet sheet, Attachment attach)
        {
            Type t   = typeof(Models.Partial.ForensicContact.ForensicContactMetaData);
            IRow row = sheet.CreateRow(0);

            row.CreateCell(0).SetCellValue(GetDisplayName(t.GetProperty("FNum")));
            row.CreateCell(1).SetCellValue(GetDisplayName(t.GetProperty("FName")));
            row.CreateCell(2).SetCellValue(GetDisplayName(t.GetProperty("FGroup")));
            row.CreateCell(3).SetCellValue(GetDisplayName(t.GetProperty("FModifiedTime")));
            row.CreateCell(4).SetCellValue(GetDisplayName(t.GetProperty("FClause")));
            row.CreateCell(5).SetCellValue(GetDisplayName(t.GetProperty("FNote")));
            row.CreateCell(6).SetCellValue(GetDisplayName(t.GetProperty("FSource")));
            row.CreateCell(7).SetCellValue(GetDisplayName(t.GetProperty("isDeleted")));

            var list = contService.Search(c => c.AttachmentId == attach.AttachmentId).ToList();
            int i    = 1;

            foreach (var item in list)
            {
                row = sheet.CreateRow(i++);
                row.CreateCell(0).SetCellValue(item.FNum.Value);
                row.CreateCell(1).SetCellValue(item.FName);
                row.CreateCell(2).SetCellValue(item.FGroup);
                row.CreateCell(3).SetCellValue(item.FModifiedTime.Value.ToString("MM/dd/yyyy T HH:mm:ss"));
                row.CreateCell(4).SetCellValue(item.FClause);
                row.CreateCell(5).SetCellValue(item.FNote);
                row.CreateCell(6).SetCellValue(item.FSource);
                row.CreateCell(7).SetCellValue(item.isDeleted == true ? "是":"");
            }

            return(sheet);
        }
        //將檔案寫進workbook - ForensicSMS
        public ISheet SmsIntoWorkbook(ISheet sheet, Attachment attach)
        {
            Type t   = typeof(Models.ForensicSMS.ForensicSMSMetaData);
            IRow row = sheet.CreateRow(0);

            row.CreateCell(0).SetCellValue(GetDisplayName(t.GetProperty("FNum")));
            row.CreateCell(1).SetCellValue(GetDisplayName(t.GetProperty("FCorrespond")));
            row.CreateCell(2).SetCellValue(GetDisplayName(t.GetProperty("FDatetime")));


            var list = smsService.Search(c => c.AttachmentId == attach.AttachmentId).ToList();

            int i = 1;

            foreach (var item in list)
            {
                row = sheet.CreateRow(i++);
                row.CreateCell(0).SetCellValue(item.FNum.Value);
                row.CreateCell(1).SetCellValue(item.FCorrespond);
                row.CreateCell(2).SetCellValue(item.FDatetime.GetValueOrDefault().ToString("MM/dd/yyyy  HH:mm:ss"));
            }

            return(sheet);
        }