コード例 #1
0
ファイル: ForensicService.cs プロジェクト: radtek/Mvc-third
        ///存到資料庫- ForensicSMS
        public void SMSCreate(ISheet sheet, Attachment attach)
        {
            IRow row = null;

            if (sheet != null)
            {
                int rowCount = sheet.LastRowNum;
                if (rowCount > 0)
                {
                    IRow firstRow = sheet.GetRow(0);        //NPOI row

                    for (int i = 0; i <= rowCount; i++)
                    {
                        row = sheet.GetRow(i);
                        if (row == null)
                        {
                            continue;
                        }
                        ForensicSMS sms = new ForensicSMS();
                        sms = SMSMapper(sms, row);
                        if (sms != null)
                        {
                            sms.GetType().GetProperty("AttachmentId").SetValue(sms, attach.AttachmentId);
                            smsService.Create(sms);
                        }
                    }
                }
            }
        }
コード例 #2
0
ファイル: ForensicService.cs プロジェクト: radtek/Mvc-third
        ///存到資料庫- ForensicContact
        public void ContaCreate(ISheet sheet, Attachment attach)
        {
            IRow row = null;

            if (sheet != null)
            {
                int rowCount = sheet.LastRowNum;
                if (rowCount > 0)
                {
                    IRow firstRow = sheet.GetRow(0);        //NPOI row

                    for (int i = 0; i <= rowCount; i++)
                    {
                        row = sheet.GetRow(i);
                        if (row == null)
                        {
                            continue;
                        }
                        ForensicContact conta = new ForensicContact();
                        conta = ContaMapper(conta, row);
                        if (conta != null)
                        {
                            conta.GetType().GetProperty("AttachmentId").SetValue(conta, attach.AttachmentId);
                            contService.Create(conta);
                        }
                    }
                }
            }
        }
コード例 #3
0
        ///存到資料庫- CommunRecord
        public void CommunCreate(ISheet sheet, Attachment attach)
        {
            IRow row = null;

            if (sheet != null)
            {
                int rowCount = sheet.LastRowNum;
                if (rowCount > 0)
                {
                    IRow firstRow  = sheet.GetRow(0);       //NPOI row
                    int  cellCount = firstRow.LastCellNum;

                    for (int i = 0; i <= rowCount; i++)
                    {
                        row = sheet.GetRow(i);
                        if (row == null)
                        {
                            continue;
                        }
                        CommunRecord rec = new CommunRecord();
                        rec = CommunMapper(rec, row);
                        if (rec != null)
                        {
                            rec.GetType().GetProperty("AttachmentId").SetValue(rec, attach.AttachmentId);
                            commCrud.Create(rec);
                        }
                    }
                }
            }
        }
コード例 #4
0
ファイル: FeatureService.cs プロジェクト: radtek/Mvc-third
        public void RoleAddFeature(int roleId, int FeatureId)
        {
            RoleFeature rf = new RoleFeature()
            {
                FeatureId = FeatureId,
                RoleId    = roleId
            };

            rfSrv.Create(rf);
        }
コード例 #5
0
ファイル: RoleService.cs プロジェクト: radtek/Mvc-third
        public void MemberAddRole(int memberId, int roleId)
        {
            RoleMember roleMember = new RoleMember()
            {
                RoleId   = roleId,
                MemberId = memberId
            };

            srv.Create(roleMember);
        }