コード例 #1
0
        /// <summary>
        /// 保存初审信息
        /// </summary>
        /// yaoy    16.08.29
        /// <param name="data"></param>
        /// <returns></returns>
        public bool SaveCreditExamineReportData(string data)
        {
            var result         = true;
            var _review        = new Finance.Review();
            var _finance       = new Finance.Finance();
            var _creditExamine = new Finance.CreditExamineReport();

            JObject jo = (JObject)JsonConvert.DeserializeObject(data);

            StringReader            sr1           = new StringReader(jo["D3"]["CreditExamineReportInfo"].ToString());
            CreditExamineReportInfo creditExamine = (CreditExamineReportInfo)_serializer.Deserialize(new JsonTextReader(sr1), typeof(CreditExamineReportInfo));

            StringReader sr2        = new StringReader(jo["D4"]["ReviewInfo"].ToString());
            ReviewInfo   reviewInfo = (ReviewInfo)_serializer.Deserialize(new JsonTextReader(sr2), typeof(ReviewInfo));

            using (TransactionScope scope = new TransactionScope())
            {
                if (_creditExamine.Get(creditExamine.FinanceId) == null)
                {
                    result &= _creditExamine.Add(creditExamine);
                }
                else
                {
                    result &= _creditExamine.Modify(creditExamine);
                }

                reviewInfo.ReviewType = (byte)ReviewType.初审;

                if (_review.Get(reviewInfo.FinanceId) == null)
                {
                    // 初审添加
                    result &= _review.Add(reviewInfo);
                }
                else
                {
                    // 初审修改
                    result &= _review.Modify(reviewInfo);
                }

                if (result)
                {
                    scope.Complete();
                }
            }

            return(result);
        }
コード例 #2
0
        /// <summary>
        /// 插入信审报告信息
        /// </summary>
        /// yand     16.04.26
        /// <param name="value"></param>
        /// <returns></returns>
        public bool Add(CreditExamineReportInfo value)
        {
            bool result = true;

            using (TransactionScope scope = new TransactionScope())
            {
                CreditExamineReportMapper.Insert(value);
                result &= value.CreditExamineReportID > 0;

                if (result)
                {
                    scope.Complete();
                }
            }

            return(result);
        }
コード例 #3
0
 public bool Put(CreditExamineReportInfo value)
 {
     return(_CreditExamineReport.Modify(value));
 }
コード例 #4
0
 public bool Post(CreditExamineReportInfo value)
 {
     return(_CreditExamineReport.Add(value));
 }
コード例 #5
0
        /// <summary>
        /// 根据ID更新信审信息
        /// </summary>
        /// yand     16.04.27
        /// <param name="value"></param>
        /// <returns></returns>
        public bool Modify(CreditExamineReportInfo value)
        {
            bool result = false;
            CreditExamineReportInfo creditExamineReportInfo = CreditExamineReportMapper.Find(value.FinanceId);

            if (value == null)
            {
                return(false);
            }

            //creditExamineReportInfo.CreditExamineReportID = value.CreditExamineReportID;
            creditExamineReportInfo.MainNameType               = value.MainNameType;
            creditExamineReportInfo.MainNameReason             = value.MainNameReason;
            creditExamineReportInfo.MainAgeType                = value.MainAgeType;
            creditExamineReportInfo.MainAgeReason              = value.MainAgeReason;
            creditExamineReportInfo.MainMobileType             = value.MainMobileType;
            creditExamineReportInfo.MainMobileReason           = value.MainMobileReason;
            creditExamineReportInfo.MainLiveHouseAddressType   = value.MainLiveHouseAddressType;
            creditExamineReportInfo.MainLiveHouseAddressReason = value.MainLiveHouseAddressReason;
            creditExamineReportInfo.MainAnswerHouseAddressType = value.MainAnswerHouseAddressType;
            creditExamineReportInfo.MainBuyHousePrice          = value.MainBuyHousePrice;
            creditExamineReportInfo.MainPresentWorth           = value.MainPresentWorth;
            creditExamineReportInfo.FamiliarCarType            = value.FamiliarCarType;
            creditExamineReportInfo.CarUsed                       = value.CarUsed;
            creditExamineReportInfo.Isreasonable                  = value.Isreasonable;
            creditExamineReportInfo.MainOfficeAddressType         = value.MainOfficeAddressType;
            creditExamineReportInfo.MainOfficeAddressReason       = value.MainOfficeAddressReason;
            creditExamineReportInfo.MainTakeOffice                = value.MainTakeOffice;
            creditExamineReportInfo.MainWorkingLife               = value.MainWorkingLife;
            creditExamineReportInfo.MainMonthlyIncome             = value.MainMonthlyIncome;
            creditExamineReportInfo.IncomeStream                  = value.IncomeStream;
            creditExamineReportInfo.JointlyNameType               = value.JointlyNameType;
            creditExamineReportInfo.JointlyNameReason             = value.JointlyNameReason;
            creditExamineReportInfo.JointlyAgeType                = value.JointlyAgeType;
            creditExamineReportInfo.JointlyAgeReason              = value.JointlyAgeReason;
            creditExamineReportInfo.JointlyMobileType             = value.JointlyMobileType;
            creditExamineReportInfo.JointlyMobileReason           = value.JointlyMobileReason;
            creditExamineReportInfo.JointlyLiveHouseAddressType   = value.JointlyLiveHouseAddressType;
            creditExamineReportInfo.JointlyLiveHouseAddressReason = value.JointlyLiveHouseAddressReason;
            creditExamineReportInfo.JointlyAnswerHouseAddressType = value.JointlyAnswerHouseAddressType;
            creditExamineReportInfo.JointlyBuyHousePrice          = value.JointlyBuyHousePrice;
            creditExamineReportInfo.JointlyPresentWorth           = value.JointlyPresentWorth;
            creditExamineReportInfo.JointlyOfficeAddressType      = value.JointlyOfficeAddressType;
            creditExamineReportInfo.JointlyOfficeAddressReason    = value.JointlyOfficeAddressReason;
            creditExamineReportInfo.JointlyTakeOffice             = value.JointlyTakeOffice;
            creditExamineReportInfo.JointlyWorkingLife            = value.JointlyWorkingLife;
            creditExamineReportInfo.JointlyMonthlyIncome          = value.JointlyMonthlyIncome;
            creditExamineReportInfo.OtherMessage                  = value.OtherMessage;
            creditExamineReportInfo.ContactInformation            = value.ContactInformation;
            creditExamineReportInfo.BankBillType                  = value.BankBillType;
            creditExamineReportInfo.AnswerBankBill                = value.AnswerBankBill;
            creditExamineReportInfo.CreditType                    = value.CreditType;
            creditExamineReportInfo.AnswerCredit                  = value.AnswerCredit;
            creditExamineReportInfo.IsHomeVisitsType              = value.IsHomeVisitsType;
            creditExamineReportInfo.HomeVisitsRequire             = value.HomeVisitsRequire;
            creditExamineReportInfo.HomeVisitsResult              = value.HomeVisitsResult;
            creditExamineReportInfo.ComprehensiveEvaluation       = value.ComprehensiveEvaluation;
            creditExamineReportInfo.Car       = value.Car;
            creditExamineReportInfo.FinanceId = value.FinanceId;

            if (CreditExamineReportMapper.Update(creditExamineReportInfo) > 0)
            {
                result = true;
            }

            return(result);
        }