public ActionResult UpdateLoanApply(int customerId)
        {
            var loanApplyInfo         = db.LoanInfo.Where(m => m.customerId == customerId).FirstOrDefault();
            UpdateLoanInfoModel model = new UpdateLoanInfoModel();

            if (loanApplyInfo != null)
            {
                model.loanInfoId        = loanApplyInfo.loanInfoId;
                model.customerId        = loanApplyInfo.customerId;
                model.userId            = loanApplyInfo.userId;
                model.contractNo        = loanApplyInfo.contractNo;
                model.customerType      = loanApplyInfo.customerType;
                model.loanValue         = loanApplyInfo.loanValue;
                model.loanPurpose       = loanApplyInfo.loanPurpose;
                model.loanType          = loanApplyInfo.loanType;
                model.calTimeType       = loanApplyInfo.calTimeType;
                model.startTime         = loanApplyInfo.startTime;
                model.endTime           = loanApplyInfo.endTime;
                model.periodNum         = loanApplyInfo.periodNum;
                model.intervalDays      = loanApplyInfo.intervalDays;
                model.monthRate         = loanApplyInfo.monthRate;
                model.calInterestWay    = loanApplyInfo.calInterestWay;
                model.penaltyRate       = loanApplyInfo.penaltyRate;
                model.payWay            = loanApplyInfo.payWay;
                model.breachScale       = loanApplyInfo.breachScale;
                model.agreementInterest = loanApplyInfo.agreementInterest;
                model.advanceInterest   = loanApplyInfo.advanceInterest;
                model.poundage          = loanApplyInfo.poundage;
                model.guarantee         = loanApplyInfo.guarantee;
                model.guaranteeWay      = loanApplyInfo.guaranteeWay;
                model.remark            = loanApplyInfo.remark;
            }
            else
            {
                Customer customer = db.Customer.Find(customerId);
                model.customerId = customerId;
                model.contractNo = Utility.Utils.GetRamCode();
                model.Customer   = customer;
                model.periodNum  = 1;
            }
            return(View(model));
        }
 public ActionResult UpdateLoanApply(UpdateLoanInfoModel model)
 {
     return(View());
 }