예제 #1
0
        public int UpdateLoanApp(LoanApplication LoanApp)
        {
            try
            {
                var original = (from a in uvDb.LoanApplications
                                where a.LoanRefNumber == LoanApp.LoanRefNumber
                                select a).FirstOrDefault();

                if (original != null)
                {
                    original.LoanComment          = LoanApp.LoanComment;
                    original.ApplicationStatus_FK = LoanApp.ApplicationStatus_FK;

                    uvDb.SaveChanges();
                }
                return(original.ID);
            }
            catch (Exception ex)
            {
                WebLog.Log(ex.Message.ToString());
                return(ex.StackTrace.Count());
            }
        }
예제 #2
0
        public LoanApproval UpdateLoanApproval(LoanApproval LoanApp, LoanApplication LoanApplication)
        {
            try
            {
                var original = (from a in uvDb.LoanApprovals
                                where a.ID == LoanApp.ID
                                select a).FirstOrDefault();

                if (original != null)
                {
                    //original.LoanComment = LoanApp.LoanComment;
                    original.ApplicationStatus_FK = LoanApp.ApplicationStatus_FK;

                    uvDb.SaveChanges();
                }
                return(original);
            }
            catch (Exception ex)
            {
                WebLog.Log(ex.Message.ToString());
                return(null);
            }
        }