Ejemplo n.º 1
0
        /// <summary>
        /// 关系人相关企业信息集合
        /// </summary>
        /// <param name="relationEnterprises"></param>
        /// <param name="personId"></param>
        public void SaveRelationEnterprises(ICollection <RelationEnterprise> relationEnterprises, string personId, string auditId)
        {
            RelationEnterpriseAuditDAL cdal = new RelationEnterpriseAuditDAL();

            foreach (var remodel in relationEnterprises)
            {
                RelationEnterpriseAudit reModel = new RelationEnterpriseAudit();
                reModel.ID                 = Guid.NewGuid().ToString();
                reModel.EnterpriseDes      = remodel.EnterpriseDes;
                reModel.EnterpriseName     = remodel.EnterpriseName;
                reModel.RegisterNumber     = remodel.RegisterNumber;
                reModel.LegalPerson        = remodel.LegalPerson;
                reModel.ShareholderDetails = remodel.ShareholderDetails;
                reModel.Address            = remodel.Address;
                reModel.RegisteredCapital  = remodel.RegisteredCapital;
                reModel.MainBusiness       = remodel.MainBusiness;
                // 银行流水
                reModel.BankFlowFile = SaveFiles(remodel.BankFlowFile, reModel.ID, auditId);
                // 个人征信
                reModel.IndividualFile = SaveFiles(remodel.IndividualFile, reModel.ID, auditId);
                reModel.PersonID       = personId;
                reModel.Sequence       = remodel.Sequence;

                cdal.Add(reModel);
            }
        }
Ejemplo n.º 2
0
        public void SaveRelationEnterprises <T>(ICollection <RelationEnterprise> relationEnterprises, string personId, string auditId)
            where T : class, new()
        {
            Type type = typeof(T);

            if (type.Equals(typeof(RelationEnterpriseAudit)))
            {
                RelationEnterpriseAuditDAL cdal = new RelationEnterpriseAuditDAL();
                foreach (var remodel in relationEnterprises)
                {
                    RelationEnterpriseAudit reModel = new RelationEnterpriseAudit()
                    {
                        ID                 = Guid.NewGuid().ToString(),
                        EnterpriseDes      = remodel.EnterpriseDes,
                        EnterpriseName     = remodel.EnterpriseName,
                        RegisterNumber     = remodel.RegisterNumber,
                        LegalPerson        = remodel.LegalPerson,
                        ShareholderDetails = remodel.ShareholderDetails,
                        Address            = remodel.Address,
                        RegisteredCapital  = remodel.RegisteredCapital,
                        MainBusiness       = remodel.MainBusiness,
                        PersonID           = personId,
                        Sequence           = remodel.Sequence
                    };
                    // 银行流水
                    reModel.BankFlowFile = SaveFiles(remodel.BankFlowFile, reModel.ID, auditId);
                    // 个人征信
                    reModel.IndividualFile = SaveFiles(remodel.IndividualFile, reModel.ID, auditId);
                    cdal.Add(reModel);
                }
            }
            else if (type.Equals(typeof(RelationEnterprise)))
            {
                RelationEnterpriseDAL cdal = new RelationEnterpriseDAL();
                foreach (var remodel in relationEnterprises)
                {
                    RelationEnterprise reModel = new RelationEnterprise()
                    {
                        ID                 = Guid.NewGuid().ToString(),
                        EnterpriseDes      = remodel.EnterpriseDes,
                        EnterpriseName     = remodel.EnterpriseName,
                        RegisterNumber     = remodel.RegisterNumber,
                        LegalPerson        = remodel.LegalPerson,
                        ShareholderDetails = remodel.ShareholderDetails,
                        Address            = remodel.Address,
                        RegisteredCapital  = remodel.RegisteredCapital,
                        MainBusiness       = remodel.MainBusiness,
                        PersonID           = personId,
                        Sequence           = remodel.Sequence
                    };
                    // 银行流水
                    reModel.BankFlowFile = SaveFiles(remodel.BankFlowFile, reModel.ID, auditId);
                    // 个人征信
                    reModel.IndividualFile = SaveFiles(remodel.IndividualFile, reModel.ID, auditId);
                    cdal.Add(reModel);
                }
            }
        }