Exemple #1
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);
            }
        }
Exemple #2
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;
                    original.DateModified         = LoanApp.DateModified;
                    uvDb.SaveChanges();
                }
                return(original.ID);
            }
            catch (Exception ex)
            {
                WebLog.Log(ex.Message.ToString());
                return(ex.StackTrace.Count());
            }
        }
Exemple #3
0
        public int UpdateMyLoanApplication(LoanApplication LoanApp)
        {
            try
            {
                var original = uvDb.LoanApplications.Find(LoanApp.LoanRefNumber);
                if (original != null)
                {
                    original.ApplicationStatus_FK = LoanApp.ApplicationStatus_FK;
                    // original.LoanComment = LoanApp.LoanComment;
                    original.DateModified = LoanApp.DateModified;

                    original.Institution_FK = LoanApp.Institution_FK;
                    //LoanApps.MeansOfIDFilePath = LoanApp.ValueTime;
                    original.AccomodationType_FK  = LoanApp.AccomodationType_FK;
                    original.AccountName          = LoanApp.AccountName;
                    original.AccountNumber        = LoanApp.AccountNumber;
                    original.ApplicantID          = LoanApp.ApplicantID;
                    original.ApplicationStatus_FK = LoanApp.ApplicationStatus_FK;
                    original.BankCode             = Convert.ToString(LoanApp.BankCode);
                    original.BVN            = LoanApp.BVN;
                    original.ClosestBusStop = LoanApp.ClosestBusStop;
                    original.ContactAddress = LoanApp.ContactAddress;
                    //LoanApps.CreatedBy = LoanApp.CreatedBy; //Change To User ID
                    original.DateCreated  = LoanApp.DateCreated;
                    original.DateModified = LoanApp.DateModified;
                    original.DateOfBirth  = Convert.ToString(LoanApp.DateOfBirth);
                    original.EmailAddress = LoanApp.EmailAddress;
                    original.ExistingLoan = LoanApp.ExistingLoan;
                    original.ExistingLoan_NoOfMonthsLeft    = LoanApp.ExistingLoan_NoOfMonthsLeft;
                    original.ExistingLoan_OutstandingAmount = LoanApp.ExistingLoan_OutstandingAmount;
                    original.Firstname           = LoanApp.Firstname;
                    original.Gender_FK           = LoanApp.Gender_FK;
                    original.IdentficationNumber = LoanApp.IdentficationNumber;
                    original.Landmark            = LoanApp.Landmark;
                    original.LGA_FK               = LoanApp.LGA_FK;
                    original.LoanAmount           = LoanApp.LoanAmount;
                    original.LoanComment          = "";
                    original.LoanRefNumber        = LoanApp.LoanRefNumber;
                    original.LoanTenure           = LoanApp.LoanTenure;
                    original.MaritalStatus_FK     = LoanApp.MaritalStatus_FK;
                    original.MeansOfID_FK         = LoanApp.MeansOfID_FK;
                    original.NOK_EmailAddress     = LoanApp.NOK_EmailAddress;
                    original.NOK_FullName         = LoanApp.NOK_FullName;
                    original.NOK_HomeAddress      = LoanApp.NOK_HomeAddress;
                    original.NOK_PhoneNumber      = LoanApp.NOK_PhoneNumber;
                    original.NOK_Relationship     = LoanApp.NOK_Relationship;
                    original.Organization         = LoanApp.Organization;
                    original.Othernames           = LoanApp.Othernames;
                    original.PhoneNumber          = LoanApp.PhoneNumber;
                    original.RepaymentMethod_FK   = LoanApp.RepaymentMethod_FK;
                    original.StateofResidence_FK  = LoanApp.StateofResidence_FK;
                    original.Surname              = LoanApp.Surname;
                    original.Title_FK             = LoanApp.Title_FK;
                    original.IsVisible            = 1;
                    original.ValueDate            = LoanApp.ValueDate; //MyUtility.getCurrentLocalDateTime().ToString("yyyy/MM/dd"),
                    original.ValueTime            = LoanApp.ValueTime; //
                    original.ApplicationStatus_FK = LoanApp.ApplicationStatus_FK;
                    uvDb.SaveChanges();
                }
                return(original.ID);
            }
            catch (Exception ex)
            {
                WebLog.Log(ex.Message.ToString());
                return(0);
            }
        }