Exemple #1
0
 public LoanApproval CreateLoanApproval(LoanApproval instObj)
 {
     try
     {
         uvDb.LoanApprovals.Add(instObj);
         uvDb.SaveChanges();
     }
     catch (Exception ex)
     {
         WebLog.Log(ex.Message);
     }
     return(instObj);
 }
Exemple #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);
            }
        }